Growing Pains for new SuperCard convert

Jim Ault JimAultWins at yahoo.com
Fri Apr 21 13:29:22 EDT 2006


On 4/21/06 9:17 AM, "Scott Rossi" <scott at tactilemedia.com> wrote:

> Recently, James Z wrote:
> 
>>> I am a long-time SuperCard user who is currently in the process of
>>> migrating to Revolution. I'm having a bit of a problem converting a
>>> SuperCard project over to Revolution. First off, I'm using the latest
>>> Mac version of Revolution which I have yet to register, and am working
>>> on a 1.42 GhZ G4. I have a card script in SuperCard containing approx.
>>> 40,000 lines of code. I copied this into Word and then from Word into
>>> the corresponding card script  in Revolution. It took 42 minutes to
>>> copy it from Word to Revolution. Now, when I try to edit this script or
>>> do anything in it (even closing the window), it pauses out for about
>>> 20-30 seconds. Even if I type a single character, I will get the busy
>>> cursor and have to wait around for it. So basically this chunk of code
>>> is virtually unusable to me.
> 
>> I'd suggest getting Bbedit and forget about word. I copied a 40,000+ line
>> file (a Scscript repeatedly copied and pasted to make a forty k line file)
>> from BBEdit to a button script in Revolution Studio 2.7 evaluation mode. It
>> took about 6 minutes to paste, but the card opens and the text seems ok.
>> No problems editing.
>> Word may have imported formatting and other baggage into your script.
> 
> Just wanted to echo this reasoning.  If you had any formatting at all in
> your original script (I haven't used SC in years -- does it allow script
> formatting now?), the process of copying over formatted script may have kept
> (or attempted to keep) the formatting intact.  As James suggests, try using
> a simple text editor to copy "clean" text over.
> 
> Alternatively, you save your script out to a plain text file, and then in
> Revolution execute this:
> 
>  answer file "My script:"
>  set the script of this card to url ("file:" & it)
> 
> This might go faster than cut-and-paste (but I wouldn't be surprised if you
> had to do some serious editing to get your syntax in line with Rev's).
> 
In addition to using Rev commands to read.write files, you could built a
repeat loop to slice all the functions into separate text files so that you
could concatenate them in smaller sections.

This would make debugging easier in that you only be running portions of the
entire script, adding stability to your process.

> Scott Rossi
>  answer file "My script:"
>  set the script of this card to url ("file:" & it)
further, you could append by....
   put the script of this stack into old
  set the script of this stack to (old & cr & url ("file:" & it))


Two other tips that I use in all my development stacks ...

on openstack
  put the seconds & the short name of this stack & "SCPT.txt" into FN
  --eg    -->   1137806106altBrCharts02SCPT.txt
  put specialfolderpath("desktop") & "/scriptsRev/" into pathh
  if not there is a folder pathh then create folder pathh
  put the script of this stack into url ("file:"&pathh & FN)
  --now the current version is saved in time sequence
end openStack

Also, I have a plugin toolbar button (altPlugins) that both saves the stack
file and writes the current version of the stack script to the 'scriptsRev'
folder.  Since I have a copy of all of my revisions I decide I want, I can
use BBEdit 'Search All Files in folder []" to locate any version of any
handler I have written+saved.  You need to know that my programming style is
to put all the handlers I can in the stack script.

Have fun with the new tool box.

Jim Ault
Las Vegas





More information about the use-livecode mailing list