can't access database functions from an inserted script
Trevor DeVore
trevor at mangomultimedia.com
Thu Jun 5 20:46:03 EDT 2003
I experienced the same problem when I started working on my first DB
app. My setup was as follows:
SplashStack - this stack is the executable that is built by
Distribution Builder
MainStack - This stack has the interface and is launched by SplashStack
and starts using DatabaseStack as a library
DatabaseStack - All database code
In order to get the database calls in DatabaseStack to work I had to
start using SplashStack as a library when MainStack opened. After I
did that everything worked great.
Hope this helps.
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com
On Thursday, June 5, 2003, at 05:54 PM, Eric Peden 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.
>
> I am building a system for providing interaction between an instructor
> and students in distance learning classes. This system has an
> administrative and client interface, implemented in two Revolution
> stacks. Because the two front-ends share quite a bit of core code, I
> have broken up functionality into several stacks that are shared
> between the front-ends.
>
> One of these shared stacks contains the database management code. It
> works fine in the IDE, but fails miserably when built as a standalone.
> The two stacks, mainStack and databaseUtilityStack, are saved as
> separate files, not substacks. databaseUtilityStack appears in the
> "Stack Files" of mainStack. For the purposes of debugging, I set up
> something like this:
>
> mainStack ::
> ============
> on openStack
> try
> get revdb_connections()
> answer "mainStack was able to call revdb_connections()"
> catch tError
> answer "mainStack was unable to call revdb_connections():" &&
> tError
> end try
>
> insert script of stack "databaseUtilityStack" into back
> tryDatabaseCallWithUtilityStack
> end openStack
>
> databaseUtilityStack ::
> =======================
> on tryDatabaseCallWithUtilityStack
> try
> get revdb_connections()
> answer "dbUtilityStack was able to call revdb_connections()"
> catch tError
> answer "dbUtilityStack was unable to call revdb_connections():" &&
> tError
> end try
> end tryDatabaseCallWithUtilityStack
>
>
> Opening the mainStack yields these results:
>
> "mainStack was able to call revdb_connections()"
> "dbUtilityStack was unable to call revdb_connections():
> 219,89,9,revdb-connections223,89,1"
>
> 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
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list