Henry Minsky | 1 Sep 01:10
Favicon

Re: [Laszlo-reviews] For Review: Change 20090831-hqm-N Summary: (DHTML) ignore spurious mouse events when user dismisses contextmenu

Hmm, the behavior in Firefox/SWF on Windows and OSX is quite different. In OSX, I don't get
any mouse events on the view, in case b), and also don't get any of the global mouse events.

Would you approve this change as an improvement over the existing behavior?  The thing
I'm most worried about is in DHTML having unwanted mouse click events on views
when people try to dismiss a context menu without choosing any items.




On Mon, Aug 31, 2009 at 6:57 PM, André Bargull <andre.bargull <at> udo.edu> wrote:
I've tested
a) right clicking on canvas and then left clicking on canvas
b) right clicking on red view and then left clicking on red view
a) right clicking on canvas and then left clicking on red view
b) right clicking on red view and then left clicking on canvas

swf8-results:
a)
DEBUG: global onmousedown
DEBUG: global onmouseup
b)
DEBUG: global onmousedown
DEBUG: view onmousedown
DEBUG: global onmouseup
DEBUG: view onmouseup
DEBUG: view onclick
c)
DEBUG: global onmousedown
DEBUG: view onmousedown
DEBUG: global onmouseup
DEBUG: view onmouseup
DEBUG: view onclick
d)
DEBUG: global onmousedown
DEBUG: global onmouseup

dhtml (Firefox3.5, Win)
a) none
b) DEBUG: global onmouseup
c) DEBUG: global onmouseup
d) none

Note: the global mouseup-events in dhtml may be triggered by LPP-8423




On 8/31/2009 7:09 PM, Henry Minsky wrote:
Change 20090831-hqm-N by hqm <at> badtzmaru.home on 2009-08-31 13:01:15 EDT
   in /Users/hqm/openlaszlo/trunk-clean
   for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: (DHTML) ignore spurious mouse events when user dismisses contextmenu

New Features:

Bugs Fixed: LPP-8218, LPP-8189

Technical Reviewer: max
QA Reviewer: andre
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:

Change to make behavior when menu is dismissed match SWF more closely.

+ When the user wants to dismiss a context menu without selecting any
items, they move the mouse outside of the menu and either release the
button or click the button.  In either case, we do not want these
mousedown,mouseup, and click events to be sent to whatever view they
happen to be over.

This change modifies LzMouseKernel#__sendEvent to check if the context
menu is being hidden due to a mousedown, and if so, sets flags to
ignore the next mouseup and onclick events.


Tests:

[test case from LPP-8189]
<canvas>
<view width="200" height="200" bgcolor="0xff0000">
   <handler name="onmousedown">
       // Expected: Fires in swf8 and dhtml for left mouse click
       // Unexpected: Fires in dhtml for right mouse click
       Debug.write("onmousedown");
   </handler>
   <handler name="onmouseup">
       // Expected: Fires in swf8 and dhtml for left mouse click
       // Unexpected: Fires in dhtml for right mouse click
       Debug.write("onmouseup");
   </handler>
   <handler name="onclick">
       // Expected: Fires in swf8 and dhtml for left mouse click
       Debug.write("onclick");
   </handler>
</view>
</canvas>


In DHTML, these two cases should print no mouse events to the debugger

[1] Move mouse over red view, click right to display context menu.
Press left button over an item, and while holding, drag mouse out of
context menu, but still over the red view, and then release button to
dismiss menu.
No events should print to the debugger.

[1] Move mouse over red view, click right to display context menu.
Move mouse out of context menu, but still over red view, and click
left to dismiss menu.
No events should print to the debugger.

Files:
M      WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090831-hqm-N.tar




--
Henry Minsky
Software Architect
hminsky <at> laszlosystems.com


_______________________________________________
Laszlo-reviews mailing list
Laszlo-reviews <at> www.openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
Max Carlson | 1 Sep 01:38
Favicon

