Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth Mac > Re: Question on...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 6 Topic 91 of 159
Post > Topic >>

Re: Question on Forth & C++/ObjC objects

by Mike Hore <mikehoreREM@[EMAIL PROTECTED] > Jan 2, 2005 at 09:03 PM

Erik wrote:

> Well, according to Google groups, this will be the first post of the
> year, so: First Post!  Woo-Hoo!

Not here -- it's the 2nd here by now.  Maybe in your time zone...

> 
> Anyway,
> 
> I was reading some docs on Objective-C, which I have yet to really
> start learning, and I found myself wondering on how Mops (or any OO
> Forth for that matter) would handle instantiating or calling objects in
> Objective C or C++.

The forthcoming Mops 5.6 will have direct sup****t for calling ObjC
functions in Cocoa.  I won't give all the details here -- we're in
beta but it shouldn't be long.

> 
> For example, if you have an ObjC or C++ shared library.  Being that
> they both are object oriented languages, it would make sense that there
> would be cl***** and objects involved.  If calling that library meant
> accessing those objects, then I'm sure there would be some
> cross-language quirks to say the least.

Yes, definitely.
> 
> Then again, ObjC (to my understanding) uses the C conventions for
> shared library calling, so perhaps using ObjC objects wouldn't be that
> difficult.  C++ would be a different story, though...

It's probably "just" a matter of working out what actual functions
to call.  Certainly the ObjC sequence is constructed of a series
of low-level calls.  C++ would probably be similar though I haven't
really looked into it.  But once you know the low-level calls, you
just call them.  The ABI for simple calls is pretty standard across
PowerPC languages (though I suspect there may be minor differences
with floating-point parameters).

> 
> Anyway, I just wanted to throw that out there and see what everybody
> thought.  Thanks for your time!
> 
> Happy New Year!

Yes, and to you too!

Cheers,  Mike.


----------------------------------------------------------------
   Mike Hore      mikehoreREM@[EMAIL PROTECTED]

 




 6 Posts in Topic:
Question on Forth & C++/ObjC objects
"Erik" <cust  2005-01-02 03:01:50 
Re: Question on Forth & C++/ObjC objects
Mike Hore <mikehoreREM  2005-01-02 21:03:01 
Re: Question on Forth & C++/ObjC objects
Roelf Toxopeus <these3  2005-01-02 14:25:10 
Re: Question on Forth & C++/ObjC objects
"Erik" <cust  2005-01-04 15:50:23 
Re: Question on Forth & C++/ObjC objects
"Erik" <cust  2005-01-04 15:56:09 
Re: Question on Forth & C++/ObjC objects
n_sacra@[EMAIL PROTECTED]  2005-01-06 03:46:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 4:02:37 CDT 2008.