Default tool on open stack

Mark Waddingham mark at livecode.com
Tue Apr 12 14:35:42 EDT 2016


On 2016-04-12 15:25, Tim Selander wrote:
> Hi again,
> 
> Basically, my problem is solved with Peter's work-around. However,
> after reading some of the various other comments, including
> Jacqueline's here, it strikes me that this has to be considered some
> kind of bug, doesn't it?

Maybe :)

It is always important to remember that the IDE uses many of the same 
'meta-level' editing features the engine provides as user stacks do. Due 
to this, it defaults to assuming that (unless explicitly marked as such 
- as suggested in my previous post) any user stack loaded into it is 
wanting to be edited.

I do think that if you are providing tools to use in the IDE for others, 
then it is better to follow its requirements in that regard (e.g. via 
the style property or via being a plugin) than switching the tool in 
user code which will (with the way the engine / IDE currently works) 
always cause some conflict at some point.

That being said, there are two IDE library APIs which handle the tool 
switch without going behind the IDE's back:

     revIDEChooseBrowseTool
     revIDEChoosePointerTool

Using either of these in a preOpenStack/openStack handler does appear to 
make the setting stick.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list