Questions on frontscript
Posted: Mon Feb 03, 2014 8:44 pm
Hi all,
I'm trying to make some kind of very basic interface to ease OOP in livecode. Let's say I have a card that represents a namespace, and a bunch of behavior buttons on it.
I'd like to implement a contextual menu to Create New Class, Create SubClass, Delete Class, Edit Script etc (just like the Ctrl-Shift-RightClick thing)
When must I insert the frontscript to acheive this? Do I need to remove it at some point?
How does the frontscript know which control was clicked?
Regarding the "Delete Class" action, If I do it with this contextual menu, it's all right... But what if I press the delete key? (I understand there is no userLevel anymore...) I cannot use the deleteButton message from outside the button itself, and I'd like to avoid that...
The point of course is to keep track of all the classes in that namespace (in a card custom property) so that I can't create a subclass with no parent class or delete a class that have subclasses...)
Not sure if my questions are relevant. Thanks for any nudge,
Fred.
I'm trying to make some kind of very basic interface to ease OOP in livecode. Let's say I have a card that represents a namespace, and a bunch of behavior buttons on it.
I'd like to implement a contextual menu to Create New Class, Create SubClass, Delete Class, Edit Script etc (just like the Ctrl-Shift-RightClick thing)
When must I insert the frontscript to acheive this? Do I need to remove it at some point?
How does the frontscript know which control was clicked?
Regarding the "Delete Class" action, If I do it with this contextual menu, it's all right... But what if I press the delete key? (I understand there is no userLevel anymore...) I cannot use the deleteButton message from outside the button itself, and I'd like to avoid that...
The point of course is to keep track of all the classes in that namespace (in a card custom property) so that I can't create a subclass with no parent class or delete a class that have subclasses...)
Not sure if my questions are relevant. Thanks for any nudge,
Fred.