Re: [Laszlo-reviews] For Review: Change 20090831-hqm-N Summary: (DHTML) ignore spurious mouse events when user dismisses contextmenu

Shouldn't the events match the swf8 behavior?

Henry Minsky wrote:
> Hmm, the behavior in Firefox/SWF on Windows and OSX is quite different. 
> In OSX, I don't get
> any mouse events on the view, in case b), and also don't get any of the 
> global mouse events.
> 
> Would you approve this change as an improvement over the existing 
> behavior?  The thing
> I'm most worried about is in DHTML having unwanted mouse click events on 
> views
> when people try to dismiss a context menu without choosing any items.
> 
> 
> 
> 
> On Mon, Aug 31, 2009 at 6:57 PM, André Bargull <andre.bargull <at> udo.edu 
> <mailto:andre.bargull <at> udo.edu>> wrote:
> 
>     I've tested
>     a) right clicking on canvas and then left clicking on canvas
>     b) right clicking on red view and then left clicking on red view
>     a) right clicking on canvas and then left clicking on red view
>     b) right clicking on red view and then left clicking on canvas
> 
>     swf8-results:
>     a)
>     DEBUG: global onmousedown
>     DEBUG: global onmouseup
>     b)
>     DEBUG: global onmousedown
>     DEBUG: view onmousedown
>     DEBUG: global onmouseup
>     DEBUG: view onmouseup
>     DEBUG: view onclick
>     c)
>     DEBUG: global onmousedown
>     DEBUG: view onmousedown
>     DEBUG: global onmouseup
>     DEBUG: view onmouseup
>     DEBUG: view onclick
>     d)
>     DEBUG: global onmousedown
>     DEBUG: global onmouseup
> 
>     dhtml (Firefox3.5, Win)
>     a) none
>     b) DEBUG: global onmouseup
>     c) DEBUG: global onmouseup
>     d) none
> 
>     Note: the global mouseup-events in dhtml may be triggered by LPP-8423
> 
> 
> 
> 
>     On 8/31/2009 7:09 PM, Henry Minsky wrote:
> 
>         Change 20090831-hqm-N by hqm <at> badtzmaru.home on 2009-08-31
>         13:01:15 EDT
>            in /Users/hqm/openlaszlo/trunk-clean
>            for http://svn.openlaszlo.org/openlaszlo/trunk
> 
>         Summary: (DHTML) ignore spurious mouse events when user
>         dismisses contextmenu
> 
>         New Features:
> 
>         Bugs Fixed: LPP-8218, LPP-8189
> 
>         Technical Reviewer: max
>         QA Reviewer: andre
>         Doc Reviewer: (pending)
> 
>         Documentation:
> 
>         Release Notes:
> 
>         Details:
> 
>         Change to make behavior when menu is dismissed match SWF more
>         closely.
> 
>         + When the user wants to dismiss a context menu without
>         selecting any
>         items, they move the mouse outside of the menu and either
>         release the
>         button or click the button.  In either case, we do not want these
>         mousedown,mouseup, and click events to be sent to whatever view they
>         happen to be over.
> 
>         This change modifies LzMouseKernel#__sendEvent to check if the
>         context
>         menu is being hidden due to a mousedown, and if so, sets flags to
>         ignore the next mouseup and onclick events.
> 
> 
>         Tests:
> 
>         [test case from LPP-8189]
>         <canvas>
>         <view width="200" height="200" bgcolor="0xff0000">
>            <handler name="onmousedown">
>                // Expected: Fires in swf8 and dhtml for left mouse click
>                // Unexpected: Fires in dhtml for right mouse click
>                Debug.write("onmousedown");
>            </handler>
>            <handler name="onmouseup">
>                // Expected: Fires in swf8 and dhtml for left mouse click
>                // Unexpected: Fires in dhtml for right mouse click
>                Debug.write("onmouseup");
>            </handler>
>            <handler name="onclick">
>                // Expected: Fires in swf8 and dhtml for left mouse click
>                Debug.write("onclick");
>            </handler>
>         </view>
>         </canvas>
> 
> 
>         In DHTML, these two cases should print no mouse events to the
>         debugger
> 
>         [1] Move mouse over red view, click right to display context menu.
>         Press left button over an item, and while holding, drag mouse out of
>         context menu, but still over the red view, and then release
>         button to
>         dismiss menu.
>         No events should print to the debugger.
> 
>         [1] Move mouse over red view, click right to display context menu.
>         Move mouse out of context menu, but still over red view, and click
>         left to dismiss menu.
>         No events should print to the debugger.
> 
>         Files:
>         M      WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
> 
>         Changeset:
>         http://svn.openlaszlo.org/openlaszlo/patches/20090831-hqm-N.tar
> 
> 
> 
> 
> -- 
> Henry Minsky
> Software Architect
> hminsky <at> laszlosystems.com <mailto:hminsky <at> laszlosystems.com>
> 
> 

