Another Mystery

J. Landman Gay jacque at hyperactivesw.com
Wed Aug 10 11:22:08 EDT 2005


David Burgun wrote:
 >> David Burgun wrote:
 >>
 >>> Hi,
 >>>
 >>> I am getting an error saying it can't find background of button
 >>> "choosefile", so I hit the debug button in the error window and then
 >>> from the message box I type:
 >>>
 >>> put the label of button "choosefile"
 >>>
 >>> and it displays correctly
 >>>
 >>> Why it not finding the button correctly in the script?
 >>>
 >>> There are loads and loads of these little quirks that I am finding. I
 >>> really have never worked in such a buggy development environment as
 >>> RunRev.
 >>
 >>
 >> Doesn't sound like a bug to me. It sounds like you are asking Rev to
 >> locate a background button but your button is actually on the card.
 >> Your message box test is looking for a card button too. If you put in
 >> the message box:
 >>
 >>   put the label of bg button "choosefile"
 >>
 >> Do you get the same error?
 >>
 >> Your script should probably ask for "button 'choosefile'" instead of
 >> "bg button", if my guess is right.
 >
 >
 > No that works fine, the script actually reads:
 >
 > put the label of button "choosefile" of group "Artwork"
 >
 > In the script it reads:
 >
 > send "mouseUp" to button "choosefile" of group "Artwork"
 >
 > I just abbreviated it to save typing.

What happens if you leave off the "group" reference in the script:

   send "mouseup" to btn "choosefile"

If your group has background behavior set to true, then you might also try:

   send "mouseup" to btn "choosefile" of bg "artwork"

Do either of these work? It does sound like an issue with scope to me.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list