Author | Topic: :move event | |
---|---|---|
Carlos A Beling | :move event on Fri, 24 Jan 2014 17:04:30 -0200 Good afternoon. I want to trigger an event while the XbpStatic() is moving. Then I make: oStatic:move := {|aOldPos, aNewPos, Self|; (Self:setPos({aOldPos[01],aNewPos[02]}),; iif(aNewpos[02] > aOldPos[02],; PostAppEvent(anyEvent), PostAppEvent(anyOtherEvent)))} Why neither oStatic is moved nor anyEvent is not triggered ? Beling TIA | |
James Loughner | Re: :move event on Sat, 25 Jan 2014 15:31:23 -0500 Self is a special variable and you should not use it like you are try o instead. But at the same time I don't understand the reasoning. The move method is triggered when an object is moved it is not meant to move an object. Jim On 01/24/2014 02:04 PM, Carlos A Beling wrote: > Good afternoon. > I want to trigger an event while the XbpStatic() is moving. > Then I make: > oStatic:move := {|aOldPos, aNewPos, Self|; > (Self:setPos({aOldPos[01],aNewPos[02]}),; > iif(aNewpos[02] > aOldPos[02],; > PostAppEvent(anyEvent), > PostAppEvent(anyOtherEvent)))} > Why neither oStatic is moved nor anyEvent is not triggered ? > > Beling > TIA | |
Carlos A Beling | Re: :move event on Wed, 29 Jan 2014 10:13:31 -0200 Hello JIm: good morning. Many thanks. Is not the event :motion triggered when the mouse is over the Xbp? The docs says about the :move event: <snip> the xbeP_Move event is generated after a window has been moved. This event affects XbpDialog and XbpCrt objects, as well as those Xbase Parts that display a window on the screen. </snip> Taht is because I thought to use it. Beling Best regards Em 25/1/2014 18:31, James Loughner escreveu: > Self is a special variable and you should not use it like you are try o > instead. > > But at the same time I don't understand the reasoning. The move method > is triggered when an object is moved it is not meant to move an object. > > Jim > > > > > On 01/24/2014 02:04 PM, Carlos A Beling wrote: >> Good afternoon. >> I want to trigger an event while the XbpStatic() is moving. >> Then I make: >> oStatic:move := {|aOldPos, aNewPos, Self|; >> (Self:setPos({aOldPos[01],aNewPos[02]}),; >> iif(aNewpos[02] > aOldPos[02],; >> PostAppEvent(anyEvent), >> PostAppEvent(anyOtherEvent)))} >> Why neither oStatic is moved nor anyEvent is not triggered ? >> >> Beling >> TIA > | |
Itai Ben-Artzi | Re: :move event on Sun, 26 Jan 2014 02:12:39 -0800 Carlos, You should move it with oStatic:Motion, not with oStatic:Move -Itai | |
Carlos A Beling | Re: :move event on Wed, 29 Jan 2014 10:14:52 -0200 Good morning Itai. Many thanks. Please see my post to Jim. I'd like to know about their differences. Beling Best regards. Em 26/1/2014 08:12, Itai Ben-Artzi escreveu: > Carlos, > You should move it with oStatic:Motion, not with oStatic:Move > -Itai |