Bringing fields to front
ambassador at fourthworld.com
Sun Apr 27 00:51:57 CDT 2003
James Lewes wrote:
> on 4/26/03 7:45 PM, Richard Gaskin at ambassador at fourthworld.com wrote:
>> James Lewes wrote:
>>> I have imported a project from Supercard, which consists of 6 substacks and
>>> lots of card. On some of the cards there are 7 fields. In supercard you
>>> could write a script to bring a specific text field to the front, how can
>>> one do this in Runtimwe Revolution
>> How would you write that in SC, and does the same script work for you in
> The script in Supercard read
> on mouseUp
> select card field "page 7"
> set the textFont of card field "page 7" to "Courier"
> set the textHeight of card field "page 7" to auto
> set the textSize of card field "page 7" to 12
> set the height of card field "page 7" to 355
> set the width of card field "page 7" to 620
> set the loc of card field "page 7" to 310,192
> set the style of card field "page 7" to rectangle
> set the lockText of card field "page 7" to true
> choose browse tool
> end mouseUp
Why does it bring the same field forward twice?
Also, why does it reset the text attributes each time this handler is
Here's your Rev version:
set the textFont of field "page 7" to "Courier"
set the textHeight of field "page 7" to auto
set the textSize of field "page 7" to 12
set the height of field "page 7" to 355
set the width of field "page 7" to 620
set the loc of field "page 7" to 310,192
set the style of field "page 7" to rectangle
set the lockText of field "page 7" to true
set the layer of fld "page 7" to top
You may be able to trim it down further by removing any redundant text
attribute settings. The rules governing the relationship between text
attribute settings to a field object and chunks of text within it are
slightly more complex in SC than Rev. I think you'll find Rev a little more
straightforward about seing object-level settings expressed in displayed
text; unless those settings are periodicically changed elsewhere, you can
probably toss the first three lines of that handler.
Note that there's no need for tool mode chages: while SC's bringFront
command requires that an object must be selected with the pointer tool, Rev'
layer property can be set at ant time in any tool mode.
Fourth World Media Corporation
Developer of WebMerge 2.2: Publish any database on any site
Ambassador at FourthWorld.com http://www.FourthWorld.com
Tel: 323-225-3717 AIM: FourthWorldInc
More information about the use-livecode