Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    77
    Vote Rating
    2
    yAdEs is on a distinguished road

      0  

    Default context parsed wrong when editing "object" property

    context parsed wrong when editing "object" property


    REQUIRED INFORMATION

    Architect Build tested:
    • Build: 676
    Project Type:
    • ExtJS 4.1
    Description:
    • I find it's hard to edit any "object" properties in SA2.
    • When I edit "style" property of a panel, and put something like
    • {
      opacity: '0.8';
      background-color: #3d71b8
      }

      or just
    • opacity: '0.8';
      background-color: #3d71b8

      they are all parsed as string in SA2, and get results as

    • '{\r\n opacity: \'0.8\';\r\n background-color: #3d71b8\r\n}'
      or
      'opacity: \'0.8\';\r\nbackground-color: #3d71b8'
    Steps to reproduce the problem:
    • As said before
    HELPFUL INFORMATION

    Operating System:
    • Win7

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,308
    Vote Rating
    125
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    The object will have to be a valid JS object.

    In the event that you put in an invalid object, like the examples above Sencha Architect will automatically convert it to a string (so that we continue to create valid JS).

    Try pasting in:
    Code:
    {
       opacity: 0.8,
       "background-color": "#3d71b8"
    }
    background-color needs to be quoted since it has a - in it. And the color needs to be quoted since it has a # in it.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    77
    Vote Rating
    2
    yAdEs is on a distinguished road

      0  

    Default


    Quote Originally Posted by aconran View Post
    The object will have to be a valid JS object.

    In the event that you put in an invalid object, like the examples above Sencha Architect will automatically convert it to a string (so that we continue to create valid JS).

    Try pasting in:
    Code:
    {
       opacity: 0.8,
       "background-color": "#3d71b8"
    }
    background-color needs to be quoted since it has a - in it. And the color needs to be quoted since it has a # in it.


    It works! And sorry for my fault.

  4. #4
    Sencha User
    Join Date
    Nov 2011
    Posts
    77
    Vote Rating
    2
    yAdEs is on a distinguished road

      0  

    Default Same issue about proxy api

    Same issue about proxy api


    BTW, plz help me to write such api in the write way, I really get puzzle with it:

    api:
    {
    create :'/controller/new',
    read
    :'/controller/load',
    update
    :'/controller/update',
    destroy
    :'/controller/destroy_action'
    }

    It's in document of Ext.data.proxy.Server, and I try a lot of way to put them in SA2, but give up at the end.

  5. #5
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,308
    Vote Rating
    125
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    I just copy/pasted what you have above and worked fine?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  6. #6
    Sencha User
    Join Date
    Nov 2010
    Location
    Seattle, WA
    Posts
    1
    Vote Rating
    0
    jtenney is on a distinguished road

      0  

    Default so what about setting the maxValue for the date picker?

    so what about setting the maxValue for the date picker?


    I have tried the following:
    new Date()
    new Date();
    'new Date()'
    'new Date();'

    all without success. I have also chosen 'object' from the dropdown on the left side. According to the API documentation ith should just be:
    new Date()

    Very frustrated.

  7. #7
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,308
    Vote Rating
    125
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Setup things that use JS expressions in event handlers.

    http://www.sencha.com/forum/showthre...l=1#post882465
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  8. #8
    Sencha User
    Join Date
    Nov 2011
    Posts
    77
    Vote Rating
    2
    yAdEs is on a distinguished road

      0  

    Default


    Quote Originally Posted by aconran View Post
    I just copy/pasted what you have above and worked fine?
    I don't know why, but it just doesn't work well.

    I paste like this,

    2.jpg

    and got such result.....

    1.jpg

  9. #9
    Sencha User
    Join Date
    Nov 2011
    Posts
    77
    Vote Rating
    2
    yAdEs is on a distinguished road

      0  

    Default


    Finally it's solved :

    {
    create : 'office/user/create',
    read : 'office/user/read',
    update : 'office/user/update',
    destroy : 'office/user/destroy'
    }

    Need bracket inside.
    It's a little hard for user

Thread Participants: 2