SuperCard Project to Rev
Mark Schonewille
m.schonewille at economy-x-talk.com
Thu Aug 10 03:52:24 EDT 2006
Dear John,
Wha tkind of error does your script return? You could try
on mouseUp
set the textFont of bg fld 1 of stack "Tablature" to "Guitartab"
set the textSize of bg fld 1 of stack "Tablature" to 48
end mouseUp
AFAIK, global variables work the same in all xTalks:
global gVar1,gVar2,...
You can put these global variable lists at the start of a handler or
at the top of an entire script.
How do you "leave" the palette? Do you just bring another window to
front or do you close the stack? Do you have a "Set" button to put
text into the fields of the mainstack or should it happen
automatically? I guess a Set button would be easiest:
on mouseUp
put fld 1 into fld 1 of stack "Your Mainstack"
end mouseUp
To create a palette, eithe rtype in the message box:
set the style of stack "Your Palette Stack" to palette; save stack
"Your Palette Stack"
or open it as a palettte each time you need it, from within a script:
palette stack "Your Palette Stack"
Don't set the style of a stack in the preOpenStack hanler. This will
cause the window to flash.
Best regards,
Mark
--
Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Download ErrorLib at http://economy-x-talk.com/developers.html and
get full control of error handling in Revolution.
Op 10-aug-2006, om 9:30 heeft John Baxter het volgende geschreven:
> I have a Tablature project I did in SuperCard about 10 years ago. I've
> imported it into Rev, but I'm lost on how to get it working. I have
> two
> custom fonts that need to both work in the main card field (on my
> mainstack). I have 2 palettes that have symbols (one palette has
> buttons
> [Tab font], the other a scrolling list [Chord font]). An example of
> the
> SuperCard Tab palette code:
>
> on mouseup
> set the textfont of bkgnd field 1 of wind "Tablature" to
> "GuitarTab"
> set the textsize of bkgnd field 1 of wind "Tablature" to "48"
> type "R"
> end mouseup
>
> The above code inserts the Tablature symbol into field 1, but
> doesn't work
> in Rev. I'm not sure how I can mix the two fonts in the mainstack
> field.
>
> I'm not sure what code I need for the mainstack as related to global
> vaiables , and also how to get the text into the main card field
> once I
> leave it to click the palette. In fact, I'm not even sure where to
> put the
> code to define the substack as a palette! Any help getting me
> started would
> be greatly appreciated.
>
> John
More information about the use-livecode
mailing list