Help with C externals

Pete pete at mollysrevenge.com
Thu Mar 8 13:08:31 EST 2012


Hi Paul,
Yes the callbacks are certainly one of the things I want to get access to
but you're raising doubts as to how feasible that might be.  But there are
other things too.

I guess the first thing I'm trying to ascertain is if it will be possible
to call the C API's directly from LC or if there will have to be some
intermediate external glue that sits between LC and the SQLite C API.

Pete

On Wed, Mar 7, 2012 at 11:04 PM, Paul D. DeRocco <pderocco at ix.netcom.com>wrote:

> > From: Pete
> >
> > I'm seriously considering trying to use the C API for sqlite
> > databases instead of the rev db functions.  I'm finding too
> > many little inconsistencies and inefficiencies in the rev routines.
> >
> > The problem is I know nothing about using external libraries
> > with LC or the sqlite C API.  I'm hoping there's someone out
> > there who can at least tell me if this is feasible.  Check
> > out http://www.sqlite.org/c3ref/intro.html for documentation
> > of the C APIs for sqlite
>
> My experience with externals is that it is just a load of busywork to write
> an interface layer that calls external functions. The difficulty arises
> when
> you need to deal with callbacks, and I assume SQLite uses some mechanism
> like this for reporting progress or timeouts, or allowing long operations
> to
> be aborted. So that's what you should investigate first, to decide whether
> you can do everything you need with an external.
>
> In the past, I've dealt with the issue of callbacks from asynchronous
> events
> by having those callbacks record their state in a variable or fifo, and
> then
> use timer messages to poll the variable or fifo at a rate sufficient to the
> application. But that doesn't deal with callbacks that occur during the
> time
> when a function called by your code is in progress, since you're not
> handling timer messages during that time.
>
> --
>
> Ciao,               Paul D. DeRocco
> Paul                mailto:pderocco at ix.netcom.com
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge <http://www.mollysrevenge.com>



More information about the use-livecode mailing list