It all depends on how much you're trying to access I suppose. For
instance, when you just need to know the menu bar height, that is a good
example of a quick declare into the Carbon framework (on Mac). Using
Cocoa objects can be a bit problematic, but not impossible.
A pointer to a Cocoa object is just going to be a Integer, and then
you're going to declare into some low-level Cocoa message-passing
functions. I think the DeclareSub website goes into some of the basics
about how to send messages. Once you do that, it is just a matter of
sending enough messages.
Where I think you're going to come into problems is the amount of
classes that you really need to wrap just to get basic information. The
real question that you should consider at this point is how much do you
need to do?
You've got several options. For one thing, it might be MUCH easier to
just write an Objective-C (Cocoa) command line tool that your program
accesses rather than trying to actually do work in REALbasic.
If you're going to consider writing a plugin, you probably will need to
know a fair amount of C/C++ and Objective-C.
Another option is to hire someone to build the plugin or command line tool.
So, how much do you need to access of the XGrid framework? What are you
trying to accomplish?
- Ryan Dary
[EMAIL PROTECTED] wrote:
Okay, maybe I am misunderstanding the full scope of a declare. Do they
just access system methods, or can you literally create a class in RB at
runtime using a declare? Or is more like accessing the methods inside
of the classes?
If I am going to do it in RB the same as in Xcode, some of the classes
will need to be instanced, in which case simply accessing the methods
might not be enough.
I've never written a plugin for any program, let alone in Xcode, and
I've never heavily used declares. I understand the simple ones, like
the one for getting the menu bar height, but I'm thinking this would be
a bit more complex... Do you think a plugin would be more worth it than
a long list of declares? For me, the deciding factor would be how much
extra coding would be involved with making the plugin. If it's simply
defining the methods in a way that RB can access them, then I would go
for it.
Thanks,
Andrew Keller
On Feb 8, 2007, at 12:13 AM, Ryan Dary wrote:
It is probably possible through some heavy Declares. If you haven't
used them before, Declares are ways to "call" into libraries that were
not compiled with REALbasic. The trick is making sure that you can
declare into them.
_______________________________________________
Unsubscribe:
<[EMAIL PROTECTED]>
_______________________________________________
Unsubscribe:
<[EMAIL PROTECTED]>