Your main problem is issuing the "set proc to" immediately after the "do form 
test".

Because the form is non modal the "set proc to" destroys the procedure path and 
hence your call to create the object fails.

This way of doing it would only work if the form was modal because the "set 
proc to" would only be actioned once the form was released.

My previous comment about adding the .\ to the set proc to is good practice 
though, as long as you are pointing to the correct folder. I usually make all 
my path and proc declarations relative to the folder I am in (normally the 
application folder) and in this way I will always be able to see the "pathed" 
folders and also, which is more relevant, immediately notice the fact that the 
current folder (curdir()) has been changed in the same way you have found i.e 
you generate an immediate error.

The project hierarchy looks like this:

Application
---- Data
---- Programs
---- Subroutines
---- Forms
---- Libraries
---- Graphics
 .. etc

Dave



-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Dave Crozier
Sent: 19 June 2015 14:30
To: ProFox Email List
Subject: RE: SET PROCEDURE and forms

Man-wai,
In fact if you make your 

set procedure to .\calendarclass.prg

Then you  project works

Dave



-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Dave Crozier
Sent: 19 June 2015 14:13
To: ProFox Email List
Subject: RE: SET PROCEDURE and forms

Manwai,
Take all the class definitions and move them into the main.prg .

The main.prg should look like this

DO FORM test
*
Return

define class cmdDow as commandbutton
...
...
Etc...



-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Man-wai Chang
Sent: 19 June 2015 14:00
To: ProFox Email List
Subject: Re: SET PROCEDURE and forms

OK, I placed all relevant codes into a calendar.zip in my Google Drive:

https://drive.google.com/file/d/0B3FEgfoEp1bSSnUzeDFkdk1TTDA/view?usp=sharing

On Wed, Jun 17, 2015 at 8:45 PM, Dave Crozier <[email protected]> wrote:
> You can't send attachments to the group, you will have to post them 
> elsewhere and send a link
>
> Dave
>
> -----Original Message-----
> From: ProFox [mailto:[email protected]] On Behalf Of Man-wai 
> Chang
> Sent: 17 June 2015 13:42
> To: ProFox Email List
> Subject: Re: SET PROCEDURE and forms
>
> Attaching the zip file containing everything I said.
>
> Drop the "haha" part from the filename (to escape from Gmail's attachment 
> scan that denies *.sct)!
>
> On Tue, Jun 16, 2015 at 7:43 PM, Man-wai Chang <[email protected]> wrote:
>> I just found that a form doesn't take the SET PROCEDURE TO line from 
>> the program that calls it.
>
>
> --
>  .~. Might, Courage, Vision. SINCERITY!
> / v \ 64-bit Ubuntu 9.10 (Linux kernel 2.6.39.3) /( _ )\ 
> http://sites.google.com/site/changmw
> ^ ^ May the Force and farces be with you!
>
>
> --- StripMime Report -- processed MIME parts --- multipart/mixed
>   text/plain (text body -- kept)
>   application/octet-stream
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to