Well, that one should be able to use an onmouseup event in combination
with a check to the change.  Like, you can set a temporary attribute
named, say, "oldwidth" onmousedown, and then you have an if(this.width
!= this.oldwidth){ foo; }, or something to that effect, included in
the onmouseup, which should behave properly.  (From my vague
recollection of the earlier bits of this thread, I understand that
onmouseup isn't exactly operating as expected, or something to that
effect.)

If we start getting into combinations of things like onwidthchanged,
there would almost necessarily have to be an entirely new family of
events added, such as onheightchanged, onxchanged, onychanged, etc,
simply to do what a fully functional onmouseup plus a check to a
difference in the attribute would accomplish.

On 5/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi,
>
> So you're saying onwidth should only fire when the mouse is released?
>
> Or the onmouseup should somehow allow you to figure out if the width has
> changed?
>
> Could you clarify?
>
> cheers,
>
> David
>
>
>
> |---------+---------------------------->
> |         |           "J Crowley"      |
> |         |           <[EMAIL PROTECTED]|
> |         |           il.com>          |
> |         |                            |
> |         |           05/15/2006 11:43 |
> |         |           AM               |
> |         |                            |
> |---------+---------------------------->
>   
> >-----------------------------------------------------------------------------------------------------------------|
>   |                                                                           
>                                       |
>   |       To:       "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>                   
>                                         |
>   |       cc:       "Jim Grandy" <[EMAIL PROTECTED]>, 
> [email protected]                                |
>   |       Subject:  Re: [Laszlo-dev] oncolumnwidthchanged proposal - was Re: 
> Grid events don't work - fix           |
>   
> >-----------------------------------------------------------------------------------------------------------------|
>
>
>
> Well, personally, I get the impression that in theory, that's how
> onmouseup should work:  fire an event when the mouse is released
> (whether it's after a change in height, width, position, etc.)  There
> are probably some ways the onmouse* events could be improved where
> their performance is maybe a little more intuitive, instead of adding
> new events for combinations of changes + onmouseup.
>
> On 5/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I think a new event would be very convenient to add -
> > "oncolumnwidthchanged" or similar - which would fire when the user
> releases
> > the mouse after changing the column width (for those not following this
> > thread, the onwidth event fires every time the width changes the
> slightest
> > amount, so multiple times for any column resizing).
> >
> > This event would basically be a convenience, and be a combination of
> events
> > - when the onmousedown event is caught for the gridColumn, the width is
> > saved in a variable.  When the onmouseup event is caught, the current
> width
> > is compared to the saved width, and the oncolumnwidthchanged event is
> fired
> > if it is different.
> >
> > Comments?
> >
> > btw, how do I define such a new event within gridColumn?  Do I just need
> a
> > delegate, or how does that work?
> >
> > cheers,
> >
> > David
> > x54680
> >
> >
> > |---------+---------------------------->
> > |         |           Jim Grandy       |
> > |         |           <[EMAIL PROTECTED]|
> > |         |           lo.org>          |
> > |         |                            |
> > |         |           05/12/2006 01:03 |
> > |         |           PM               |
> > |         |                            |
> > |---------+---------------------------->
> >
> >-----------------------------------------------------------------------------------------------------------------|
>
> >   |
> |
> >   |       To:       [EMAIL PROTECTED]
> |
> >   |       cc:       [email protected]
> |
> >   |       Subject:  Re: [Laszlo-dev] Grid events don't work - fix
> |
> >
> >-----------------------------------------------------------------------------------------------------------------|
>
> >
> >
> >
> > David,
> >
> > Thanks for looking into this! Please submit a bug with a description
> > of what you changed to fix the problem.
> >
> > jim
> >
> > On May 12, 2006, at 9:42 AM, [EMAIL PROTECTED] wrote:
> >
> > > Ok - dug a little deeper, and the onmouseXXX are getting swallowed
> > > in the
> > > gridColumn.lzx.
> > >
> > > I added the following parent.onmousexxx.sendEvent() calls and it works
> > > great:
> > >
> > >             <state placement="header" apply="${parent.resizable}">
> > >                 <view height="${parent.height-1}"
> > >                     x="${parent.mybutton.width - 1}"
> > >                     placement="header"
> > >                     name="resizer"
> > >                     clickable="$once{parent.resizable}"
> > >                     onmouseover="LzCursor.setCursorGlobal (
> > > 'lzgridcursor_rsrc' );parent.onmouseover.sendEvent();"
> > >
> > > onmouseout="LzCursor.restoreCursor();parent.onmouseout.sendEvent();"
> > >
> > > onmousedown="LzCursor.lock();parent.rs.apply
> > > ();parent.onmousedown.sendEvent();"
> > >
> > > onmouseup="LzCursor.unlock();parent.rs.remove
> > > ();parent.onmouseup.sendEvent();"
> > >>
> > >                     <view resource="resources/grid/
> > > column_resize_top.swf"/>
> > >                     <view resource="resources/grid/
> > > column_resize_mid.swf"
> > >                         stretches="height"/>
> > >                     <view resource="resources/grid/
> > > column_resize_bot.swf"/>
> > >                     <stableborderlayout axis="y"/>
> > >                 </view>
> > >             </state>
> > >
> > > Is this the recommended approach?
> > >
> > > Do you want me to submit a patch or a bug?
> > >
> > > cheers,
> > >
> > > David
> > >
> > >
> > >
> > > |---------+---------------------------->
> > > |         |           Jim Grandy       |
> > > |         |           <[EMAIL PROTECTED]|
> > > |         |           lo.org>          |
> > > |         |                            |
> > > |         |           05/10/2006 02:29 |
> > > |         |           PM               |
> > > |         |                            |
> > > |---------+---------------------------->
> > >> ---------------------------------------------------------------------
> > >> --------------------------------------------|
> > >
> > > |
> > >                                             |
> > >   |       To:
> > > [EMAIL PROTECTED]
> > >                           |
> > >   |       cc:       laszlo-
> > > [EMAIL PROTECTED]
> > >                    |
> > >   |       Subject:  Re: [Laszlo-dev] Grid events don't work -
> > > workaround?                                           |
> > >> ---------------------------------------------------------------------
> > >> --------------------------------------------|
> > >
> > >
> > >
> > >
> > > On May 10, 2006, at 10:54 AM, [EMAIL PROTECTED] wrote:
> > >
> > > Yep, tried the onwidth event - problem with that is that it seems
> > > to fire
> > >
> > > repeatedly with EVERY slight movement of the mouse :-(? No way to
> > > tell when
> > >
> > > it's finished being moved.
> > >
> > >
> > >
> > > The main frustration is none of the onMouseXXX events seem to
> > > work.? This
> > >
> > > should be really easy, but seems like mutliple people on the forums
> > > have
> > >
> > > been having similar problems at least for a year now.
> > >
> > >
> > > I'm not sure we have a bug filed on this. Can you please make sure
> > > something is in our bug database?
> > >
> > > Any more ideas?
> > >
> > > Nope, sorry. Please file a bug requesting that this be
> > > straightforward/possible.
> > >
> > > jim
> >
> >
> >
> > _______________________________________________
> > Laszlo-dev mailing list
> > [email protected]
> > http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
> >
>
>
>

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to