--

-- 
Regards,
Max Carlson
OpenLaszlo.org
Max Carlson | 1 Sep 01:46
Favicon

[Laszlo-reviews] For Review: Change 20090831-maxcarlson-2 Summary: Prevent extra global onmouseup events in DHTML

Change 20090831-maxcarlson-2 by maxcarlson <at> Bank on 2009-08-31 16:37:48  
PDT
     in /Users/maxcarlson/openlaszlo/trunk-clean
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Prevent extra global onmouseup events in DHTML

Bugs Fixed: LPP-8423 - DHTML: two global onmouseup events for each click

Technical Reviewer: andre.bargull <at> udo.edu
QA Reviewer: hminsky

Details: Don't set cancelBubble for onmouseup/down events - that's  
handled above...

Tests: See testcase from LPP-8423. Also test with test/lfc/legals/ 
keyboardandmouse.lzx?lzr=dhtml&debug=true

Files:
M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090831-maxcarlson-2.tar
Henry Minsky | 1 Sep 04:51
Favicon

Re: [Laszlo-reviews] For Review: Change 20090831-hqm-N Summary: (DHTML) ignore spurious mouse events when user dismisses contextmenu

Yeah, but the behavior in SWF8 on windows and OSX is different.

The case that I'm dealing with  is if the user

1) brings up a context menu
2)  does not mouse down on any context menu item
3)  then moves the mouse outside of the context menu and clicks left


In Firefox, on Windows you get  mousedown/mouseup/click events sent to the view, but in OSX, you don't get any mouse events.  In IE7, you get mousedown/mouseup events but no click event.

So, it seems pretty hard to get all these cases to match, even in swf; maybe there is a
"ideal" behavior we should be trying to nudge things into as we get the opportunities. I was thinking
of the user who popped up a context menu just to look at it, but then wants to dismiss it
without affecting anything, so I was looking for ways to discard the mouse events associated
with that gesture.  And it happened that I was referring to the behavior of swf8 in OSX, which is
unfortunately different from Windows...









On Mon, Aug 31, 2009 at 7:38 PM, Max Carlson <max <at> laszlosystems.com> wrote:
Shouldn't the events match the swf8 behavior?

Henry Minsky wrote:
Hmm, the behavior in Firefox/SWF on Windows and OSX is quite different. In OSX, I don't get
any mouse events on the view, in case b), and also don't get any of the global mouse events.

Would you approve this change as an improvement over the existing behavior?  The thing
I'm most worried about is in DHTML having unwanted mouse click events on views
when people try to dismiss a context menu without choosing any items.




