History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-6943
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: P0 P0
Assignee: André Bargull
Reporter: Henry Minsky
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Bug in grid component or component manager in swf9

Created: 06/Sep/08 09:17 PM   Updated: 27/Oct/08 10:45 AM
Component/s: Components - grid
Affects Version/s: KrispyKreme (4.2 Beta)
Fix Version/s: Dunkin (4.2b3)

Time Tracking:
Not Specified

Severity: Minor
Runtime: SWF9
Fix in hand: False


 Description  « Hide
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»


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
André Bargull - 27/Sep/08 05:48 AM
Works after LPP-7058/LPP-7079 are resolved.

André Bargull - 27/Sep/08 07:05 AM
Henry, are you still able to reproduce the first issue? If you're able to do it (because I cannot), is there any specific order in which you need to click on the views, etc?

André Bargull - 27/Oct/08 10:45 AM
Fixed, see LPP-7058/LPP-7079.