Couple of errors i found in the lib

Legacy support with Phidget21
Fresh meat
Posts: 1
Joined: Fri Sep 28, 2012 2:08 pm

Couple of errors i found in the lib

Postby donjao » Fri Sep 28, 2012 2:27 pm

I'm using FDT which inspects the code for possible errors and here are my findings:

Used this library: ...

1. com.phidget.PhidgetLED method getDiscreteLED() tries to access undeclared constant: com.phidgets.Constants.PUNK_DBL

2. com.phidget.Constants const Phid_ErrorDescriptions uses undeclared fields between commas [,,,] where it should be [null,null,null,null]. I know it will compile, but it's better to make compiler happy.

3. Lots of missing semicolons.

4. Many of the imports are unused.

5. com.phidget.Phidget method onPhidgetData invokes unescape method for declaring a `label` variable, which is never used.

Code: Select all

var label:String = _phidgetSocket.unescape(dataArray[3]);

For those who are interested in cleaner code i've attached it to the thread. But keep in mind that in this cleaned code PhidgetLED::getDiscreteLED(index:int):int will always return 0. I made it on purpose to avoid an exception.

(32.93 KiB) Downloaded 333 times

Return to “ActionScript 3.0 - Flash CS3 / Flex / AIR”

Who is online

Users browsing this forum: No registered users and 3 guests