Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-16782] Window refactor and extras #218

Merged
merged 2 commits into from May 5, 2014

Conversation

pec1985
Copy link
Contributor

@pec1985 pec1985 commented May 1, 2014

Refactored:

  • Ti.UI.Window
  • Ti.UI.AlertDialog
  • Ti.UI.TabGroup
  • Ti.UI.Tab

Fixed:

  • Events on Window, TabGroup, and Tab - open, close, focus, and blur
  • AlertDialog was not getting garbage collected
  • Garbage Collection - App would crash randomly when GC kicked in.

Jira tickets TIMOB-16782

@ssaracut
Copy link

ssaracut commented May 2, 2014

Something is wrong with the setters... TableView.setData, Label.setText all crash with not a function error. Strange though because it works enough to load some data but as soon as you start navigating a few screens it pops up. Using the latest in Master though I have no issue.

@pec1985
Copy link
Contributor Author

pec1985 commented May 2, 2014

I can reproduce that like so:

var masterWindow = Ti.UI.createWindow({
    title : 'Master Window',
    barColor : '#000000',
    backgroundColor : 'green'
});

var tabgroup = Ti.UI.createTabGroup();
var tab = Ti.UI.createTab({
    window: masterWindow
});
tabgroup.addTab(tab);

tabgroup.open();

var btnOpen = Ti.UI.createButton({
    title : 'Open'
});

btnOpen.addEventListener('click', function() {

    var detailWindow = Ti.UI.createWindow({
        title : 'Detail Window',
        backgroundColor : '#ffffff'
    });
    var label = Ti.UI.createLabel({
        width: 300,
        height: 30,
        text: 'Hello'
    });
    detailWindow.add(label);
    detailWindow.addAction({
        title:'here',
        callback: function(){
            label.setText('Hello World');
        }
    });

    tab.open(detailWindow);
});
masterWindow.add(btnOpen);

And then clicking twice on the action item. Try using the property setters/getters instead of methods, i.e.: label.text = 'hello world';

pec1985 added a commit that referenced this pull request May 5, 2014
[TIMOB-16782] Window refactor and extras
@pec1985 pec1985 merged commit cd26a61 into appcelerator-archive:master May 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants