Hi All
I need to init a cd fld and a graph line widget
This is my script:
on closeStack
local tfile, tData, tvalues
// write data to a text file
if fld "results" of cd "results" is not empty then
// pay attention to pathname for mobile
put specialFolderPath("desktop") & "/Margins.txt" into tFile
open file tFile for text write
put fld "results" of cd "results" into tData
write tData to file tFile
close file tFile
//init graph line widget
put "" into fld "results" of cd "results"
put "0,0" & return after tValues
put "No data to display" into fld "Graphlabel" of cd "results"
set the graphData of widget "Line Graph" of cd "results" to tvalues
else
end if
end closeStack
It works fine with a btn (mouseup handler), but with "on CloseStack" handler, impossible to init my 2 objects (fld and widget), but writing the text file works fine !
I have no errors. Strange LC behaviour.
Thanks for help.
Albert MEGUIRA
on CloseStack handler problem
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9580
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: on CloseStack handler problem
Change the handler to "closeStackRequest".
This fires before the stack closes. I bet this will fix it.
Craig Newman
This fires before the stack closes. I bet this will fix it.
Craig Newman
-
- Posts: 22
- Joined: Mon Apr 18, 2016 4:57 pm
Re: on CloseStack handler problem
Thank you Graig
It works
Albert MEGUIRA
It works
Albert MEGUIRA