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
Developer
mdd
Posts: 225
Registered: ‎01-17-2012
My Device: PB
Accepted Solution

BB10 mx.utils

using latest BB10 SDK in FB 4.6:

import mx.utils.UIDUtil;

not found/missing

 

has mx.utils moved, or do I need to add a SWC to the build path?

 

Regards,

Retired
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook

Re: BB10 mx.utils

This is a Flex class. 

 

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/utils/UIDUtil.html 

 

Make sure you are pointing to the proper Flex SDK in your library build path if you would like to use this API

 

Regards,

Dustin

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Developer
Developer
mdd
Posts: 225
Registered: ‎01-17-2012
My Device: PB

Re: BB10 mx.utils

Dustin;

 

I'm aware its a Flex class.  I am using Flex 4.6.0/FB 4.6 (because Adobe hasn't answered my request for a complimentarry upgrade).

 

In other projects that use Flex 4.6.0 in the same workspace, the build path includes more than a dozen swc's.  In my BB10 app, only 5 swc's are included and mx.utils isn't found.

 

So, which swc contains mx.utils.  I don't recall having to manually add extra swc's previously.

 

Regards,

Retired
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook

Re: BB10 mx.utils

I'm not sure the exact swc but the location for them is:

 

[Flash builder install dir]\sdks\4.6.0\frameworks\libs

 

You wouldn't have to add them if you created a Flex Mobile project. If you created an AIR mobile project it won't add the Flex classes by default.

 

Cheers,

Dustin

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Developer
Developer
mdd
Posts: 225
Registered: ‎01-17-2012
My Device: PB

Re: BB10 mx.utils

Dustin;

 

Thanks for the info.  I never know if I should be using AIR or Flex...

 

Anyway, found the swc's and can now complile again...

 

Regards,

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

Re: BB10 mx.utils

no sooner did I post, Adobe sent the link for FB 4.7.  Maybe thanks to Dustin...

 

Anyway, followed the great docs, posted earlier by Dustin, installed BB10 Gold.

 

Then, imported my existing FB4.6 projects into FB4.7:

   - libraries stayed as Flex 4.6.0, BUT

   - apps were converted to AIR 4.6.0, and have lots of errors:

        import qnx.fuse.ui.text.*

        [Embed (source=...

 

where did I go wrong?

Retired
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook

Re: BB10 mx.utils

[ Edited ]

"import qnx.fuse.ui.text.*;" - should work fine. FB4.7 will give you a warning though that that your not using it in your app. I recommend just importing the classes that you're actually using.

 

"[Embed (source=..." - FB4.7 changed the way that they handle embeds. Have a look at this thread on the Adobe forums for more info - http://forums.adobe.com/thread/1062413?tstart=0 

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Developer
Developer
mdd
Posts: 225
Registered: ‎01-17-2012
My Device: PB

Re: BB10 mx.utils

great to know - thx

 

I deleted AIR 4.6 from the build path, then added the Flex 4.6.0 SDK and that seems to work - at least no compile errors.

 

Should I convert to AIR or try to stay with Flex?  Also: what about mixing AIR app with Flex libs???

 

Regards,

 

Mark

Retired
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook

Re: BB10 mx.utils

It's up to you and what your app is trying to accomplish :smileyhappy: 

 

I've only ever done AIR only apps but that's just how I like to code.

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Developer
Developer
mdd
Posts: 225
Registered: ‎01-17-2012
My Device: PB

Re: BB10 mx.utils

Dustin;

 

If my app is AIR 4.6 and my library is Flex 4.6, when launched on simulator, app crashes immediately/no consol output.

 

If I try to make an ActionScript library instead, none of the qnx/ANE's are found.  Even adding them manually does not work.

 

1. What kind of project should I use for a library compatible with AIR 4.6?

 

Regards,