On Mon, Aug 31, 2009 at 6:57 PM, André Bargull <andre.bargull <at> udo.edu <mailto:andre.bargull <at> udo.edu>> wrote:

   I've tested
   a) right clicking on canvas and then left clicking on canvas
   b) right clicking on red view and then left clicking on red view
   a) right clicking on canvas and then left clicking on red view
   b) right clicking on red view and then left clicking on canvas

   swf8-results:
   a)
   DEBUG: global onmousedown
   DEBUG: global onmouseup
   b)
   DEBUG: global onmousedown
   DEBUG: view onmousedown
   DEBUG: global onmouseup
   DEBUG: view onmouseup
   DEBUG: view onclick
   c)
   DEBUG: global onmousedown
   DEBUG: view onmousedown
   DEBUG: global onmouseup
   DEBUG: view onmouseup
   DEBUG: view onclick
   d)
   DEBUG: global onmousedown
   DEBUG: global onmouseup

   dhtml (Firefox3.5, Win)
   a) none
   b) DEBUG: global onmouseup
   c) DEBUG: global onmouseup
   d) none

   Note: the global mouseup-events in dhtml may be triggered by LPP-8423




   On 8/31/2009 7:09 PM, Henry Minsky wrote:

       Change 20090831-hqm-N by hqm <at> badtzmaru.home on 2009-08-31
       13:01:15 EDT
          in /Users/hqm/openlaszlo/trunk-clean
          for http://svn.openlaszlo.org/openlaszlo/trunk

       Summary: (DHTML) ignore spurious mouse events when user
       dismisses contextmenu

       New Features:

       Bugs Fixed: LPP-8218, LPP-8189

       Technical Reviewer: max
       QA Reviewer: andre
       Doc Reviewer: (pending)

       Documentation:

       Release Notes:

       Details:

       Change to make behavior when menu is dismissed match SWF more
       closely.

       + When the user wants to dismiss a context menu without
       selecting any
       items, they move the mouse outside of the menu and either
       release the
       button or click the button.  In either case, we do not want these
       mousedown,mouseup, and click events to be sent to whatever view they
       happen to be over.

       This change modifies LzMouseKernel#__sendEvent to check if the
       context
       menu is being hidden due to a mousedown, and if so, sets flags to
       ignore the next mouseup and onclick events.


       Tests:

       [test case from LPP-8189]
       <canvas>
       <view width="200" height="200" bgcolor="0xff0000">
          <handler name="onmousedown">
              // Expected: Fires in swf8 and dhtml for left mouse click
              // Unexpected: Fires in dhtml for right mouse click
              Debug.write("onmousedown");
          </handler>
          <handler name="onmouseup">
              // Expected: Fires in swf8 and dhtml for left mouse click
              // Unexpected: Fires in dhtml for right mouse click
              Debug.write("onmouseup");
          </handler>
          <handler name="onclick">
              // Expected: Fires in swf8 and dhtml for left mouse click
              Debug.write("onclick");
          </handler>
       </view>
       </canvas>


       In DHTML, these two cases should print no mouse events to the
       debugger

       [1] Move mouse over red view, click right to display context menu.
       Press left button over an item, and while holding, drag mouse out of
       context menu, but still over the red view, and then release
       button to
       dismiss menu.
       No events should print to the debugger.

       [1] Move mouse over red view, click right to display context menu.
       Move mouse out of context menu, but still over red view, and click
       left to dismiss menu.
       No events should print to the debugger.

       Files:
       M      WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js

       Changeset:
       http://svn.openlaszlo.org/openlaszlo/patches/20090831-hqm-N.tar




--
Henry Minsky
Software Architect

--
Regards,
Max Carlson
OpenLaszlo.org



--
Henry Minsky
Software Architect
hminsky <at> laszlosystems.com


_______________________________________________
Laszlo-reviews mailing list
Laszlo-reviews <at> www.openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
André Bargull | 1 Sep 09:57

Re: [Laszlo-reviews] For Review: Change 20090831-hqm-N Summary: (DHTML) ignore spurious mouse events when user dismisses contextmenu

According to the last arrangement I do know, we want Windows SWF behaviour:
> Maynard sez: making it consistent between windows swf will reduce the number of bugs we get
> 
> So I'll emulate the windows swf8 behavior instead of the Mac's... 

http://www.openlaszlo.org/jira/browse/LPP-8189?focusedCommentId=52126#action_52126

