Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you (I mean can I) programatically subclass a method
Message
De
18/01/2000 15:08:13
 
 
À
18/01/2000 14:59:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00319562
Message ID:
00319592
Vues:
11
Thanks Mike. I'll play with this.
The one potential problem I see is if there are any subclassed methods. Is there a way to check and copy it to the new object I will be creating?

-Isaac

>The thing to do in this case, is loop threw all the Options, saving stuff, remove the option, and add a new one based on a class you've pre defined (this isn't tested, just off the top of my head):
>
>
*OptionGroup.Ini()
>local loButton, lnLeft, , lnTop, lcName, lcCaption
>for lnI = This.ButtonCount to 1 step -1
>	loButton = eval('this.' + This.Buttons[lnI].name)
>	lnLeft = loButton.Left
>	lnTop = loButton.Top
>	lcName = loButton.Name
>	lcCaption = loButton.Caption
>	This.RemoveObject(lcName)
>	This.NewObject(lcName, 'YourClass', 'YourLibrary')
>	loButton = eval('this.' + lcName)
>	loButton.Top = lnTop
>	loButton.Left = lnLeft
>	loButton.Caption = lcCaption
>	loButton.AutoSize = .t.
>	loButton.Visible = .t.
>endfor
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform