Flex 2.0.1 SDK Hotfix 1 (bug fix)

Adobe just released an update for Flex 2.0.1 SDK, download it from http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=kb401224

Flex 2.0.1 SDK hotfix 1 (build 159086) is a collection of bug fixes that have been completed since the Flex 2.0.1 release on January 5, 2007. This hotfix release is being made available to Flex customers who are experiencing any of the issues described in this document and require the provided bug fixes. Installation of this hotfix release is not recommended for customers who are not experiencing one of the described issues.

Cell Renderers
192854 itemEditors on DataGrid don’t correctly commit data when dragEnable=true
192558 Combo renderer in a DataGrid causes problems on the DataGrid scroll
DataGrid
193316 DataGrid with headerRenderer and selectedIndices becomes uneditable
194284 DataGrid incorrectly focuses hScrollbar
194311 After clearing data from DataGrid, RTE occurs
183325 When set verticalScrollPolicy=”off” in datagrid, can’t move up/down to show more rows
192117 DataGrid whose width depends on the size change of Browser gets RTE
196149 DataGrid with lockedColumnCount incorrectly displays using vScrollbar
193106 Horizontal scrolling DataGrid cannot display the updated width
194972 DataGridColumn visibility=false doesn’t work (when set in mxml)
192466 The width of the last 2 columns is displayed narrower after horizontal scrolling
193641 If you resize the player window with a DataGrid with width=100%, the DataGrid’s last column continues to grow rather than showing more columns
192695 After horizontal scrolling, changing the width of DG updates the width of incorrect column
192694 Changing the width of DataGrid that is disappeared gets error (RTE)
192728 Using an itemRenderer as an editor may not update the dataProvider
195589 DataGrid with horizontalScrollPolicy cell and width behavior changed
193319 Change event doesn’t occur when moving the line using Enter and Tab key on DataGrid
195389 Tab key is functional even if scrollbar is focused
Debugging (Macintosh only)
193086 Once RTE is thrown and debug session is selected to be terminated, closing browser window does not let FB release debug session
Other
193354 CollectionChangeEventKind in CollectEvent.COLLECTION_CHANGE incorrect
192765 If you use MenuBar.dataDescriptor.setEnabled(…) on a top level item of a MenuBar, the item is not changed
126610 Binding to a static variable gives warning Unable to detect changes to ‘var’ and does not show changes
193102 Parent window becomes available after close grandchild Popup
194872 Update PhotoViewer sample README.html file with the additional compiler arguments needed to compile
Tree
192365 Selecting a node then collapsing its grandparent doesn’t move selection up to the grandparent
192347 RTE when tweening occurred while opening nodes in Tree (in Flex Explorer sample)

BTW, it seems they haven’t fixed the Nullpointer exception caused by invalid xmllists..

mxmlc NullPointerException crash

Today I was getting crazy to find out why Flex didn’t want to compile my application.. Clicking on compile it started suddenly to give me an internal compile error and nothing else. So i tried to compile with the mxmlc from a console just to see the error log and the outpuw was:
java.lang.NullPointerException
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:891)
at macromedia.asc.parser.BinaryExpressionNode.evaluate(BinaryExpressionNode.java:38)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:890)
at macromedia.asc.parser.BinaryExpressionNode.evaluate(BinaryExpressionNode.java:38)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:891)
at macromedia.asc.parser.BinaryExpressionNode.evaluate(BinaryExpressionNode.java:38)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:890)
at macromedia.asc.parser.BinaryExpressionNode.evaluate(BinaryExpressionNode.java:38)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:962)
at macromedia.asc.parser.ListNode.evaluate(ListNode.java:27)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:5859)
at macromedia.asc.parser.LiteralXMLNode.evaluate(LiteralXMLNode.java:28)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:3087)
at macromedia.asc.parser.VariableBindingNode.evaluate(VariableBindingNode.java:48)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:962)
at macromedia.asc.parser.ListNode.evaluate(ListNode.java:27)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:2897)
at macromedia.asc.parser.VariableDefinitionNode.evaluate(VariableDefinitionNode.java:32)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:4629)
at macromedia.asc.parser.ClassDefinitionNode.evaluate(ClassDefinitionNode.java:86)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:938)
at macromedia.asc.parser.ArgumentListNode.evaluate(ArgumentListNode.java:28)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:750)
at macromedia.asc.parser.SetExpressionNode.evaluate(SetExpressionNode.java:39)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:580)
at macromedia.asc.parser.MemberExpressionNode.evaluate(MemberExpressionNode.java:31)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:1273)
at macromedia.asc.parser.ExpressionStatementNode.evaluate(ExpressionStatementNode.java:33)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:4407)
at macromedia.asc.parser.ClassDefinitionNode.evaluate(ClassDefinitionNode.java:86)
at macromedia.asc.semantics.FlowAnalyzer.evaluate(FlowAnalyzer.java:2577)
at macromedia.asc.parser.ProgramNode.evaluate(ProgramNode.java:63)
at flex2.compiler.as3.Compiler.analyze2(Compiler.java:436)
at flex2.compiler.mxml.InterfaceCompiler.analyze2(InterfaceCompiler.java:337)
at flex2.compiler.mxml.Compiler.analyze2(Compiler.java:130)
at flex2.compiler.API.analyze(API.java:2360)
at flex2.compiler.API.analyze(API.java:2275)
at flex2.compiler.API.batch2(API.java:337)
at flex2.compiler.API.batch(API.java:1025)
at flex2.compiler.API.compile(API.java:1211)
at flex2.compiler.API.compile(API.java:1114)
at flex2.tools.Compiler.main(Compiler.java:222)

Wow!!
So, how can I find the problem? I can’t find any useful information from this log..
For this reason I had to remove portion of code from my mxml and from all the imported packages.. 2 hours of “debugging” gave me the solution!

A syntax error in a declaration of an XMLList was the problem!  Fixed the line also the compiler started to run again with no problems.

This is a portion of mxml code to reproduce the problem:
;

< ![CDATA[ private var uuid:String = ""; private var menubarXML:XMLList = <>
<>;
]]>

Strange issue with Flash Updater 7.2

I got this very strange behavior (let me say BUG) with the new flash updated version 7.2, and which drove me crazy for a while!

Create a new document, settings set to flash player 7 and AS2.
Create in the document a movieclip with exporting settings, export for ActionScript, and give the name “mc”. Delete the movieclip from the timeline.
try the code:

depth = _root.getNextHighestDepth()
trace(depth);
_root.attachMovie('mc','mc',depth)
mc.onRelease = function(){
this.removeMovieClip();
}

you will get a “0” in the trace output and once click on the movieclip, this will disappear.

NOW.
Drag a component on the stage, for example the tree component, and then delete it from the timeline. This is just in order to have it into the library.
Test the movie again.

I get in the trace output the value of “1048576” and the movieclip does not disappear now!

incredible!

undefined toString??

One of the things that it has always made me laugh on the new Flash AS2 is the translation of the undefined value (mmhh.. not a value, it’s undefined!).

a = undefined;trace(a.toString()) // undefined

b = a + " is not a string"trace(b) // "undefined is not a string"

???
Probably I don’t yet understand the strict data typing concept (quite sure), but undefined CAN’T be converted to "undefined".
It’s so Stupid for me!