Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 Tags
Subject: RE: Egg or bird: what's first?
Thread ID: 143433 Message ID: 143466 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Wednesday, August 29, 2007 12:03:44 AM         
   


Sometimes If i put it the KeyPress event fires twice,

Not sure what you mean here. If you add DODEFAULT() to a textbox's .KeyPress(), run the form and then type the letter "A" into the textbox, do you get "AA"?

I ran into a situation where I had code that did something in the class's keypress() (it displayed something) and then I had override code in the form's instance, but I put the DO DEFAULT at the end of that code. It wasn't a conditional DO DEFAULT and it should have been. That DODEFAULT() should have only fired for the ELSE. It popped two identical messages - one after another. It took me a while before I spotted the error - one of those situations where I could not see the forest because all those @#$%^&*( trees got in the way.

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

Egg or bird: what's first? Posted by Ilya Rabyy @ 8/28/2007 7:50:35 PM
RE: Egg or bird: what's first? Posted by Ken Murphy @ 8/28/2007 8:22:20 PM
RE: Egg or bird: what's first? Posted by Ilya Rabyy @ 8/28/2007 8:32:37 PM
RE: Egg or bird: what's first? Posted by Ken Murphy @ 8/28/2007 8:36:23 PM
RE: Egg or bird: what's first? Posted by Borislav Borissov @ 8/28/2007 11:42:40 PM
RE: Egg or bird: what's first? Posted by Cetin Basoz @ 8/28/2007 11:46:26 PM
RE: Egg or bird: what's first? Posted by Ken Murphy @ 8/28/2007 11:56:24 PM
RE: Egg or bird: what's first? Posted by Borislav Borissov @ 8/28/2007 11:56:41 PM
RE: Egg or bird: what's first? Posted by Ken Murphy @ 8/29/2007 12:03:44 AM
RE: Egg or bird: what's first? Posted by Cetin Basoz @ 8/29/2007 12:07:00 AM
RE: Egg or bird: what's first? Posted by Cetin Basoz @ 8/28/2007 11:31:35 PM