Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-10007

TiAPI: Be able to set a group of adhoc properties to any proxy at runtime - see description



      Like we do at create time where we can pass in an object representing properties, it would be helpful to have the same functionality available at runtime through an API like a applyProperties setter or getter or applyProperties({}) method. In Alloy we will dynamically set properties it would help performance if we could call a method to bulk set properties.

      For example win1 = createWindow(

      { backgroundColor:'#336699', borderWidth:8, borderColor:'#999', height:400, width:300, borderRadius:10, opacity:0.92,}


      currently is being done and the properties are being passed. A developer would like to have a way at runtime to change properties in a bulk for example win1.applyProperties(

      { backgroundColor:'#336699', borderWidth:8, borderColor:'#999', height:400, width:300, borderRadius:10, opacity:0.92, }


      Benefits - code speed, and reduced code size

      Edit: In discussion, the word styles were dropped because 1) some properties are not logically part of a style and 2) we wanted to avoid confusion given how complex and interacting styles can be.

      Note that this is different than applyLayout because this is to be done at the proxy level (IE, you can do this to sounds, to HTTPClient, etc) and does not delay or apply other logic like applyLayout does. Instead, foo.applyProperties(

      {bar:5, baz:"bat"}

      ) is identical to foo.bar=5; foo.baz="bat"; but is more compact and more importantly, reduces bridge traversal.


          Issue Links



              • Assignee:
                ngupta Neeraj Gupta
                rmcmahon Russell McMahon
              • Watchers:
                0 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    Sync status:
                    Last received:
                    Last sent:

                    Git Integration