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
apman
Posts: 194
Registered: ‎11-12-2010
My Device: Not Specified
Accepted Solution

Migration guide for PlayBook to BB10 ...?

I just decided to bite the bullet and start working on porting my app to BB10. Considering that compiled with the tablet 2.0 SDK it runs flawlessly on my Dev Alpha device, it seems a bit disheartening how many errors Flash Builder now shows me that I switched to the 3.0 (BB10) SDK.

 

Is there maybe some kind of list where you can look up recommended alternatives for all the discontinued Classes? (The AS3 reference always had this "Migration" category at the bottom of the packages list where you could look up old AS2 commands ... - something like that anywhere?)

 

I actually just figured out that I can make all the errors go away by adding some .swc's from tablet-sdk-2.0 that don't exist in 3.0 to the build path, yeah!. But I don't really know what I'm doing :Wacko: - is that maybe something 'bad'? as in bad practice? does it mean that my app will stop working without warning when RIM pulls the plug on support for those old .swc's (and of course I will have long forgotten that I compiled them in ...)?

 

Sorry - I guess these are more programming fundamentals than actual AIR questions, but any hints would be very welcome!

 

Thanks

Anna

 


My app : Get set - Get up!   Get ready for the snooze revolution.

Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course

Re: Migration guide for PlayBook to BB10 ...?

[ Edited ]

If you don't need SDK 3.0 features, you could stick with 2.0 if you prefer. That runs just fine on BB10. I wouldn't mix SDK versions in one app - that's bound to cause trouble unless you know exactly what you're doing.

 

First, I'd check out the release notes for 3.0 beta 3:

https://developer.blackberry.com/air/documentation/bb10/bb10_air_sdk_rn_3.0beta_2010852_11.html

 

I'm not sure if these release notes also cover SDK 3 beta 2 and beta 1, and can't seem to find those release notes online anymore... Perhaps someone has them on file?

 

I'd also check out Julian Dolce's session (JAM64) from BBJam:

http://hosting.desire2learncapture.com/RIM/1/watch/62.aspx

 

If you still run into trouble, try searching this forum board. Many of the issues have been covered already. Most are just classes that have moved, have been renamed or need a .swc or .ane to be included.

 

Note that SDK v3 apps will not run on PlayBook, for the time being until PB also runs BB10. You'll need separate projects in FB, or do some advanced magic with conditional defines and build scripts.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Developer
apman
Posts: 194
Registered: ‎11-12-2010
My Device: Not Specified

Re: Migration guide for PlayBook to BB10 ...?

Thanks Jon, that's really helpful info! (I don't *need* SDK 3.0 features, but I want to use one of them to get 'Built for BB' certification)

 

BTW, when I cmpile my app with SDK 3.0 plus qnx-screen.swc and qnxtext.swc in the build path it actually does run fine on my PlayBook (as well as the Dev Alpha), which made that solution so tempting. But I understand that it's a hack inviting trouble - so I'll check out your links and hunt down the missing classes.

 

Thanks

Anna

 


My app : Get set - Get up!   Get ready for the snooze revolution.  

(Now also available in Dutch :smileyhappy: )

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Migration guide for PlayBook to BB10 ...?

Other than API, you need to include two ANE for device and skins. You also need to go to fuse API. It is a little bumpy, but it only took 2 days to get our large app over to SDK 3. It is still a good idea to move over to SDK3 since that will be the basis when it comes over to the PlayBook early next year.
Developer
apman
Posts: 194
Registered: ‎11-12-2010
My Device: Not Specified

Re: Migration guide for PlayBook to BB10 ...?

Thanks, I'll start reading up on ANE's and the fuse packages - probably about time, anyway  :-)

 

 


My app : Get set - Get up!   Get ready for the snooze revolution.

 

Developer
Developer
mdd
Posts: 225
Registered: ‎01-17-2012
My Device: PB

Re: Migration guide for PlayBook to BB10 ...?

I too am converting to fuse and BB 10 and finding it quite tedious, especially changing all the flash.text to qnx.ui.text...

 

Anyway, after getting a clean compile, I am running on the DevAlpha simulator: I can't seem to get it into landscape mode and when I run my app:

VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found.

 

The splash screen is specified in the blackberry-tablet.xml and is 1024 x 600, but nothing appears, so wondering if that is the problem...

 

Suggestions appreciated.

 

Regards,

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Migration guide for PlayBook to BB10 ...?

Did you create a new project or just go against the new SDK? Did you create a "Flex Project" to get the MX framework?
Developer
Developer
mdd
Posts: 225
Registered: ‎01-17-2012
My Device: PB

Re: Migration guide for PlayBook to BB10 ...?

I have a distinct project (started long ago to convert to fuse).

 

I don't use MX framework AFAIK...

 

anyway, seems that this is caused by not checking the "package" in the ANE screen - (very intuitive).  At least, I can now start debugging/redoing all my layouts...  I cannot imagine how you did a large app so quickly...

 

Regards,

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Migration guide for PlayBook to BB10 ...?

AIR makes it pretty easy. I don't think this app could be done in the other environments in the same time frame.
Developer
Developer
mdd
Posts: 225
Registered: ‎01-17-2012
My Device: PB

Re: Migration guide for PlayBook to BB10 ...?

Using fuse layouts is proving really tedious.  My latest discovery:

 

getChildByName doesn't work (presumably due to the intervening scroller), but if you walk through the children using getChildAt, the scroller is invisible and you can find the child by name.

 

Also, the parent of a component in a Container, is the scroller so you can't use its name for tracing...

 

So the scroller is only partially invisible...

 

Regards,