Closed navidmirzaie closed 8 years ago
Although..
var myInstance = Alloy.createWidget('nl.fokkezb.loading', 'window');
myInstance.show('My message', myCancelCallback);
Looks fine and should work https://github.com/FokkeZB/nl.fokkezb.loading/blob/master/controllers/window.js#L63
If you already have a global instance like you said
Alloy.Globals.loading = Alloy.createWidget("nl.fokkezb.loading");
Then why not just do:
Alloy.Globals.loading.show('My message', myCancelCallback);
I Already got it working on with the view way. In register js i required the widget and made the global var that refrenced the instance of the widget and in the facebookbtn called it.
I checked your source and the way you documented should indeed work. But i think it is because i have a modal window.
Tnx Fokke.
Yes indeed, in a modal window you need the view, since no window will open over a modal one.
Hi Fokke , great widget you have here, much better then the default indicator. I only have a question i red your documentation but i couldn't figure out how to use it. I want to add the indicator in my module but i couldn't figure out how to do it.
Ive made the global loading var in Alloy like you mentioned: Alloy.Globals.loading = Alloy.createWidget("nl.fokkezb.loading");
But when i want to show the progress bar in my module it doesn't show up. Below example of my code.
FacebookBtn.js
Im using the above code in the following js file: register.js
It would be great if i can get some help from you. Tnx in advanced.