About Monkey 2 › Forums › Monkey 2 Development › Bug or not ? 2 times using a (mouse) event = ignoring both
Tagged: mouse event
This topic contains 3 replies, has 2 voices, and was last updated by
gcmartijn 8 months, 1 week ago.
-
AuthorPosts
-
August 31, 2016 at 11:37 am #3566
Still converting old mx code to mx2, and I’m using some events inside some classes.
I convert it to this example below.
the output I expect here, (like mx) was “bla2” , what I get was no output
Is this a bug, or not possible anymore ?
Monkey1234567891011121314151617181920212223242526272829303132333435363738Namespace myapp#Import "<std>"#Import "<mojo>"Using std..Using mojo..Class MyWindow Extends WindowMethod OnRender( canvas:Canvas ) OverrideApp.RequestRender()Local MouseInObjectRect:Bool = FalseIf Mouse.ButtonPressed(MouseButton.Left) And MouseInObjectRectPrint "bla1"End'' in the same class but much lower I haveIf Mouse.ButtonPressed(MouseButton.Left)Print "bla2" ' don't workEnd'' the output I expect was "bla2" , what I get was no outputEndEndFunction Main()New AppInstanceNew MyWindowApp.Run()End.. and yes I know that I can do something like this at the end in the class:
Monkey1234567If Mouse.ButtonPressed(MouseButton.Left)if MouseInObjectRectprint "bla1"ElsePrint "bla2" ' don't workEndEndBut maybe its a bug and needs to work like the example.
August 31, 2016 at 7:43 pm #3583KeyPressed and ButtonPressed pressed currently ‘clear’ themselves after being read.
This is because there’s not really an ‘update’ phase in mx2 the way there is in mx1 so the system doesn’t really know when to ‘auto clear’ them.
Thinking about it now though, I guess auto clearing these after rendering would be OK…
September 1, 2016 at 9:19 am #3588Oke, than I don’t change my code and wait for an update at your side.
August 12, 2018 at 10:23 am #15289H! Mark,
Last time we spoke/I use monkey was about a year ago, I see that you make good steps
My code still works !, except for this bug above.
Can you give me the status about this problem above (because in the latest version its still the same problem), so I can decide what to do.Greetings,
GCMartijn -
AuthorPosts
You must be logged in to reply to this topic.