Unfortunately, this is working "as documented", although it is a
source of endless confusion that init stage only applies to subviews!
I think the init stage API is terrible, but don't think we can revise
it at this point.
On Feb 18, 2008, at 11:12, André Bargull (JIRA)
<[EMAIL PROTECTED]> wrote:
[ http://www.openlaszlo.org/jira/browse/LPP-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41575#action_41575
]
André Bargull commented on LPP-3262:
------------------------------------
haha, funny thing!
suppose we've got this smaller testcase:
<canvas debug="true" >
<button id="btnClick" text="Click Me!" />
<view id="foo" initstage="defer" >
<handler name="onclick" reference="btnClick" >
Debug.write( "theView - onclick" );
</handler>
</view>
<view id="bar" initstage="defer" >
<view name="someview" />
<handler name="onclick" reference="btnClick" >
Debug.write( "theView - onclick" );
</handler>
</view>
</canvas>
What happens?
"foo" hasn't got any subviews:
LzNode() -> __LZinstantiationDone() -> __LZcallInit() ->
__LZresolveReferences() //handlers get attached!
"bar" has got a subview:
LzNode() -> createChildren() //stops here
later: completeInstantiation() -> __LZinstantiationDone() ->
__LZcallInit() -> __LZresolveReferences() //finally we get our
handlers!
I guess I'd change the semantics of "defer"-initstage:
if you set initstage to "defer" on a view without subviews, the view
shouldn't get initiated until completeInstantiation was called, like
for a view _with_ subviews.
Handlers doesn't work with nested views and initstage="defer"
-------------------------------------------------------------
Key: LPP-3262
URL: http://www.openlaszlo.org/jira/browse/LPP-3262
Project: OpenLaszlo
Issue Type: Bug
Components: Laszlo Foundation Classes (LFC)
Affects Versions: 3.3.3
Reporter: André Bargull
Assignee: P T Withington
Priority: P1
Fix For: DingDong
Attachments: handler.lzx
Handlers doesn't work if they are placed in nested views and their
parent-views have initstage="defer". The same goes for
defaultplacement.
So it is very frustrating for users, if they can define a handler
on a normal view with initstage="defer", but not i.e. on a list,
because a list uses defaultplacement.
TestCase is attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: http://www.openlaszlo.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira