trevordevore / levure

Application development framework for LiveCode
MIT License
32 stars 14 forks source link

app.livecodescript appropriate for other calls? #73

Closed macMikey closed 7 years ago

macMikey commented 7 years ago

I have a routine in app.livecodescript that I would also like to be able to call from my project proper. There is no discussion on the wiki about using any handlers inside of it other than to directly support levure, so a) Is it ok and b) Might it be a good idea to note in the wiki whether or not it's ok so that there isn't a surprise in the future with the behavior changing?

trevordevore commented 7 years ago

You can modify that script to your hearts content. Levure will dispatch messages to that stack, and you should make sure you handle certain messages so that your app works, but it doesn't really care what you put in there.

The docs will need to be updated so that this point is clearer.

trevordevore commented 7 years ago

"clearer" should be "clear".

macMikey commented 7 years ago

I guess I was not clear. Is that also intended to be in the message path for the rest of the app?

trevordevore commented 7 years ago

Ah. Yes, it is intended to be in the message path. The loadApplicationStack handler explicitly puts the app stack in use. That allows you to handle message like shutdownrequest and shutdown in a central location.

trevordevore commented 7 years ago

I've added a note to https://github.com/trevordevore/levure/wiki/app.livecodescript