
| Key: |
LPP-3177
|
| Type: |
Bug
|
| Status: |
Open
|
| Priority: |
--
|
| Assignee: |
Unassigned
|
| Reporter: |
Pablo Kang
|
| Votes: |
0
|
| Watchers: |
2
|
|
If you were logged in you would be able to see more operations.
|
|
|
OpenLaszlo
Created: 30/Nov/06 05:50 PM
Updated: 25/Mar/07 07:09 PM
|
|
| Component/s: |
Compiler
|
| Affects Version/s: |
3.4
|
| Fix Version/s: |
None
|
|
| Severity: |
Major
|
| Runtime: |
N/A
|
| Fix in hand: |
False
|
|
onmousedown, onmouseup, onclick events aren't inherited. Neither is the clickable attribute.
Test case:
<canvas debug="true">
<trait name="mytrait">
<attribute name="clickable" value="true"/>
<handler name="onmousedown">
Debug.write('mousedown');
</handler>
<handler name="onmouseup">
Debug.write('mouseup');
</handler>
<handler name="onclick">
Debug.write('click');
</handler>
</trait>
<class name="myview" traits="mytrait" width="50" height="50" />
<simplelayout />
<myview id="blueview" bgcolor="blue" />
<myview id="tealview" bgcolor="teal" clickable="true" />
<button text="inspect blue events"
onclick="Debug.inspect(blueview._events)" />
<button text="inspect teal events"
onclick="Debug.inspect(tealview._events)" />
</canvas>
|
|
Description
|
onmousedown, onmouseup, onclick events aren't inherited. Neither is the clickable attribute.
Test case:
<canvas debug="true">
<trait name="mytrait">
<attribute name="clickable" value="true"/>
<handler name="onmousedown">
Debug.write('mousedown');
</handler>
<handler name="onmouseup">
Debug.write('mouseup');
</handler>
<handler name="onclick">
Debug.write('click');
</handler>
</trait>
<class name="myview" traits="mytrait" width="50" height="50" />
<simplelayout />
<myview id="blueview" bgcolor="blue" />
<myview id="tealview" bgcolor="teal" clickable="true" />
<button text="inspect blue events"
onclick="Debug.inspect(blueview._events)" />
<button text="inspect teal events"
onclick="Debug.inspect(tealview._events)" />
</canvas> |
Show » |
|
Date: Mon, 4 Dec 2006 05:38:41 -0500
To: Sarah Allen <sallen@laszlosystems.com>
I can see why this might not work in 3.4 (and LZX traits are totally
broken in 4.x right now) but this _should_ work. Jim, I think we
should split this bug, because it is an important case to test and I
suspect the fix for 3.x and 4.x will be different.
On 2006-12-04, at 05:01 EST, Sarah Allen wrote:
> no problem. just want to keep you guys in the loop :)
>
>
> On Mon, Dec 4, 2006 at 2:00 AM, Jim Grandy wrote:
>
>> I think its probably best to work around issues with the trunk
>> implementation of traits. We're flat-out getting OL4 Beta1 out the
>> door, and I can't imagine turning around a fix to a trunk bug like
>> that in just a day or two.
>>
>> jim
>>
>> On Dec 4, 2006, at 1:05 AM, Sarah Allen wrote:
>>
>>> Hey platform folks,
>>>
>>> Just wanted to give y'all a heads up... Pablo isolated a bug that
>>> makes it so we can't use traits for the drag-drop classes in
>>> Diamond. It may be too late to do anything about this, but I
>>> thought I would give you all a heads up. We are finishing up our
>>> beta this week (candidate is cob Tues) -- if this is a quick
>>> fix, we could still make it a trait, but otherwise it'll remain
>>> a submode.
>>>
>>> http://www.openlaszlo.org/jira/browse/LPP-3177
>>> http://emma.laszlosystems.com/jira/browse/DMD-221
>>>
>>> Sarah