Copy link to clipboard
Copied
This is a cross post from http://forums.adobe.com/message/4993660/ We didn't get an answer there and this issue, and similar discrepencies between what the IDE can compile and what will run on a device, have been costing us man days in work.
We recently had a problem where when compiling using FB and debugging on devices works fine. But when we built the app using Ant, it was crashing on Android devices. After debugging that, we found that Number.floor was not a function.
I cannot find any documentaiton that says Number.floor was ever a function in ActionScript/Flex/AIR.
So why does Flash Builder seem to think it's valid, let us compile it, and even run it on the device?! Is there some 'even more strict' compiler option I need to check?
i reported the problem for the next version of Flash pro and Flash builder.
it appears the bug was introducted in flash player 11.3. earlier fp versions correctly identify errors when applying Math class methods and properties to the Number class.
Copy link to clipboard
Copied
i've never heard of Number.floor. where is documentation for that?
you probably want to use Math.floor()
Copy link to clipboard
Copied
That's the point. Number.floor isn't a function. There is no documentation of it. I can't find any occurance of it online. But the Flash Builder IDE allows it without any red flags. And it compiles fine. It just ends up crashing the device when those functions get called. This makes me terrified to code anything in Flash Builder. I can't trust it when it lets us write broken code.
Copy link to clipboard
Copied
it works in the flash ide, too.
in fact, using Number dot triggers code completion with exactly the same methods as the Math class and everything seems to work correctly (in the ide).
Copy link to clipboard
Copied
Yup. And then it crashes on the device.
Copy link to clipboard
Copied
i reported the problem for the next version of Flash pro and Flash builder.
it appears the bug was introducted in flash player 11.3. earlier fp versions correctly identify errors when applying Math class methods and properties to the Number class.
Copy link to clipboard
Copied
Great! Thanks for that. There's more too. Like this... Looks and works great in FB, but dies on the command line. What's going on here?
class CallbackInfo extends Object { public var requestID:int; public var callback:Function; public var userData:Object; } package framework { class Moo extends Object { } }
Produces this output over the command line:
[mxmlc] Loading configuration file /Flex_4.6.0_Air_3.5/frameworks/airmobile-config.xml [mxmlc] Loading configuration file /client/config_dev.xml [mxmlc] /client/src/framework/EASPProxy.as(27): col: 1 Error: Syntax error: package is unexpected. [mxmlc] [mxmlc] package framework [mxmlc] ^ [mxmlc]
Copy link to clipboard
Copied
that's not a correctly formatted class file.
to start, there can be, at most, one externally visible class in a class file. then, the package designation should encompass the class and indicate the directory when the class file is stored.
Copy link to clipboard
Copied
Yup. Again, I know. It compiles fine in the IDE. But not over command line.
Copy link to clipboard
Copied
that wouldn't compile in the flash ide (which is the compiler i use).
you may (or may not) get more flash builder responders at: http://forums.adobe.com/community/flash_builder/using_flash_builder
Copy link to clipboard
Copied
Ok, that one was a bit different than the other issues we've had. Thanks for your help with this.
Are we doing something wrong? Should we have some different compiler settings in the IDE? We keep running into this issue. Having a private member variable that conflicts with the name of a public variable in a base class causes the following error. But only over the command line and not in the IDE.
/src/framework/controls/Carousel.as(24): col: 15 Error: A conflict exists with inherited definition feathers.controls:List.paddingLeft in namespace public.
private var paddingLeft:Number;
Copy link to clipboard
Copied
with flash pro, you should tick warnings mode, strict mode and "permit debugging".
Find more inspiration, events, and resources on the new Adobe Community
Explore Now