Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-5818

Ti API: View proxies should behave like real JS objects - or they should be wrapped

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Medium Medium
    • Resolution: Unresolved
    • Affects Version/s: Release 1.7.3
    • Fix Version/s: Release 3.4.0
    • Component/s: TiAPI
    • Environment:

      Titanium Mobile 1.7.3

      Description

      Component: Ti API

      If view proxies aren't going to behave like real JS objects (e.g. nested properties of proxy objects are immutable), and that isn't going to change, I propose we should develop a pure-JS API that wraps the proxies.

      I've begun wrapping Ti views in my SproutCore-Titanium project.

      Let's get a discussion started.

        Activity

        Hide
        me@mattapperson.com added a comment -

        Honestly me and my team would be willing to do this... but I think the desire here would also be to rework the code to be more modular, thus outside the scope of what my team has the time to do.

        Show
        me@mattapperson.com added a comment - Honestly me and my team would be willing to do this... but I think the desire here would also be to rework the code to be more modular, thus outside the scope of what my team has the time to do.
        Hide
        me@mattapperson.com added a comment - - edited

        As something to consider here.. this works on android (at least as of 3.1.0 preview) but not iOS:

        var win = Ti.UI.createWindow({
            open: function() {
                alert('test');
            }
        });
        win.open(); // an alert is opened with test displayed on Android, on iOS nothing happens
        
        {code)
        
        However this still does not mean it supports prototype as:
        
        

        win.protoype;

        is undefined

        Show
        me@mattapperson.com added a comment - - edited As something to consider here.. this works on android (at least as of 3.1.0 preview) but not iOS: var win = Ti.UI.createWindow({ open: function() { alert('test'); } }); win.open(); // an alert is opened with test displayed on Android, on iOS nothing happens {code) However this still does not mean it supports prototype as: win.protoype; is undefined
        Hide
        Ivan Skugor added a comment -

        It's due to this (unfortunately, declared as invalid) bug: https://jira.appcelerator.org/browse/TIMOB-10829

        Show
        Ivan Skugor added a comment - It's due to this (unfortunately, declared as invalid) bug: https://jira.appcelerator.org/browse/TIMOB-10829
        Hide
        Neeraj Gupta added a comment -

        https://jira.appcelerator.org/browse/TIMOB-10829 has been reopened and we are going to take a closer look at that ticket.

        Show
        Neeraj Gupta added a comment - https://jira.appcelerator.org/browse/TIMOB-10829 has been reopened and we are going to take a closer look at that ticket.
        Hide
        Ivan Skugor added a comment -

        Thanks

        Show
        Ivan Skugor added a comment - Thanks

          People

          • Assignee:
            Ingo Muschenetz
            Reporter:
            Erik Bryn
          • Watchers:
            14 Start watching this issue

            Dates

            • Created:
              Updated:

              Development