Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Smugrik
Posts: 185
Registered: ‎04-05-2011
My Device: PlayBook
My Carrier: Bouygues Telecom

QNX classes vs standard flash classes

Hi,

 

I developed a PlayBook app using the classes from the qnx packages qnx.ui.display.Image, qnx.ui.core.UIComponent, qnx.ui.buttons.Button and a few others.

 

Now I am planning to port my app to android, iPhone and desktop, for this I believe I need to revert the qnx packages to the standard flash packages.

 

I hope it will be enough to just change the imports, I'd appreciate if somebody could confirm this.

 

Now the question is if the classes are equivalent then why would we use the qnx packages at all instead of the flash packages, it only forces us to modify the code, I understand there would be specific classes for the PlayBook-specific things (bevel gestures for example) but why UIComponent, Buttons etc??

 

Is there some optimization? What do we gain using qnx instead of standard flash?

 

Thanks

Julien
Web: smugrik.org Follow: @Smugrik
PlayBook apps:
OSCream
kiPass
Please use plain text.
Developer
Smugrik
Posts: 185
Registered: ‎04-05-2011
My Device: PlayBook
My Carrier: Bouygues Telecom

Re: QNX classes vs standard flash classes

In this post, FuzzDog mentions it is possible to import some of the qnx classes to Android or iPhone port by adding the qnx-screen.swc to the path, but then why would we do that?

Julien
Web: smugrik.org Follow: @Smugrik
PlayBook apps:
OSCream
kiPass
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: QNX classes vs standard flash classes

I'm nearly certain they are not equivalent to anything, so just changing the imports would not work if I'm right.

They should work on other platforms, however, and I'm also fairly sure someone from QNX stated that clearly in the past, or maybe Mark Sohm did.

The one thing I don't think I've seen confirmed, however, is what license that code is released under. It's quite possible that although technically you could use it on other platforms, legally you could not. I don't recall anything about that one way or the other, but a thorough reading of the SDK license agreement and such would likely clarify it.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
shawnblais
Posts: 439
Registered: ‎10-25-2010
My Device: Not Specified

Re: QNX classes vs standard flash classes

[ Edited ]

90% of QNX components work fine on Android and iOS, they are simply pure AS3 components. If it compiles on desktop, it will compile on any AIR platform.

 

You just need to watch our for the ones with System hooks, ie PPSChannel dependnancies (but these will blow up when instanciated on desktop, so it's obvious)

 

Oh, and Peter is right, changing imports will never work, unless by some miracle the API is exactly the same as some other class. 

Please use plain text.