PDA

View Full Version : My first ST2.0 plugin : MessageBox aka (native popup for everyone)



olouvignes
26 Nov 2011, 7:39 AM
MessageBox is a plugin that overrides `Ext.MessageBox` class from core.

The idea is to provide equivalent native implementation when available.
But you should not have to rewrite a single line of code:

I've written a phonegap plugin that does exactly that for Phonegap!

https://github.com/mgcrea/phonegap-plugins/tree/master/iPhone/MessageBox

There is a pull request ongoing so that it can join the official plugin repo.

You can find the sencha-touch plugin below :

https://github.com/mgcrea/sencha-touch-plugins/blob/master/PhonegapMessageBox.js

Hope it helps,
Regards,
Olivier

mitchellsimoens
27 Nov 2011, 6:56 AM
I wouldn't have used the Ext.plugin namespace. What happens if we start using that namespace and now you could have a conflict. (Yes, we will be starting off with two plugins available in the library) Most people use the Ext.ux namespace.

olouvignes
27 Nov 2011, 11:43 AM
Didn't know that, i've switched to Ext.ux instead. thanks.