Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Real problem with classes
Message
 
 
To
05/06/2001 22:57:13
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00515559
Message ID:
00515580
Views:
20
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
Previous
Reply
Map
View

Click here to load this message in the networking platform