get_last
adys
Posts: 395
Is its safe to call get last from a function that called from the EVENT and not inside the Event code itself?
I mean if I have button event, and in the button event I call to function doX that call to function doY. inside doY i need the Tp that cause the event, so I call get_last with my global TP_LIST.
That works ok, I just wonder if that is safe and if what will happend if some event will enter in multiy TP enviroment.
thanks
Ady.
I mean if I have button event, and in the button event I call to function doX that call to function doY. inside doY i need the Tp that cause the event, so I call get_last with my global TP_LIST.
That works ok, I just wonder if that is safe and if what will happend if some event will enter in multiy TP enviroment.
thanks
Ady.
0
Comments
I have lots of written code that need to be changed - or to pass the TP or just to call get_last.
The question is if it safe, if there is a kind of build in protection on it
Or maybe I can get the new event data (event that I am still on the flow of the first event)?
An example:
BUTTON_EVENT
.....
get_last.
..
...
call Function X
call Function Y
..
Function Y Body
{
get_last
}
There is a chance that in the time between the button event and the get_last call inside function Y a new event will trigger.
The question is, what get_last will return? the new event TP of the current event TP?
Thanks, that what I wanted to know.
Isn't that in a sense what the code snippet that GSLogic provided below does. The get_last function w/in the whatever function occurs in the Button_Event and its returned value is passed to the function whatever.