Hi
I am probably misunderstanding what can and cannot be done when using the "include event sheet" method. At the moment my project is getting too big because I am , in each event sheet, loading files in and reading the data via ajax.
So I thought it would be a good idea to create an event sheet that allowed for the handling of loading files. Then each event sheet would call a function from that included event sheet (say call it B for now) and that function had a parameter to identify each call.
this all sounded good , I tried it with one call from one sheet to start with. The logic goes as follows :
On start of layout - Call function from included event sheet (B) with parameter (1)
(In included event sheet):
on function call - > if parameter equals 1 - load required file via ajax using unique tag.
Ajax on unique tag load completed
-> set variable recordcount(from called event sheet) to tokencount(look for record marker from ajax loadlastdata)
-> array(from called event sheet) set size (recordcount,1,1)
-> subevent -> loop through loadlast.data to populate array with data
-> blank subevent after loop finished - call function from called event sheet to load data to sheet.
The problem I have is that the final call to the function from the called sub even seems to loop. Now this logic was originally in the event sheet that was calling the included event sheet before the include event sheet even existed so I know this logic works. Also if I enable this code back in the original called event sheet the looping stops.
I have also tried to call the last function at the end part of on start of layout but this does not work as no data is loaded to screen.
Any help would be appreciated.