Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    4
    Vote Rating
    0
    joe_montanab is on a distinguished road

      0  

    Question How to define an object in Component Config

    How to define an object in Component Config


    I'm currently using an Ext.Map view, but this applies to any view really. In the component config area for Ext.Map there is a mapOptions setting. The text for the value shows [object]..., when I click on it I get a blank box. I try to add my object in there and it sets my value as a quoted string in code view.

    What I put in:

    { centered: 45.622469,-122.666933 }

    What I expect to show up in code view:

    Code:
    ...
        config: {
            mapOptions: { centered: 45.622469,-122.666933 }
        }
    ...
    But here is what I actually get:

    Code:
    ...
        config: {
            mapOptions: '{ centered: 45.622469,-122.666933 }\n'
        }
    ...
    How can I set the value for mapOptions (or any object in the component config area) and have it take it as an object instead of a literal string?

    Thanks!
    -Joe
    Last edited by joe_montanab; 11 Feb 2012 at 1:45 PM. Reason: comment for second code block

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    1
    bharatn is on a distinguished road

      0  

    Default


    Thats not a valid object

    needs to be { prop: value, prop1: value}

    Look at this
    http://code.google.com/apis/maps/doc...tml#MapOptions

    This is one way to specify an object but the center expects a reference and we dont support reference in Designer currently so you will need to add custom code in impl class.

    {
    center
    :new google.maps.LatLng(-34.397,150.644),
    zoom
    :8,
    mapTypeId
    : google.maps.MapTypeId.ROADMAP
    }
    Bharat Nagwani
    Sencha Designer Development Team

  3. #3
    Touch Premium Member
    Join Date
    May 2011
    Posts
    24
    Vote Rating
    0
    jnw is on a distinguished road

      0  

    Default mapOptions is Sencha Designer?

    mapOptions is Sencha Designer?


    Did you figure out how to implement this? I'm stuck on the same exact problem.


    Quote Originally Posted by joe_montanab View Post
    I'm currently using an Ext.Map view, but this applies to any view really. In the component config area for Ext.Map there is a mapOptions setting. The text for the value shows [object]..., when I click on it I get a blank box. I try to add my object in there and it sets my value as a quoted string in code view.

    What I put in:

    { centered: 45.622469,-122.666933 }

    What I expect to show up in code view:

    Code:
    ...
        config: {
            mapOptions: { centered: 45.622469,-122.666933 }
        }
    ...
    But here is what I actually get:

    Code:
    ...
        config: {
            mapOptions: '{ centered: 45.622469,-122.666933 }\n'
        }
    ...
    How can I set the value for mapOptions (or any object in the component config area) and have it take it as an object instead of a literal string?

    Thanks!
    -Joe

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    4
    Vote Rating
    0
    joe_montanab is on a distinguished road

      0  

    Default


    Quote Originally Posted by jnw View Post
    Did you figure out how to implement this? I'm stuck on the same exact problem.
    I did- the problem was that I had a syntax error in my object definition. I figured out that if there is an object value and you actually type in a proper object it works fine and auto-generates the object in your code, but if you make a syntax error it turns it into a string instead.

    So, flip to code view and make sure you didn't mess up the syntax anywhere, you'll see it create an object or string based on what you type in.

  5. #5
    Touch Premium Member
    Join Date
    May 2011
    Posts
    24
    Vote Rating
    0
    jnw is on a distinguished road

      0  

    Default


    Ahh, I see. Thanks! For some reason it doesn't like mapTypeId though. The other mapOptions seem to work as you described.

Thread Participants: 2

Tags for this Thread