revServer (again)

Björnke von Gierke bvg at mac.com
Fri Nov 25 09:09:47 EST 2011


I'm not 100% sure, but when using invalid syntax with external functions, you get the same error as when using them when no externals are loaded (for standalones at least). so just issuing "revOpenDatabase()" with invalid params like that, you won't actually find out anything at all.

So the question is, how to find out wether an external is loaded? Sadly that's extremely hard to do reliably. It's actually easier to do a fake db call that ought to work, for example using this code:

try
  revopendatabase("sqlite","doesRunOrNot.sqlite",,,)
  --make sure your process has writing rights for the files position
end try
if there is no file "doesRunOrNot.sqlite" then
  put "OH NOES!!!"
end if

The only other way i know is to find out all mainstacks, and all their substacks, then query each for their externals or externalCommands.

I wish there where an application space externalCommands, because after all, externals _are_ application wide, and not bound to a single stack in function. Especially with server and the way externals work on mobile platforms, where they're bound to the home stack (I think, maybe someone can test that).

On 25 Nov 2011, at 09:18, Malte Brill wrote:

> put revOpenDatabases() which came back with an error in function error. This makes me believe the external has not been loaded. Anyone got an idea what might cause this? Any idea how to debug this? Server surely is a different beast from desktop.  *sigh*


-- 
Watch live presentations every Saturday:
http://livecode.tv

Use an alternative Dictionary viewer:
http://bjoernke.com/bvgdocu/

Chat with other RunRev developers:
http://bjoernke.com/chatrev/





More information about the use-livecode mailing list