Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another CursorAdapter Question
Message
De
06/04/2004 15:12:59
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00892617
Message ID:
00892721
Vues:
19
I'm probably missing something, but if it's simply the "passing" you want to avoid, why don't you set up a "(sub)class" for the different cursoradaptors that you need, and only pass the parameters / properties that would not be inherited; eg.
DEFINE CLASS caFoo1 AS caFoo
   ...
ENDDEFINE

DEFINE CLASS caFoo AS CursorAdaptor
   ...
ENDDEFINE
BTW, I avoid cumbersome parameter passing by using "scripts"; eg.
o1 = CREATEOBJECT( "Foo", ".propa = 1; .propb = 2" )
...

DEFINE CLASS Foo AS ...

PROC Init
   LPARAMETER TC_Script

   IF !EMPTY( TC_Script )
      WITH THIS
         = EXECSCRIPT( TC_Script )
      ENDWITH
   ENDIF
(In actuality, there would be a wrapper for EXECSCRIPT to convert the delimiter ";", or whatever, to a carriage return)

>The point was that I dont want to have to pass parameters
>for every possible combination of properties and /or queries
>that I might need.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform