atsusy / TiPaperFold

Titanium Mobile module for "PaperFold for iOS"
MIT License
63 stars 21 forks source link

"open" event is never fired #8

Open raulriera opened 12 years ago

raulriera commented 12 years ago

Hi,

Sorry to "nag" you, but I found out that the "open" event is never fired using the paperFold container. There is an issue with Titanium.Map where you can't add "pins" or "overlays" using the commonJS approach, it can be fixed by waiting for the open event to add them, but this event is never fired. More info can be found here https://github.com/benbahrenburg/benCoding.Map/issues/2#issuecomment-7840985

Thoughts?

atsusy commented 12 years ago

PaperFoldView doesn't have open event. PaperFoldView is just a view.

benbahrenburg commented 12 years ago

Hi Raul,

If you look at the sample in TiPaperFold, https://github.com/atsusy/TiPaperFold/blob/master/example/app.js you would need to listen to

window.addEventListener("open", function(e){ paperFoldView.state = module.STATE_RIGHT_UNFOLDED; });

You could also listen to

paperFoldView.addEventListener("stateChanged", function(e){ Ti.API.info("state changed to:"+e.state+" automated:"+e.auto); });

raulriera commented 12 years ago

Thanks guys, but it appears the 2 modules can't live together.. I have been trying non stop every possible scenario and I can't seem to find a way to make the polygons appear inside the paperFold (the function runs, I can see the console giving me the coordinates and everything... but the view is blank.. just the map)

raulriera commented 12 years ago

@atsusy what I meant about the open event is that for the windows (the centerView) in this example, never fires it's "open" event (yet, it displays) even if changing it to a view :(