"create" command jumps from "run" to "edit" mode

Sjoerd Op 't Land sjoerdoptland at mac.com
Sun Dec 30 07:43:13 EST 2001


Victor Eijkhout wrote/ schreef:

> If I'm developing a stack in Rev, issuing the "create" command makes
> Rev jump from "run" to "edit" mode.
> 
> For example, I have a button with script
> on mouseup
> create field "test"
> end mouseup
> 
> I click on the hand, I click on the button, and now the pointer is
> the active tool.
> 
> What's happening here?
This is just expected behaviour. If you want to do this things hidden, you
need to change two things:

1. the tool should be 'browse' at the end of your script:
  choose browse tool

2. some flickering of the tools palette can be avoided too (only necessary
in IDE)
  lock screen
  -- do things
  unlock screen
  -- although the screen is automatically unlocked when finishing all
running scripts

So your new 'undercover' script is:

  on mouseUp
    lock screen
    create field "test"
    choose browse tool
  end mouseUp

Hope this helps.

Regards, / Groeten,
Sjoerd




More information about the Use-livecode mailing list