On 9/1/2009 4:51 AM, Henry Minsky wrote:
> Yeah, but the behavior in SWF8 on windows and OSX is different.
> 
> The case that I'm dealing with  is if the user
> 
> 1) brings up a context menu
> 2)  does not mouse down on any context menu item
> 3)  then moves the mouse outside of the context menu and clicks left
> 
> 
> In Firefox, on Windows you get  mousedown/mouseup/click events sent to 
> the view, but in OSX, you don't get any mouse events.  In IE7, you get 
> mousedown/mouseup events but no click event.
> 
> So, it seems pretty hard to get all these cases to match, even in swf; 
> maybe there is a
> "ideal" behavior we should be trying to nudge things into as we get the 
> opportunities. I was thinking
> of the user who popped up a context menu just to look at it, but then 
> wants to dismiss it
> without affecting anything, so I was looking for ways to discard the 
> mouse events associated
> with that gesture.  And it happened that I was referring to the behavior 
> of swf8 in OSX, which is
> unfortunately different from Windows...
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Mon, Aug 31, 2009 at 7:38 PM, Max Carlson <max <at> laszlosystems.com 
> <mailto:max <at> laszlosystems.com>> wrote:
> 
>     Shouldn't the events match the swf8 behavior?
> 
>     Henry Minsky wrote:
> 
>         Hmm, the behavior in Firefox/SWF on Windows and OSX is quite
>         different. In OSX, I don't get
>         any mouse events on the view, in case b), and also don't get any
>         of the global mouse events.
> 
>         Would you approve this change as an improvement over the
>         existing behavior?  The thing
>         I'm most worried about is in DHTML having unwanted mouse click
>         events on views
>         when people try to dismiss a context menu without choosing any
>         items.
> 
> 
> 
> 
>         On Mon, Aug 31, 2009 at 6:57 PM, André Bargull
>         <andre.bargull <at> udo.edu <mailto:andre.bargull <at> udo.edu>
>         <mailto:andre.bargull <at> udo.edu <mailto:andre.bargull <at> udo.edu>>>
>         wrote:
> 
>            I've tested
>            a) right clicking on canvas and then left clicking on canvas
>            b) right clicking on red view and then left clicking on red view
>            a) right clicking on canvas and then left clicking on red view
>            b) right clicking on red view and then left clicking on canvas
> 
>            swf8-results:
>            a)
>            DEBUG: global onmousedown
>            DEBUG: global onmouseup
>            b)
>            DEBUG: global onmousedown
>            DEBUG: view onmousedown
>            DEBUG: global onmouseup
>            DEBUG: view onmouseup
>            DEBUG: view onclick
>            c)
>            DEBUG: global onmousedown
>            DEBUG: view onmousedown
>            DEBUG: global onmouseup
>            DEBUG: view onmouseup
>            DEBUG: view onclick
>            d)
>            DEBUG: global onmousedown
>            DEBUG: global onmouseup
> 
>            dhtml (Firefox3.5, Win)
>            a) none
>            b) DEBUG: global onmouseup
>            c) DEBUG: global onmouseup
>            d) none
> 
>            Note: the global mouseup-events in dhtml may be triggered by
>         LPP-8423
> 
> 
> 
> 
>            On 8/31/2009 7:09 PM, Henry Minsky wrote:
> 
>                Change 20090831-hqm-N by hqm <at> badtzmaru.home on 2009-08-31
>                13:01:15 EDT
>                   in /Users/hqm/openlaszlo/trunk-clean
>                   for http://svn.openlaszlo.org/openlaszlo/trunk
> 
>                Summary: (DHTML) ignore spurious mouse events when user
>                dismisses contextmenu
> 
>                New Features:
> 
>                Bugs Fixed: LPP-8218, LPP-8189
> 
>                Technical Reviewer: max
>                QA Reviewer: andre
>                Doc Reviewer: (pending)
> 
>                Documentation:
> 
>                Release Notes:
> 
>                Details:
> 
>                Change to make behavior when menu is dismissed match SWF more
>                closely.
> 
>                + When the user wants to dismiss a context menu without
>                selecting any
>                items, they move the mouse outside of the menu and either
>                release the
>                button or click the button.  In either case, we do not
>         want these
>                mousedown,mouseup, and click events to be sent to
>         whatever view they
>                happen to be over.
> 
>                This change modifies LzMouseKernel#__sendEvent to check
>         if the
>                context
>                menu is being hidden due to a mousedown, and if so, sets
>         flags to
>                ignore the next mouseup and onclick events.
> 
> 
>                Tests:
> 
>                [test case from LPP-8189]
>                <canvas>
>                <view width="200" height="200" bgcolor="0xff0000">
>                   <handler name="onmousedown">
>                       // Expected: Fires in swf8 and dhtml for left
>         mouse click
>                       // Unexpected: Fires in dhtml for right mouse click
>                       Debug.write("onmousedown");
>                   </handler>
>                   <handler name="onmouseup">
>                       // Expected: Fires in swf8 and dhtml for left
>         mouse click
>                       // Unexpected: Fires in dhtml for right mouse click
>                       Debug.write("onmouseup");
>                   </handler>
>                   <handler name="onclick">
>                       // Expected: Fires in swf8 and dhtml for left
>         mouse click
>                       Debug.write("onclick");
>                   </handler>
>                </view>
>                </canvas>
> 
> 
>                In DHTML, these two cases should print no mouse events to the
>                debugger
> 
>                [1] Move mouse over red view, click right to display
>         context menu.
>                Press left button over an item, and while holding, drag
>         mouse out of
>                context menu, but still over the red view, and then release
>                button to
>                dismiss menu.
>                No events should print to the debugger.
> 
>                [1] Move mouse over red view, click right to display
>         context menu.
>                Move mouse out of context menu, but still over red view,
>         and click
>                left to dismiss menu.
>                No events should print to the debugger.
> 
>                Files:
>                M      WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
> 
>                Changeset:
>              
>          http://svn.openlaszlo.org/openlaszlo/patches/20090831-hqm-N.tar
> 
> 
> 
> 
>         -- 
>         Henry Minsky
>         Software Architect
>         hminsky <at> laszlosystems.com <mailto:hminsky <at> laszlosystems.com>
>         <mailto:hminsky <at> laszlosystems.com
>         <mailto:hminsky <at> laszlosystems.com>>
> 
> 
> 
>     -- 
>     Regards,
>     Max Carlson
>     OpenLaszlo.org
> 
> 
> 
> 
> -- 
> Henry Minsky
> Software Architect
> hminsky <at> laszlosystems.com <mailto:hminsky <at> laszlosystems.com>
> 
> 
André Bargull | 1 Sep 10:13

