can't access database functions from an inserted script

Jan Schenkel janschenkel at yahoo.com
Fri Jun 6 00:13:00 EDT 2003


--- Eric Peden <ericpeden at homemail.com> wrote:
> For some reason, when I insert a script from a
> utility stack into the back 
> from a main stack, the inserted script is unable to
> call any database 
> functions.
> 
> [snip]
> 
> So, I know that revdb_connections() is available,
> but the utility stack is 
> unable to call it. I'm not sure how to decode the
> error value that is 
> generated. I include the database library when I
> build the standalone 
> (otherwise mainStack would fail too, right?); is
> there some reason why the 
> utility stack would be unable to access those
> functions? Is there a more 
> efficient approach I should be following?
> 
> I'm using Rev 2.0 on OS X; however, OS X and OS 9
> standalones both exhibit 
> the behavior. Any help would be immensely
> appreciated; I've got to this 
> software ready in time for it to be used in the
> distance courses being 
> taught this fall, and I've already lost a month's
> worth of opportunities 
> for feedback since I've been unable to distribute
> standalones to our 
> testers.
> 
> --
> eric
> 

Hi Eric,

The key thing to remember is that backScripts cannot
use the functionality of scripts that are 'lower' in
the message path hierarchy -- so it can't access
frontScripts, card scripts, or the scripts of stacks
in use. It can only use the ones that are 'higher'.
So if the revdb library is loaded 'below' your script
at runtime, it can't call its functions. In the dev
environment, a slew of backScripts are loaded first ;
perhaps this isn't the case in a standalone.
Is there a reason why it's a backScript and not just a
stack that you start using ? Then it would work just
fine (99% probability).

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com



More information about the use-livecode mailing list