If you run /examples/components/grid_example.lzx?lzr=swf9&debug=true
and click the mouse on the row with "Emily Dickinson", then click again, you get this runtime error in swf9
TypeError: Error #1010: A term is undefined and has no properties.
at $lzc$class__componentmanager/checkDefault()[/Users/hqm/openlaszlo/lib/jakarta-tomcat-5.0.30/temp/lzswf9/lzgen33715/$lzc$class__componentmanager.as:217]
at Function/
http://adobe.com/AS3/2006/builtin::call()
at LzEvent/sendEvent()[/private/tmp/lzswf9/lzgen63782/LzEvent.as:87]
at LzFocusService/setFocus()[/private/tmp/lzswf9/lzgen63782/LzFocusService.as:155]
at LzFocusService/setFocus()[/private/tmp/lzswf9/lzgen63782/LzFocusService.as:149]
at LzFocusService/setFocus()[/private/tmp/lzswf9/lzgen63782/LzFocusService.as:149]
at LzFocusService/__LZcheckFocusChange()[/private/tmp/lzswf9/lzgen63782/LzFocusService.as:71]
at LzModeManagerService/handleMouseEvent()[/private/tmp/lzswf9/lzgen63782/LzModeManagerService.as:133]
at LzModeManagerService/rawMouseEvent()[/private/tmp/lzswf9/lzgen63782/LzModeManagerService.as:199]
at LzMouseKernel$/__sendEvent()[/private/tmp/lzswf9/lzgen63782/LzMouseKernel.as:14]
at LzSprite/__mouseEvent()[/private/tmp/lzswf9/lzgen63782/LzSprite.as:343]
Now, apply this patch to get you past that error and to print a message to the debugger when the focus changes:
Index: componentmanager.lzx
===================================================================
--- componentmanager.lzx (revision 10908)
+++ componentmanager.lzx (working copy)
@@ -168,10 +168,11 @@
<method name="checkDefault" args="who">
<![CDATA[
- if ( ! ( who instanceof lz.basecomponent ) ||
+ Debug.write('who =', who);
+ if ( ! ( who is lz.basecomponent ) ||
! who.doesenter ){
- if ( ( who instanceof lz.inputtext ) &&
+ if ( ( who is lz.inputtext ) &&
who.multiline ){
who = null;
} else {
Then, there will be another runtime error when you try to edit the text field. That can be worked around by making this patch
Index: gridtext.lzx
===================================================================
--- gridtext.lzx (revision 10908)
+++ gridtext.lzx (working copy)
@@ -102,7 +102,7 @@
</text>
<state pooling="true" applied="${parent.editing}"
- onremove="parent.editbox.datapath.updateData()">
+ onremove="if (parent.editbox) { parent.editbox.datapath.updateData(); }">
<edittext datapath="$once{parent.parent.rowdp}"
name="editbox" width="${parent.width}" visibility="visible" >
<method name="init">
But there is still an error when trying to edit a text field in the row.
If you compare the debugger messages when running the app in swf8 vs swf9, you see this difference; in swf9, an extra
focus event is sent when you lift the mouse button up, that does not happen in swf8
swf9:
who = [object $lzc$class__internalinputtext_$lz$2Fedittext$2Elzx_160_48]
who = [object $lzc$class_grid]
whereas in swf8 you only see this on mouse down, and nothing printed on mouseup:
who = «lz._internalinputtext_$lz$2Fedittext$2Elzx_160_48#31| .field»
LPP-7058/LPP-7079are resolved.