Page 1 of 1

Main Stack scripts

Posted: Wed Oct 14, 2009 11:43 pm
by phaworth
I have a few message handlers in the main stack script of my application since they aply to every card in every stack in my application.

When I'm in browse mode, It seems that messages from the Revolution IDE are being passed to those handlers which seems a little weird to me. It doesn't cause any problems in my application because the handlers have code in them that happens to exclude the IDE messages but is this normal behaviour and if so, is there a way to disable that behavior?

Thanks,
Pete

Posted: Thu Oct 15, 2009 12:33 am
by Mark
Hi Pete,

Probably, this is normal, but because you don't tell us which messages you are dealing with, I can't really answer your question nor provide a good solution.

Best,

Mark

Posted: Thu Oct 15, 2009 12:39 am
by phaworth
The most troublesome one is the selectionChanged message.

Posted: Fri Oct 30, 2009 1:55 am
by phaworth
Any further input on this?

I have a selectionChanged handler which ends up as a front script. Should only be executed when I'm in run mode, but it ends up being called when I'm in edit mode on a card and, not surprisingly fails most of the time.

Is there a property I can check to see if I'm in edit mode or run mode?

Thanks,
Pete

Posted: Fri Oct 30, 2009 3:59 am
by Regulae
Dear Pete,

Possibly the "tool" function will be useful. When in browse mode, the tool returns "browse tool", in edit mode, "pointer tool", so you can ignore messages in edit mode with:
if the tool = "pointer tool" then
exit (handler name)
end if
Just a thought.

Posted: Fri Oct 30, 2009 4:19 am
by phaworth
Sounds perfect, thanks!
Pete