realbasic-nug
[Top] [All Lists]

RBScipts in 4.0.2 vs 3.5.2

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: RBScipts in 4.0.2 vs 3.5.2
From: Roger Carey <RogerCarey at mac dot com>
Date: Sat, 29 Jun 2002 22:18:18 -0400
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.


Thanks

Roger Carey
RogerCarey at mac dot com



<Prev in Thread] Current Thread [Next in Thread>
  • RBScipts in 4.0.2 vs 3.5.2, Roger Carey <=