realbasic-nug
[Top] [All Lists]

Re: [Semi-OT] Call for Developers/Gauging Interest

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: [Semi-OT] Call for Developers/Gauging Interest
From: "P. George" <invest at juun dot com>
Date: Thu, 30 Sep 2004 17:27:07 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <415B4314 dot 1020504 at realsoftware dot com> <08734DBC-132B-11D9-8DC5-0003931D8DCC at componentx dot com> <604933B8-132B-11D9-BC5E-00039378202C at realsoftware dot com> <35029602-132D-11D9-BC58-000393DB941A at mac dot com>
How about a little pseudo-compiler than can take a header file, suck out all the constants, and write declares for the functions? To get the right library, it would plow through DLLs in a folder. That way, these things would be header file oriented rather than library oriented and we could apply it to other kits that come along. I'd help.

I've thought about this approach, but after having seen the Windows header files, I don't feel like writing a C compiler just to spit out RB declares (which is effectively what we would need to do).

I agree. Aaron and I discussed this a little, since it was kinda originally my idea to do this Win32 API library. The problem with your suggestion Brad is the use of the word "little" in the same context as "compiler". For C/C++, there is no such thing :-)

There are other tools like SWIG, but they too don't do a particularly intelligent job of translating the headers. They do straight ports as far as they can approximate the APIs in the target language.

For what we're intending, we'll port the headers piece-wise for modules people would actually use, and try and make them a bit more RB-user-friendly in the process; for example, hiding all the ASCII and Wide character variations of Win32 APIs away inside the API functions we expose, and automatically doing the appropriate translations so the RB users don't have to worry about it.

I mean.. they use BIT FIELDS in some of their structures. I've never seen that anywhere. Ever.

You've evidently never programmed for a Sony PS2 :-) Admittedly, such structures as use bitfields are mainly for programming chip registers.

I thought this discussion was gonna be off-list, but since it hasn't turned out that way...

Brad's idea is almost exactly what I've been envisioning for the last few weeks.

It would be a daunting task, of course, but well worth the effort, in the sense that not just a few, hand-selected library calls would be available, but rather the entire catalogue of win32 calls (and carbon and linux, eventually too).

- Philip

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>