2 questions for CS_TBL
in the following event hooker:
I understand that you are casting the context object as a TSmartSpinner, and then passing data cast as a TEvent to its 'ev' method. But what does the condition if TSmartspinner(context) test?
It seems like it simply checks the existence of the context object.. but of course, there would be no need to cast it as a TSmartSpinner object if that were the case, so apparently there's something else going on here i'm not aware of. Would you mind filling me in?
Second question, in your update() method, you emit a new event with id = EVENT_SMARTSPINNERUPDATE. In the documentation you explain that this is to be captured by external hook functions. Could you give me an example of why you would want this to be hooked in a program? I.e. what would a hooker do upon receiving the above event?
I think that will help me understand the usefulness a bit more. Thanks CS!
in the following event hooker:
Function eventhook:Object(id:Int,data:Object,context:Object) If TSmartspinner(context) TSmartspinner(context).ev TEvent(data);Return data EndFunction
I understand that you are casting the context object as a TSmartSpinner, and then passing data cast as a TEvent to its 'ev' method. But what does the condition if TSmartspinner(context) test?
It seems like it simply checks the existence of the context object.. but of course, there would be no need to cast it as a TSmartSpinner object if that were the case, so apparently there's something else going on here i'm not aware of. Would you mind filling me in?
Second question, in your update() method, you emit a new event with id = EVENT_SMARTSPINNERUPDATE. In the documentation you explain that this is to be captured by external hook functions. Could you give me an example of why you would want this to be hooked in a program? I.e. what would a hooker do upon receiving the above event?
I think that will help me understand the usefulness a bit more. Thanks CS!