Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Real problem with classes
Message
 
 
À
05/06/2001 22:57:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00515559
Message ID:
00515580
Vues:
21
Randy,

VFP is telling you that the object does not have a Show() method. A container class does not.

If you want an object that is created at runtime to be a visible part of a form you must use AddObject() to add the object to the container that you want it in. For example:
thisform.AddObject( "oRuntimeObject", "myclass" ) 
with thisform.oRuntimeObject
   .Top = ...
   .Left = ...
   .Visible = .t.
endwith
>I am having a problem with classes. It has not been a problem for me in the past because I have only used them to drop on forms.
>
>My problem is that when I execute (in the command box):
>oObj = createobject('myclass')
>oObj.visible = .t.
>
>The object appears in its full glory in the debugger, but nothing shows on the screen...at all. This happens with every class that I try.
>
>Anyone have any ideas?
>
>BTW: if I try to execute: oObj.show(1), I get the error 'Property SHOW not found'
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform