RBScipts in 4.0.2 vs 3.5.2 (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: NilObjectException in Windows Menu
Next thread: Carbon compile crashes with Type 3 error?

Re: Hello again   -   Jan Erik Moström <
  RBScipts in 4.0.2 vs 3.5.2   -   Roger Carey

RBScipts in 4.0.2 vs 3.5.2
Date: 30.06.02 03:18 (Sat, 29 Jun 2002 22:18:18 -0400)
From: Roger Carey
I have an app that was written in REALBasic 3.5.2 uses RBScripts to
calculate values, automate steps with menu scripts, and validate inputs
with user specified rules. I have about 40 functions that a user can
call to get and set
information in my app. So that they do not need to use the RBScript
Input() function directly I wrote a wrapper to the Input() function for
each of my functions. An example is:

function StuffValueGet(ThingId as Integer, StuffSC as String) as String
dim r, si as string
si = "STUFFVALUEGET(" + str(ThingId) + kTSD + StuffSC + ")"
r = input(si)
return r
end function

My problem with the way scripts are processed in REALBasic 4.0.2 is that
for even very simple scripts, Running them for the first time takes
about 3 seconds longer in version 4 than in 3.5. This is due to the
headers that are the wrappers to my functions. This is a bad thing for
my app. If, for example, someone executes a script from a menu, waiting
3 seconds before it even starts executing is not going look good.

Even keeping the form and the RBScipt in memory between executions does
not seem appealing. If an app has 10 scripts, there is going to be
about 30 seconds a fairly processor intensive compiling if I tried to
compile all of the user scripts.

What I'm looking for from this group is: Is there another way to make a
API for RBScripts for an app? Does anyone else who uses RBScripts in an
app have this issue.

My app is Things and Stuff and it is at www.thingsandstuff.net. I have
an example project that has my headers and demonstrates the issue.
Contact me off list for a copy.


Roger Carey
<email address removed>

Subscribe to the digest:
<mailto:<email address removed>>
<mailto:<email address removed>>