NappDrawer icon indicating copy to clipboard operation
NappDrawer copied to clipboard

setRightWindow does Not work

Open nitrag opened this issue 8 years ago • 2 comments

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 avatar Nov 25 '15 16:11 nitrag

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?

nitrag avatar Nov 25 '15 17:11 nitrag

Did you ever find a work around for this?

SeanMaraj avatar Sep 05 '18 19:09 SeanMaraj