New topic: 

TextField fires LostFocus many times

<http://forums.realsoftware.com/viewtopic.php?t=38039>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        ArchibaldTuttle          Post subject: TextField fires LostFocus 
many timesPosted: Thu Mar 10, 2011 11:19 am                         
Joined: Sat Feb 05, 2011 6:23 am
Posts: 13                Ok, this is quit strange, but I don't get it.

I need the lostFocus event from a textfield and got very strange results when I 
make some computation inside the lostfocus event.
Code:Sub LostFocus()
  counter = counter + 1
  me.text = CStr(counter)
End Sub

And guess what. Every time the textfield looses the focus the counter added 4. 
So, the first time the textfield looses the focus me.text is 4, the second time 
it looses the focus me.text is 8 and so on. And while debugging, the lostFocus 
event is fired four times indeed.

Different textfields in the same window behave similar, except the number the 
lostfocus event is fired is different. And I have no idea, to what the number 
the lostfocus event is fired relates to.

Do I get anything wrong, or should I write a bug report.

BTW, this is true in 2011R1 and 2010R5.1   
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to