Page 1 of 1

Message handler called during compile

Posted: Sat Nov 02, 2024 1:17 pm
by andyh1234
Hi,

I have a simple routine

on setupstack
put x into fld "y"
end setupstack

that I would like to run everytime I run the app in the iOS simulator. Is there a function or message handler that is called every time the test button (or build for device) is pressed I can hook into?

Would save me having to remember to call the routine to clear everything before each test.

Thanks

Re: Message handler called during compile

Posted: Sat Nov 02, 2024 4:23 pm
by SWEdeAndy
andyh1234 wrote:
Sat Nov 02, 2024 1:17 pm
Is there a function or message handler that is called every time the test button (or build for device) is pressed I can hook into?
Yes, the test button/menu triggers the revIDEDeployAction message. You can hijack it by inserting this handler into front:

Code: Select all

on revIDEDeployAction  
   put x into fld "y" of MyCard of MyStack ## Or any code or other handler you want to invoke here
   pass revIDEDeployAction ## Releases the message to run its course
end revIDEDeployAction

Re: Message handler called during compile

Posted: Sat Nov 02, 2024 4:23 pm
by andyh1234
Thank you.