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

Key: LPP-3923
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: -- --
Assignee: Unassigned
Reporter: Philip Romanik
Votes: 0
Watchers: 0
Operations

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

DHTML window: Opening a window with no explicit parent argument generates an error

Created: 30/Apr/07 08:42 AM   Updated: 21/Jan/08 02:12 PM
Component/s: Components - LZ
Affects Version/s: 4.0.0
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

Environment: I verified this in FF and IE.

Severity: Minor
Fixed in Change#: 5,199
Runtime: N/A
Fix in hand: False


 Description  « Hide
This app works fine in swf. However, in dhtml it generates a runtime error.

<canvas>
<simplelayout axis="y"/>
<button text="Open Window" onclick="new mywindow();"/>

<class name="mywindow" extends="window" width="400" height="300" closeable="true" resizable="true">
    <vscrollbar/>
    <hscrollbar/>
    <method name="close">
        this.destroy();
    </method>
</class>

</canvas>


The window example, http://localhost:8080/legals/examples/components/window_example.lzx?lzr=dhtml, works fine. I think the error is because my app doesn't pass a parent object when constructing the window. The window_example.lzx code does this:

        <button text="new simple window"
            onclick="new lz.window(canvas,{title:'new', name:'anon',
                    width:100, height:100, resizable:true, closeable:true})" />




 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
P T Withington - 09/May/07 11:25 AM
[14:23] maxlaszlo: assign to phil3?
[14:23] maxlaszlo: k
[14:23] maxlaszlo: (philr)
[14:23] frisco: Phil 3?
[14:23] p7w: k
[14:23] p7w: 3923 -> pbr
[14:23] p7w: Done
[14:23] maxlaszlo: (phil337)

Philip Romanik - 24/May/07 06:03 AM
Change 20070523-Philip-6 by Philip@Philip-DC on 2007-05-23 10:29:23 EST
   in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/branches/legals
   for http://svn.openlaszlo.org/openlaszlo/branches/legals

Summary: Calls to 'new window()' now work in dhtml

New Features:

Bugs Fixed: LPP-3923

Technical Reviewer: jcrowley
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
The window component requires a valid parent object. Calling
super.construct() makes sure that 'this.parent' is valid. The other
change is to use 'this.parent'
instead of what was passed to construct(). Calls to 'new window()' in dhtml now
work.

Tests:
Run test in LPP-3923 in swf and dhtml
http://localhost:8080/legals/examples/components/window_example.lzx in
dhtml and swf

Files:
M lps/components/base/basewindow.lzx

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070523-Philip-6.tar

Mamye Kratt - 28/Jun/07 06:47 PM
(4.0 branch (4.0.3) local build r5544)
ran /examples/components/window_example.lzx
and example in the bug successfully in dhtml and swf.

Mamye Kratt - 28/Jun/07 06:47 PM
Needs to be tested in legals.

Mamye Kratt - 17/Jul/07 12:08 PM
Need to test in legals.

Mamye Kratt - 21/Jan/08 02:12 PM
(trunk 4 local build r7775)

Ran examples/components/window_example.lzx in swf and dhtml successfully.
Ran example in description in swf and dhtml successfully.