Re: [Laszlo-reviews] For Review: Change 20090831-maxcarlson-2 Summary: Prevent extra global onmouseup events in DHTML

I'm getting now two global onmousedown and two global onmouseup events 
in Firefox3.5 (Win). For your change to work, you need to change
> if (LzKeyboardKernel.__cancelKeys && e.keyCode == 0) {
to:
> if (LzKeyboardKernel.__cancelKeys) {

See my mail "For Review: Change 20090602-bargull-GPN Summary: DHTML: add 
"updateControlKeys" to LzKeyboardKernel", where I described the 
differences for keyCode and mouse-events in different browers, here's 
the relevant snippet:

> "keyCode" is set to 0 for mouse-events in IE, Opera, Safari, so you only need to test for keyCode==0
(Firefox is irrelevant in this case, because it sets keyCode to `undefined` for mouse-events).

On 9/1/2009 1:46 AM, Max Carlson wrote:
> Change 20090831-maxcarlson-2 by maxcarlson <at> Bank on 2009-08-31 16:37:48 PDT
>     in /Users/maxcarlson/openlaszlo/trunk-clean
>     for http://svn.openlaszlo.org/openlaszlo/trunk
> 
> Summary: Prevent extra global onmouseup events in DHTML
> 
> Bugs Fixed: LPP-8423 - DHTML: two global onmouseup events for each click
> 
> Technical Reviewer: andre.bargull <at> udo.edu
> QA Reviewer: hminsky
> 
> Details: Don't set cancelBubble for onmouseup/down events - that's 
> handled above...
> 
> Tests: See testcase from LPP-8423. Also test with 
> test/lfc/legals/keyboardandmouse.lzx?lzr=dhtml&debug=true
> 
> Files:
> M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
> 
> Changeset: 
> http://svn.openlaszlo.org/openlaszlo/patches/20090831-maxcarlson-2.tar
> 
Raju Bitter | 1 Sep 11:22

Re: Browser detection out of an OL app

I'm more looking for something like the browser dection we use in the  
sprite class, accessing the lz.embed.browser object. Has that been done?

Thanks,
Raju

On Aug 27, 2009, at 3:20 PM, P T Withington wrote:

> lzx> lz.Browser.getVersion()
> 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.2)  
> Gecko/20090729 Firefox/3.5.2'
> lzx> lz.Browser.getOS()
> 'MacIntel'
> lzx>
>
> On 2009-08-26, at 18:35EDT, Raju Bitter wrote:
>
>> Wouldn't the LzBrower class be the place to put an API for that?
>>
>> On Aug 27, 2009, at 12:09 AM, Raju Bitter wrote:
>>
>>> How can I detect the browser version from within an OpenLaszlo  
>>> app? For the CSS/HTML5 stuff I want to show the user a hint that  
>>> an application is not supported in IE and other browsers.
>>
>

Raju Bitter | 1 Sep 12:28

Re: Browser detection out of an OL app

I tried to debug lz.embed.browser, and the object doesn't exist. On  
the other hand drawview uses exactly that approach:
 > if (lz.embed.browser.isIE) { // IE can take a while to start up.  
this._hidden = false;

Finally I realized that lz.embed.browser can of course be accessed  
from the DHTML runtime, but it's not available in SWFx. Is that an  
undocumented "feature"?

On Sep 1, 2009, at 11:22 AM, Raju Bitter wrote:

> I'm more looking for something like the browser dection we use in  
> the sprite class, accessing the lz.embed.browser object. Has that  
> been done?
>
> Thanks,
> Raju
>
>
> On Aug 27, 2009, at 3:20 PM, P T Withington wrote:
>
>> lzx> lz.Browser.getVersion()
>> 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.2)  
>> Gecko/20090729 Firefox/3.5.2'
>> lzx> lz.Browser.getOS()
>> 'MacIntel'
>> lzx>
>>
>> On 2009-08-26, at 18:35EDT, Raju Bitter wrote:
>>
>>> Wouldn't the LzBrower class be the place to put an API for that?
>>>
>>> On Aug 27, 2009, at 12:09 AM, Raju Bitter wrote:
>>>
>>>> How can I detect the browser version from within an OpenLaszlo  
>>>> app? For the CSS/HTML5 stuff I want to show the user a hint that  
>>>> an application is not supported in IE and other browsers.
>>>
>>
>

Raju Bitter | 1 Sep 13:24

Re: Browser detection out of an OL app

The simplest workaround is to add a JS function to the embedding page  
passing back params like browser.OS, browser.version, etc. into OL.

On Sep 1, 2009, at 12:28 PM, Raju Bitter wrote:

> I tried to debug lz.embed.browser, and the object doesn't exist. On  
> the other hand drawview uses exactly that approach:
> > if (lz.embed.browser.isIE) { // IE can take a while to start up.  
> this._hidden = false;
>
> Finally I realized that lz.embed.browser can of course be accessed  
> from the DHTML runtime, but it's not available in SWFx. Is that an  
> undocumented "feature"?
>
> On Sep 1, 2009, at 11:22 AM, Raju Bitter wrote:
>
>> I'm more looking for something like the browser dection we use in  
>> the sprite class, accessing the lz.embed.browser object. Has that  
>> been done?
>>
>> Thanks,
>> Raju
>>
>>
>> On Aug 27, 2009, at 3:20 PM, P T Withington wrote:
>>
>>> lzx> lz.Browser.getVersion()
>>> 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv: 
>>> 1.9.1.2) Gecko/20090729 Firefox/3.5.2'
>>> lzx> lz.Browser.getOS()
>>> 'MacIntel'
>>> lzx>
>>>
>>> On 2009-08-26, at 18:35EDT, Raju Bitter wrote:
>>>
>>>> Wouldn't the LzBrower class be the place to put an API for that?
>>>>
>>>> On Aug 27, 2009, at 12:09 AM, Raju Bitter wrote:
>>>>
>>>>> How can I detect the browser version from within an OpenLaszlo  
>>>>> app? For the CSS/HTML5 stuff I want to show the user a hint that  
>>>>> an application is not supported in IE and other browsers.
>>>>
>>>
>>
>

Picon

LzTrack.lzs

Thanks PT,

Yes I did find the build instructions and they were great...but had some 
(very minor) mistakes.
I could report them to Henry if he wants.
Anyway the more challanging issue I had with building was that the 
forked laszlo compiler was running
out of memory so I had to also set "JAVA_OPTS=-Xmx256m" in order to get 
enough of memory for the forked jvm.

And I found the answer to my own question.
The core lfc classes are compiled into
LASZLO_ROOT/lps/includes/lfc directory
.swc files for swf9 & swf10
.lzl files for swf8
.js files for dhtml

I provided a fix for LPP-8379 in Jira so have a look.
What I would like is to have a build target that
- creates the laszlo servlet
- does not need tomcat
- does not invoke any documentation tasks (so I don't have to wait forever)

Is there such a thing?

- Rami Ojares

P T Withington wrote:
> The instructions for rebuilding the LFC are here:
>
>   http://wiki.openlaszlo.org/SubversionBuildInstructions
>
> The top-level build target is
>
>   ant make
>
> This will recompile any changes and re-install the server in tomcat.
>
> ---
>
> If you have set up that environment and want to quickly build a test 
> lfc for a particular back-end, you need to be in the directory
>
>   WEB-INF/lps/lfc
>
> In there are shell scripts for invoking the correct ant procedure to 
> build.  Note that there is a separate script for building the 
> non-debug, debug, and backtrace-enabled LFC, unfortunately.  It is 
> easy to confuse yourself by building one version and testing another.  
> Also, you may have to use your browser's debugger to empty its cache 
> and force it to reload the LFC.  These are the scripts:
>
>   ./buildlfc
>   ./buildlfcdebug
>   ./buildlfcbacktrace
>
> The all take a --runtime option.  To build the swf9 debug runtime, you 
> would say:
>
>   ./buildlfc --runtime=swf9
>
> There is no bactracing in swf9 (yet).  But the wiki article above 
> tells how to get the Flash debug player and use fdb to debug swf9 code.
>
> If you are debugging generic code (not code for a particular 
> platform), you may find it easier to debug using the DHTML runtime 
> which has built-in backtracing and which you can use the browser 
> debugger (e.g., Firebug for Firefox) to do low-level debugging with.
>
> We hope you will consider contributing your fixes back!
>
> On 2009-08-31, at 07:03, Rami Ojares / AMG Oy wrote:
>
>> Hi,
>>
>> I am trying to fix some bugs in LzTrackService.
>> I got the compilation process working but I don't have a clear grasp 
>> yet of what is going in there although I browsed through the ant files.
>>
>> My question is this:
>>
>> The source file: LzTrack.lzs is located in 
>> WEB-INF/lps/lfc/services/LzTrack.lzs
>> But where is the generated compiled file?
>>
>> I tracked it down to app.swc in some obscure tmp folder but there the 
>> tracks got colder.
>>
>> I would just like to compile this lzTrack.lzs and then put it in my 
>> own laszlo distribution for trying it out.
>> But which file do I copy and from where?
>>
>> - Rami Ojares
>


Gmane