[Adding laszlo-dev, this is really an OL bug.] Maybe this is the time to sort out our setter protocol so that we can have setter methods in the platforms that support them (everything that is not by MS or is >= IE9)?
If we still don't want to bite off that big change, I propose we fix this by: 1) Eliminating the inliner from the script compiler. It is not 100% correct as an optimization, fragile because it is hand-expanded in several places, and likely not even needed in any modern platform where function-call overhead is reasonable. 2) Create an internal setter protocol that is used inside the LFC to implement setAttribute and animation of attributes. It might be that this internal protocol separates out the setting of attribute values from the sending of events, so they can be batched up? On 2011-02-15, at 13:28, Max Carlson wrote: > Yep, Tucker is right. I need to fix the way 'transition' is applied... > > See the last comment in http://jira.openlaszlo.org/jira/browse/LPP-9020 - we > just stepped on the lurking punji stick as predicted by Tucker! > > On 2/14/11 12:39 PM, P T Withington wrote: >> CSS eventually will call setAttribute, but I wonder if Max's code is being >> thwarted by the script compiler's kludge that inlines setAttribute calls? >> Maybe that inliner doesn't know about transitions? >> >> On 2011-02-14, at 15:13, Henry Minsky wrote: >> >>> I added this transition attribute to sliderbutton >>> >>> <class name="sliderbutton" extends="bsbtn" >>> with="keyboardrepeater,virtualdrawview,keyevents"> >>> >>> <attribute name="transition" style="transition" type="string" >>> value="opacity 0.5s"/> >>> >>> >>> And that works when I call mybutton.setAttribute('opacity', somevalue) >>> >>> But when the opacity is set via CSS rule, like this >>> >>> <stylesheet> >>> >>> sliderbutton { >>> opacity: 0.5; >>> } >>> >>> sliderbutton[mousestate=over] { >>> opacity: 1; >>> } >>> >>> </stylesheet> >>> >>> >>> The opacity changes instantly, ignoring the transition setting. >>> >>> Shouldn't the styled opacity be getting set eventually via a call to >>> setAttribute? Or does it override that mechanism >>> somehow? It seems like Max's transition machinery in LzNode is getting >>> bypassed in this case... >>
