EMPTY

Klaus Major klaus at major-k.de
Fri Jun 18 16:35:49 EDT 2004


Hi Richmond,

> dear xtalk afficionados,
>
> 2 related problems:
>
>
> Imagine 2 RR stacks called ?A? and ?B? respectively.
>
> There is a button on stack ?A? that contains the following
> command:
>
> on mouseDown
>   send "menuPick Import As Control|Image File..." to button
> "File" of stack "revMenubar"
>     set the name of img 1 to "XX"
>    copy img "XX" to card 1 of stack ?B?
>     delete img "XX"
> end mouseDown
>
> What this command is meant to do is to allow the user to
> import an image into stack ?B? by clicking on the button on
> stack ?A?......
>
> 1.	It works in Mac OS X .... but does not seem to in
>  Windows 98
>
> 2.	Any idea of a ?quick and dirty? way to do this without
> sending a menuPick command (i.e. so the stack will function
> equally well under Metacard as under RR)......?
>
> 	Richard Gaskin has been extremely kind in pointing me to
> his Handy Handlers at the revJournal site...but I am a bit
> of a lazy slob and am sure there is a quicker and simpler
> way round this problem.
>
> would be extremely grateful........

this one will also work WITHOUT the Rev-Gui, means in MC,
and does the same :-)

on mouseDown

You tend to leave no choice to the user ;-)
With a "mouseUP" the user HAS the chance to make up his/her mind...

on mouseup
    answer file "Is there any beer left?"
    set the defaultstack to "?B?"
    import paint from file it
    set the name of last img to "XX"
end mouseup

Et voila :-)

> richmond mathewson

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the use-livecode mailing list