External function callback.

The use of specific JADE features and proposals for new feature suggestions
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

External function callback.

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:59 am

by Tim M >> Sun, 17 Aug 2008 12:41:21 GMT

To minimize the requirement of external methods, how about a way of providing jade methods as a callback? I understand the complexity of this but I can see this still entirely do-able.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: External function callback.

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:59 am

by Murray Symon >> Mon, 18 Aug 2008 7:21:05 GMT

Yes, I would agree that this would be convenient. Hooking C callbacks back into Jade is something I have been investigating and experimenting with in some of my spare time as a lot of the library calls require
such an interface. I presume that to implement it the Jade runtime
(or compiler?) would need to build a C wrapper to be passed as the callback function. As far as I can see, the C process that invokes
the callback must be able to do so as per a native c function call.

Murray Symon.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: External function callback.

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:59 am

by Allistar >> Mon, 18 Aug 2008 22:07:12 GMT

It should be possible to develop a C++ class that wraps the callback back to Jade. It wouldn't be as ideal as having a straight callback as you;d still need a bit of your own C++ glue code in the middle to tie the two ends together. I don't see any reason why you couldn't pass an object reference and JadeMethod reference to an external function/method which can then be called back by some C++ code.
--
A.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: External function callback.

Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:59 am

by Murray Symon >> Tue, 19 Aug 2008 7:06:50 GMT

Yes, I agree that it's possible to do it yourself in some C++ code, as
I have done some tinkering in that area myself. However, I was backing up Tim where he said it would be nice if Jade provided such a facility. It would fill in a gap in the external interfaces capabilities.
I imagine that it would just require a DLL and some Interface classes.


Return to “Feature Discussions”

Who is online

Users browsing this forum: No registered users and 9 guests

cron