Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not sure how to use FLL's
Message
From
17/12/2000 00:53:06
 
 
To
16/12/2000 23:49:18
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00454320
Message ID:
00454462
Views:
39
Bela:

Okay ... had to go the PUBLIC the goMyForm method :o(
But .. IT WORKED!! :O) THANKS.

Problem:
I have 2 seperate programs that run simultaneously and reacts to each other, and, both run timers. Now, when I run cppTimer on both ... no timer functions are avail. However, if I run cppTimer in 1 program and the VFP Timer in the other, all's fine.

What's happening? Does calling InitTimers() in 2 seperate programs running at the same time crash the cppTimer.fll?

TIA

Mal

>Bela
>
>Thanks for your advice and the cppTimer ... hope I can get it to work :o)
>
>I try to implement your suggestions although I don't have a goApps I'll try to incorporate something similar.
>
>Will let you know how it goes.
>
>Thanks Bela
>
>P.S. By the way, Larry's _Screen.ActiveForm.MyFunc() worked. Had to use a macro subst. though:
>
>This did not work:
>SetUpTimer(1,200,"_Screen.ActiveForm.DoThisMethod()")
>
>But this did:
>lcMethod = _Screen.ActiveForm.DoThisMethod()
>SetUpTimer(1,200,"&lcMethod")
>
>Strange eh?
>
>:o)
>
>
>
>
>
>>Hello Mal,
>>
>>thank you for using my cppTimer!
>>
>>You assume that cCommand will be evaluated as would be eveluated by a VFP evaluate() command without any object enviroment.
>>So you must provide a valid object reference.
>>
>>e.g.:
>>
>>public goMyForm
>>
>>goMyForm=thisform
>>
>>WITH THISFORM
>>.....SetUpTimer(1,200,"goMyForm.DoThisMethod()")
>>ENDWITH
>>
>>I hope this helps.
>>
>>bb
>>
>>U.I.: if you don't like public variables, (as me), there is a other way.
>>I always have an goApp public variable. Add a method to this object like OnCPPTimer:
>>
>>lparameter tcFormName, tcFormMethod
>>
>>for i=1 to _screen.FormCount
>> if _screen.forms[i].name=tcFormName
>> evaluate("_screen.forms[i]."+tcFormMethod+"()")
>> exit
>> endif
>>endfor
>>
>>
>>And here is how to start the timer:
>>WITH THISFORM
>>.....SetUpTimer(1,200,"goApp.OnCppTimer("+thisform.name+",anymethodname)")
>>ENDWITH
>>
>>of course your form name must be unique among other forms.
>>
>>
>>>Hi:
>>>
>>>I Downloaded cppTimer.FLL from the Files section.
>>>
>>>The sample program runs great!!!
>>>
>>>This is how you start the timer and execute a command:
>>>SetupTimer(nTimerNo,nTimerInterval,cCommand)
>>>i.e. SetUpTimer(1,200,"QUIT")
>>>
>>>From within my form, SetUpTimer(1,200,"QUIT") executes and shuts down
>>>my program.
>>>
>>>However, a line such as ...
>>>
>>>WITH THISFORM
>>>.....SetUpTimer(1,200,".DoThisMethod()")
>>>ENDWITH
>>>
>>>does nothing.
>>>
>>>What's up with that?
>>>
>>>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform