Stuck in "Background" window
pixelbird at interisland.net
Tue Mar 18 15:24:54 EST 2003
> Date: Tue, 18 Mar 2003 10:21:49 -0600
> From: "J. Landman Gay" <jacque at hyperactivesw.com>
> Organization: HyperActive Software
> Subject: Re: Stuck in "Background" window
> On 3/17/03 11:28 PM, Ken Norris wrote:
>> Well here I go again. This thing keeps ending up in the stack's background
>> window instead of the card window.
>> on mouseUp
>> set the defaultFolder to "Doggies"
>> answer file empty with filter "JPEGs,*.jpg"
>> lock screen
>> import paint from file it
>> set itemDel to "/"
>> cut image (last item of it)
>> start editing group "myImageGroup"
>> paste image (last item of it)
>> send "stop editing" to me in 20 milliseconds
>> open window "Practice1" -- **Even with this
>> unlock screen
>> send "choose browse tool" to me in 20 milliseconds
>> end mouseUp
>> ...any ideas?
> The "stop editing" command needs a background reference. It should be
> "stop editing bg 'myImageGroup'", or "stop editing this bg".
According to the docs, you don't need that unless you are closing a
background other than the one you're currently working on, but I will
certainly try it...
OK, it had no effect. The thing still ends up in the background window.
> Also, I
> don't think you need to "send" the "stop editing" command, it should
> just work inline, but I haven't tested it.
Probably true. It wasn't like that to start with. I was just fishing for a
cure. That made no difference either.
I tried replacing the line with:
1) stop editing group "myImageGroup"
2) send "stop editing group myImageGroup" to me in 20 milliseconds
3_) stop editing (like it was originally)
Also I tried a number of commands which should have closed the background
window, opened the "Practice1" window , etc.
None affected it at all.
What I end up with _every time_ is a window in the place of the stack window
with a titlebar that says:
[ Practice1(background"myIma... ]
In the Rev UI, I can make it go away by clicking "Practice1" in the "Window"
menu, which is ALREADY checked. This brings back my stack window in editing
mode (pointer) which indicates the script is quitting at the "stop editing"
command without an error, but at least it shows the background with the
proper image installed.
Now (get this), while stuck in the background window, if I click the
'browse' tool, the background window disappears, and the image is behind the
buttons. NOTE: I said the IMAGE. The imported image is there (which was
supposed to be grouped), and the original graphic image is under it, but the
background group is empty and inaccessible (although the Application
overview says it's still there).
All I want to do is be able to _replace_ a background group image with
another image from a file, under script control.
I'm beginning to think it cannot be done. I've tried everything I can find
or think of. I have spent at least 40 houirs poring over the docs, archives,
emailing the list, trying all kinds of methods, and rewriting, bending and
twisting scripts until I have blisters on my fingers. Still no success. If
it _can_ be done, it shouldn't be this difficult. Am I really trying to do
something that's never been done before? Hard to believe.
More information about the use-livecode