Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Classes not to subclass
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00792211
Message ID:
00793302
Vues:
51
Hm, that's odd...

Here's what I've got in 'grid.prg':
DEFINE CLASS hdr AS Header
  Name     = "hdr"
  Caption  = "  Header  "
  FontFace = "Tahoma"
  FontSize = 8
ENDDEFINE

DEFINE CLASS col AS Column
  Name               = "col"
  HeaderClass        = "hdr"
  HeaderClassLibrary = "t:\baseclasses\grid.prg"

  ADD OBJECT txt AS txt
ENDDEFINE
The class 'txt' is, of course, my visual base class in t:\baseclasses\baseclasses.vcx.

Here're the properties for my grid class:
MemberClass        = col
MemberClassLibrary = "t:\baseclasses\grid.prg"
When I try to open the grid in the class designer, I get an error: "Class definition TXT is not found." So just for kicks-n-grins, I tried it like this:
DEFINE CLASS col AS Column
  Name               = "col"
  HeaderClass        = "hdr"
  HeaderClassLibrary = "t:\baseclasses\grid.prg"

  ADD OBJECT txt AS txt OF t:\baseclasses\baseclasses.vcx
ENDDEFINE
As expected, I get a compile-time error: "Command contains unrecognized phrase/keyword."

How did you get it to work? You must have SET CLASSLIB to your base class' .VCX -- that's the only thing I can think of.




>>BTW, I saw your tip in message #792792, for specifying the custom column's textbox, >and I wonder if you know of any way to point it to my visual textbox custom >baseclass, instead of having to duplicate it in code.
>
>>My guess is there probably isn't, and I suppose it won't be too much of a hassle to >maintain duplicate sets of classes, but of course it'd be nice if we didn't have to.
>
>Jeff, in your class definition for the custom column have you tried:
>
>ADD OBJECT TextBoxName AS MyVisualTextBoxName
>
>I just did a quick check of this and it seems to work OK.
>
>John

Read about the greatest fraud in the history of mankind.
See TaxableIncome.net.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform