Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Define Class in Methode and events ???
Message
De
02/04/1997 19:54:45
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00025966
Message ID:
00026695
Vues:
37
>>>I know that OO in VFP is very good but some detail was forgot like visualy change for column, page and so on. I think that definition of class was in to but if in the next version of VFP we will able to add property in the object at run time {build in not a extern class like today} it will more easy to use object to pass parameters to a method or another object because the parameters never had the same stucture so we can't build a definition for all parameters you need.
>>
>>Yes, you can. You can have a property that will be an object at runtime. So, the object can be anything, e.g. you have an amazing flexibility here.
>>
>>Vlad
>
>I'm sorry may be my explication was not clear.
>
>I made a getinfo()
>the parameter i need was
>- RefVal N(2,0)
>- String C(30)
>- Alias Name C(15)
>
>Old ...
>
>= GetInfo(2,"Empty Srin...","Table.dbf")
>
>procedure GetInfo
>Lparameters pRefVal,pString,pAlias
>....
>return
>
>Better ...
>
>define class oparam as custom
>refval = 2
>string = "Empty String..."
>Alias = "Table.dbf"
>enddefine
>
>x = createobject("oparam")
>
>This.GetInfo(x)
>
>in Methode GetInfo()
>Lparameter pObjParam
>....
>return
>
>I can't do something like that in Method or Event. For the moment i can use a DLL for Add property in the object but i hope it will be (build in) next version of VFP.

Can't you define some standard classes? Do you really need to define class at runtime? As long as you must know what properties are available for the parameter object, it seems you already know hoe the object is defined. So... probably you can define it from the very begining. You can use CreateObject anywhere after that.

Or, I probably don't get what the problem is.

Vlad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform