[Gambas-devel] Callbacks
Benoit Minisini
gambas at ...1...
Mon May 30 17:12:36 CEST 2005
On Friday 13 May 2005 13:24, Daniel Campos wrote:
> Hi Benoît:
>
> In finishing CallBacks management at gb.api. I have no problem
> to send the parameters to the callback, as GB.Push() allows
> to do that without problems, however, the return value is
> more complicated to manage:
>
> I've implemented a "SetReturn()" method to tell the callback the
> value to return, however it would be nice if the programmer could
> just act like in a normal function, that is "RETURN Value". However
> I have no way to know in gb.api the return value one I've called
> the function, even If I'm able to release or not that value.(GB.Call)
>
> "SetReturn" is problem if there are nested callbacks, too.
>
> Regards,
>
> D. Campos
>
If you use GB.Call() to call the function, then the returned value of the
called Gambas function automatically becomes the return value of the
component C function, as if you have called GB.ReturnXXX().
I think it is what you need... :-)
--
Benoit Minisini
mailto:gambas at ...1...
More information about the Devel
mailing list