Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Procedural Code
Message
From
30/10/1998 13:27:14
 
 
To
30/10/1998 12:46:43
Ian Matthews
Up & Running Technologies Inc
Chestermere, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00152898
Message ID:
00152935
Views:
16
Ian,

It seems that you might need to do a bit more studying on object properties, methods, and events. There are alot of books available, and everyone has their own favorites, but I recommend that you consider picking up one of Jim Booth's books. I think his new one on 6.0 is available.

More specifically, as DF said, you do not need the procedure/end procedure lines in your method. The method IS the procedure. So, then a button that is on that form can have in it's click event something like the following
LOCAL lSuccess 
lSuccess = thisform.GetSomeLogical()
For the case of the code you include in your post, may I suggest that you consider putting
this.visible = deleted()
this.visible = !deleted()
in each of the object's own refresh() methods?

>Thanx for the effort, but it did not work
>
>if I put the following code into a new METHOD of the form, VFP informs me METHODS CAN NOT CONTAIN NESTED PROCEDURES...
>
>*
>* Deactivate deleted records edit fields on the Contacts from
>*
>PROCEDURE contactsdeletecheck
> IF deleted()=.t.
> thisform.txtdeleted.visible=.t.
> thisform.detailsframe.enabled=.f.
> thisform.txtfirst_name.enabled=.f.
> thisform.txtlast_name.enabled=.f.
> thisform.txttitle.enabled=.f.
> thisform.txtcompany.enabled=.f.
> ELSE
> thisform.txtdeleted.visible=.f.
> thisform.detailsframe.enabled=.t.
> thisform.txtfirst_name.enabled=.t.
> thisform.txtlast_name.enabled=.t.
> thisform.txttitle.enabled=.t.
> thisform.txtcompany.enabled=.t.
> ENDIF
> RETURN
>ENDPROC
>
>>I would put it in a custom method for the form itself.
>>
>>>I can not find a place to put procedure code that will allow me to modify a form. Specifically if a simple test is .t. then I want several fields on a form to be disabled.
>>...snip
Previous
Reply
Map
View

Click here to load this message in the networking platform