ziggybcn / junglegui

Automatically exported from code.google.com/p/junglegui
3 stars 1 forks source link

.LostFocus and .GotFocus Event Issue #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
GotFocus is triggered with every click of a button, regardless of whether the 
control has focus already. LostFocus fires, although the focus is not lost...

Control.Update needs a check if the currently focussed object is self?

if _gui._focusedControl = Self Return

What steps will reproduce the problem?

1. register .LostFocus & .GotFocus evenhandler on a button
2. let the Lost handler print "Lost"
3. let the Got handler print "Got"
4. Click 3 times on the button

What is the expected output? What do you see instead?

expected output:
GOT

instead:
GOT
LOST
GOT
LOST
GOT

Original issue reported on code.google.com by sascha.schmidt217 on 30 Jul 2012 at 5:18

GoogleCodeExporter commented 9 years ago
fixed in Revision: 266c1a051835

Original comment by sascha.schmidt217 on 1 Aug 2012 at 11:37