On Dec 19, 2005, at 10:42 PM, Henry Minsky wrote: Did someone on this list or the forums recently say something about mouseover and mouseout events not matching up (i.e., you might never get a mouseout in some situations)? If that were the case then this might get into an inconsistent state for the purposes of rollovers...
If there is such a bug, the proposal below wouldn't fix that but it wouldn't exacerbate it either. A view could get stuck in the wrong state whether you used constraints or event handlers to track it. On 12/19/05, Oliver Steele <[EMAIL PROTECTED]> wrote: I'd like to be able to write rollover effects more declaratively. For example, instead of writing something like this: <view bgcolor="red" /> I'd like to be able to use a constraint: <view bgcolor="${this.mouseisover ? blue : red}"/>
Or more realistically, for a view that has a more radically different appearance in its rollover and non-rollover states, I'd like to be able to do something like this: <view> <state apply="${!this.mouseisover}"> ...normal state... </state> <state apply="${this.mouseisover}"> ....rollover state... </state> </view>
I can get this if I add these lines to LzModeManager.handleMouseEvent: if (eventStr == "onmouseover") view.setAttribute('mouseisover', true); if (eventStr == "onmouseout") view.setAttribute('mouseisover', false); if (eventStr == "onmousedown") view.setAttribute('mouseisdown', true); if (eventStr == "onmouseup") view.setAttribute('mouseisup', false);
Does this sound reasonable? I don't want to write a performance test to see if this is credible, so I thought I'd run it by your intuition instead.
---
Notes:
LzView.mouseover would be a better name for this, but for the constraint system to work, onmouseover would have to be sent when it changed its value from true to false, which would be an incompatible (and confusing) change.
LzView.mouse.over and LzView.mouse.down would also be more elegant names than LzView.mouseover and LzView.mousedown, but this would require an extra node for each view, to register the delegates on, and I was worried about the effect on memory footprint and instantiation time if I added an extra Object to every LzView. _______________________________________________ Laszlo-dev mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
-- Henry Minsky Software Architect [EMAIL PROTECTED]
|
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev