Hi Man-wai Chang: It's may be better to put this SET PROCEDURE TO CALENDARCLASS.PRG in the Load or Init of the form, and the SET PROCEDURE TO on the Unload or Destroy, so you don't have to worry for the Modal setting of the form.
Regards.- 2015-06-20 8:24 GMT+02:00 Man-wai Chang <[email protected]>: > Please disregard my last message about fixing the problem via a dummy > function in CalendarClass.PRG. > > The real problem was the way I tested my codes. The form test.scx is a > mode-less form. SO when I tested it by: > > *** begin main.prg *** > set procedure to calendarclass.prg > do form test > set procedure to > *** end main.prg *** > > The mode-less form test.scx immediately return control to the next > line of code in main.prg (above), which was "set procedure to". So the > form didn't any chance of seeing calendarclass.prg! > > The sample codes I published in my Google Drive left out the last SET > PROCEDURE TO, so might have misled you all. My apology to everyone! > > My VFP projects used modal forms most of the time and so ..... :) > > My apology again! > > > On Fri, Jun 19, 2015 at 9:12 PM, Dave Crozier <[email protected]> > wrote: > > 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/CAGQ_Ju=zOFXVc6y_h3fhT6Ou3r72evCYnjPVN=ccuh0ajmo...@mail.gmail.com ** 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.

