Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not sure how to use FLL's
Message
From
16/12/2000 19:28:32
 
 
To
15/12/2000 21:34:01
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00454320
Message ID:
00454435
Views:
24
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