|
Previous Top Next |
Prototype: | (none),VIRTUAL |
This method is designed to be overridden in the project or application. The Icetips Thread Limiter template generate 3 embed points, one in the data section and two in the code section, one before and one after the generated PARENT.TakeLimit call. The PARENT method calls the ActivateThread method of the global class which in turns calls the ActivateWindow method of the local class.
Example:
ITThreadLocal Class(ITThreadLimitClass)
TakeLimit Procedure,VIRTUAL
End
ThisWindow.Run PROCEDURE
Code
ITThreadLocal.Init('Browsepeople')
ITThreadLocal.SetProcedureLimit(5)
If Not ITThreadLocal.CheckProcedure(ITThreadLimit)
Return LEVEL:Fatal
End
ReturnValue = PARENT.Run()
RETURN ReturnValue
ThisWindow.Init PROCEDURE
Code
If Not ITThreadLocal.AddProcedure(QuickWindow)
Return LEVEL:Fatal
End
ITThreadLocal.TakeLimit Procedure!,VIRTUAL
Code
SetCursor() !! Clear cursor if the "Icetips Hide Windows while loading" template is active.
Message('You can only run ' & SELF.MaxRuns & ' instances of the ' & SELF.ProcedureName)
PARENT.TakeLimit
This shows how you can place a message before PARENT.TakeLimit to take the appropriate action.
See also: