Graphic Tools Mystery

Graham Samuel livfoss at mac.com
Thu Sep 19 08:01:46 EDT 2013


Folks 

For a long time now, I have had what I took to be a bug in a desktop app (Mac and Windows) I'm working on. To summarise, the app has a tool palette which allows drawing of graphics in a particular window in the app. All of the standard graphic tools work on this window in the IDE, but when I create a standalone, just some, such as polygons and lines, work normally, and some others, such as rectangles and ovals, don't. What seems to happen is that in the ones that don't work, the engine sees the mouseclick but it somehow swallows the subsequent drag, so such graphics all end up the minimal size.

I finally got round to boiling down this app to a simple form that I could use in a bug report. RunRev (actually Elanor) quite quickly came up with a reply - here's an extract:

> Comment # 6 on bug 11183 from Elanor
> Hi Graham
> 
> This is not actually a bug, the choose command, for choosing a tool, is only
> for editable windows, that is editable stacks in the IDE. The graphic tools
> don't really work as you want in a standalone as it is not an editable window


Well, this foxed me, but I don't want to distract the mother ship, so I thought I would bring the issue to this list. The thing is, I included a new line in my simplified app which recorded the mode of the peccant stack as it opened in the standalone - it turns out to be 1. This is the mode of an editable stack! Looking hard through the available documentation, all I can find suggests that graphic drawing tools will work for a stack in this mode: what's magic about editing such a stack in the IDE, where all the tools work? In the IDE, such tools are chosen from a palette, which of course isn't editable, but that works, so the reference to the editable window by Elanor must be to the target of the tools, not their origin. I just can't see the difference between what I'm doing and what the IDE is doing.

Can anyone explain this? BTW I should say that I checked the cantSelect and cantModify of the stack also, and they are false. I should also say that Elanor did give me a workaround (do the drag myself!) but that doesn't explain what's been happening here.

TIA

Graham

Sent from my iPad



More information about the use-livecode mailing list