Information générale
Titre:
VFP bug? - class doesn't work right
I had a class txtdata subclassed from textbox in library xxdata. I subclassed txtdata into a specialized textbox txtDupWarn and put it in a new library, "anwdata". It did a weird thing: it no longer executed a LostFocus event at all. (For instance, Wait Window 'LostFocus' in the txtDupWarn lostfocus does nothing.)
I tried recompiling the class but it did not work. I created a new class library and subclassed txtdata again into a new "txtdupwarn" and cut and pasted the method code. I added the one or two properties again also - just totally rewrote the class. It still had the problem.
Now it gets interesting: I noticed that the properties window when I put a txtDupWarn on a form it's .Classlib property is "xxdata"! But it's not in xxdata, it's in anwdata. (It merely inherets from txtData in xxdata.) So I figure, what if I move it into the xxData classlib. And Loe and Behold, it works. I got the Lostfocus back.
What's up with that? (I'm using VFP 5.0a.)
Adam
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement