Results 1 to 4 of 4

Thread: How to scape + caracter on propertie that expect string

  1. #1
    Sencha Premium User wemerson.januario's Avatar
    Join Date
    Nov 2008
    Location
    Goiânia - GO, Brazil
    Posts
    766
    Vote Rating
    65
      0  

    Default How to scape + caracter on propertie that expect string

    How can i insert a var into To properties that expect an object or array?
    ex in my store, I defined a global var called myPrefixVar and I need to use it url propertie:
    The problem is that it doesn't scape the + caracter
    url: myPrefixVar+"/mydir/anotherDir/save"
    Wemerson Januario
    Blog: http://wemersonjanuario.com.br
    Contrate-me/Hire me on: https://www.upwork.com/fl/wemersonjanuario
    From: Goiânia, GO, Brazil
    Sencha Consultant and Web Developer

    Treinamento e Consultoria Ext JS. QUALIFIQUE-SE JÁ!

    modern toolkit locale package - https://github.com/wemersonjanuario/modern-locale

  2. #2
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
      0  

    Default

    Not sure I understand your question exactly. What do you mean it doesn't "scape" the character? Do you mean "escape"? Are you trying to set this in the Designer or in an implementation file? You cannot use arbitrary variable names in the Designer, it has to be a pure string. Can you clarify the context? Based on what I currently know, I would suggest this dynamic URL be setup when you create the instance of your Store (if it's a store of course):

    Code:
    var store = MyStore({
        url: myPrefixVar + '/mydir/anothrDir/save'
    });

  3. #3
    Sencha Premium User wemerson.januario's Avatar
    Join Date
    Nov 2008
    Location
    Goiânia - GO, Brazil
    Posts
    766
    Vote Rating
    65
      0  

    Default explanation

    Quote Originally Posted by jarrednicholls View Post
    Not sure I understand your question exactly. What do you mean it doesn't "scape" the character? Do you mean "escape"? Are you trying to set this in the Designer or in an implementation file? You cannot use arbitrary variable names in the Designer, it has to be a pure string. Can you clarify the context? Based on what I currently know, I would suggest this dynamic URL be setup when you create the instance of your Store (if it's a store of course):

    Code:
    var store = MyStore({
        url: myPrefixVar + '/mydir/anothrDir/save'
    });
    Not scape. i need to set arbitrary name in designer, not pure string. I'm trying to set it on Ext Designer.
    I use the Store api, so I have a global var named myPrefixVar, then I need to use the myPrefixVar var, because almost all stores use this prefix var.
    Thanks.
    Is it possible to use into designer ?
    Wemerson Januario
    Blog: http://wemersonjanuario.com.br
    Contrate-me/Hire me on: https://www.upwork.com/fl/wemersonjanuario
    From: Goiânia, GO, Brazil
    Sencha Consultant and Web Developer

    Treinamento e Consultoria Ext JS. QUALIFIQUE-SE JÁ!

    modern toolkit locale package - https://github.com/wemersonjanuario/modern-locale

  4. #4
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
      0  

    Default

    Hi Wemerson,

    As I previously stated, you cannot use a variable name in any string config, it has to be an inline string. For your case, you should configure the store's url at instantiation time using the variable since it is dynamic. That would be a best practice anyways (code separation).

    Thanks.

Similar Threads

  1. Replies: 11
    Last Post: 2 Sep 2009, 11:12 PM
  2. acessing the toolbar propertie
    By cesarwbr in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 8 May 2008, 8:50 AM
  3. french caracter
    By islem in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 8 May 2008, 2:46 AM
  4. How i can i resolve Strange caracter?
    By islem in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 2 May 2008, 5:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •