viezel / NappDrawer

A side drawer navigation container view controller for Appcelerator Titanium.
MIT License
247 stars 128 forks source link

setRightWindow does Not work #188

Open nitrag opened 9 years ago

nitrag commented 9 years ago

I load the right window on init. Then later in my app I want to replace it.

var filterWin;
function toggleRight(){
    if(!filterWin){
        filterWin = Ti.UI.createWindow({height: Ti.UI.FILL, width: Ti.UI.FILL, module: "xp.ui", role: "rightWindow", backgroundColor: 'blue'});
        $.drawer.setRightWindow(filterWin);
    }
    $.drawer.toggleRightWindow();
    Ti.API.info("Filter clicked");  
}

Added debug code: https://github.com/nitrag/NappDrawer/blob/master/ios/Classes/DkNappDrawerDrawer.m#L264-L268

Result of console:

...
[DEBUG] Clearing Right Window
[INFO]  Filter clicked
(((locked up here, no other debug messages, other drawer function no longer work)))
nitrag commented 9 years ago

It appears it is breaking because of this:

https://github.com/nitrag/NappDrawer/blob/master/ios/Classes/DkNappDrawerDrawer.m#L262

if([TiUtils boolValue:args] == 0 ){

Can we rework this? What's a better method to determine if args is a Titanium Window?

SeanMaraj commented 6 years ago

Did you ever find a work around for this?