How does a command find out who called it?

Ken Corey ken at
Wed Feb 1 09:42:37 CST 2012

I have some tiny http utility functions I'm using to do a 'get' on an 
iOS device.

Up to now, I've had these functions in the same card as the handlers 
dealing with that card.  Now I want to make them into a library.

The problem I'm hvaing is that they are asynchronous: they require a 

Up to now, it was in the same card, so I didn't have to specify it.

Unfortunately, now that the functions are in a separate stack being used 
as a library, I need to know the name of the calling card, so I can know 
the context in which to do the callback.

Right now my httpGet looks like this:

httpGet "","myCallback"

The code returns immediately, and when the answer comes back, nyCallback 
is called with the result.

However, my library dies because there's no callback with the given name 
in it.  It's in the original calling card.

I'd rather not change the API if I could get away with it...

Anyone know how to find out who called a given command?


More information about the use-livecode mailing list