road0001 / tweener

Automatically exported from code.google.com/p/tweener
0 stars 0 forks source link

trunk/AS3 syntax faux pas #36

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
There are a number of easy to fix syntax issue in trunk/as3 (which have existed 
for many 
commits now). Most are simple fixes - nothing huge but definitely worth fixing 
since they 
produce warnings depending on your editor/parser of choice (FB/FDT/etc) which 
make it more 
difficult for those uber-anal to detect early warnings in true project code:

AuxFunctions.as [r5] lines:
  67. for (var pName:String in p_object) totalProperties ++; // Local var never used (no likely fix?)
  85. finalObject[prop] = currentObject[prop] // missing semicolon.

Equations.as [r5] lines:
  37. trace ("Equations is a static class and should not be instantiated.") // missing semicolon
  113,126,139,152,180,193,206,234,247,260,288,301,314,342...etc. (all easing functions): p_params:Object = null // local var never used.

Tweener.as [r5] lines:
  92.  public static function addTween (p_scopes:Object = null, p_parameters:Object = 
null):Boolean { // local var never used.
  729,759,821,834. } catch(e:Error) { // e is defined more than once.
   850. public static function init(p_object:* = null):void { // p_object local var never used.
  1058. var eventScope:Object = Boolean(pTweening.onErrorScope) ? pTweening.onErrorScope : 
pTweening.scope; // local var eventScope never used.

Hopefully this is helpful and quick to get the errors out - or at least not too 
annoying; just 
wanted to do my part to make it strict editor friendly.

Original issue reported on code.google.com by sekati on 18 Mar 2008 at 3:20

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Thanks sekati. It's been a time since I've compiled it under flex's strict 
rules (I
do use CS3 strict but it's a lot less strict than flex sdk).

I've fixed some of the most obvious offenses and updated it to 1.31.71. It's 
actually
strange, the AS3 had some mistakes in parts that were fixed some time ago (ie, 
fixed
on the AS2 version - specially with the error parameter scope var never used 
and the
p_parameters var never used). Nothing too crazy, but strange.

Some of the other errors are kind of insoluble, specially with regards to some
parameters that are never used, without 'forcing' it for no reason. But I'll 
give
them a look. With a rewrite they'll hopefully go away.

Original comment by zisfor...@gmail.com on 24 Mar 2008 at 3:11

GoogleCodeExporter commented 8 years ago
There's a file in the Flash CS3 program directory called EnabledWarnings.xml. 
I've
not tested it myself, but I think you can make the compiler more strict if 
that's
your preference.

On my Windows XP machine, the file is here:
C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\ActionScript
3.0\EnabledWarnings.xml

Original comment by joshtynj...@gmail.com on 15 Apr 2008 at 9:21