Linked by Eugenia Loli on Thu 5th Feb 2004 20:41 UTC, submitted by Andrew Munkres
OpenStep, GNUstep Stefan has released an alpha version of his GNUstep port of WebCore, the KHTML-based renderer used by Apple's Safari web browser. The code includes a simple browser program.
Order by: Score:
Objective C -> C++
by RJW on Fri 6th Feb 2004 03:53 UTC

Since WebCore is written in C++, and Gnustep does not yet have Objective C++, did he have to create a C wrapper around it to make it work with Objective C?

RE: Objective C -> C++
by Joseph Kowalski on Fri 6th Feb 2004 04:51 UTC

I believe that actually Apple had already done that little bit of work. From what I remember when Safari was first announced as using KHTML, I read that Apple had created a wrapper around the native QT C++ functions of KHTML, and exported them as Cocoa Objective C functions.

hmmmm
by SpikeB on Fri 6th Feb 2004 06:02 UTC

first, yay! I'm glad to see GNUstep is going to have at least a few applications. secondly, i wonder what they'll call the browser...GNUfari? heh.

And Cenon, yet another interesting GNUstep application.
by a farm boy on Fri 6th Feb 2004 06:43 UTC

http://www.cenon.info
It has a very good DTP module (vector graphic stuff).
Its manual is very nice and more descriptive than screen shots.

RE: Objective C -> C++
by Descartes on Fri 6th Feb 2004 07:15 UTC

Apple has written the Objective-C++ KWQ Library to interact with the C++ written KHTML. WebCore itself sits on top of KWQ prividing a standard Objective-C programming interface.

http://developer.apple.com/darwin/projects/webcore/
------
WebCore is a framework for Mac OS X that takes the cross-platform KHTML library (part of the KDE project) and combines it with an adapter library specific to WebCore called KWQ that makes it work with Mac OS X technologies. KHTML is written in C++ and KWQ is written in Objective C++, but WebCore presents an Objective C programming interface.
------

RE: Objective C -> C++
by lv on Fri 6th Feb 2004 08:04 UTC

however, KWQ is written in objective c++ and there is no objective c++ compiler for linux. gcc does NOT include objective c++ support. apple patches gcc themselves to support this for macos and their version of gcc refuses to compile under anything other than darwin last i checked (i think due to changes they made for mach-o?)

the FSF didn't include support for this language because it was a hack that increased maintenance effort needlessly. as a result, much work has been done to make objc++ less of a bother, the first step of which is included in gcc 3.4 (not yet to be released as a stable compiler). dont expect the FSF version of gcc to include objc++ until after 3.4 and possibly not even in 3.5... (tho there is a cvs branch for bringing apple's objc enhancements to gcc proper)

so, in summary, this port is done entirely without the aid of objc++ glue between objc and c++. so it HAD to have been done entirely with c wrappers. painfull.

having looked at objc tutorial
by smoke on Fri 6th Feb 2004 09:18 UTC

examining objc i wonder myself wheres the difference to c++ ?
objc looks very confusing to me i must admit.

RE: Objective C -> C++
by smoke on Fri 6th Feb 2004 09:19 UTC

doesnt apple offer c bindings, as well as c++ bindings? last i checked xcode i have to say yes.

Re: having looked at objc tutorial
by Chris on Fri 6th Feb 2004 10:41 UTC

If you know C, then Objective-C is much simpler than C++. It just looks a bit odd because of the method call/message passing syntax, which is borrowed from SmallTalk. Of course, to delimit these, they're wrapped up in brackets, which C uses sparsely and in no conflicting way.

I personally find Objective-C quite expressive, particularly for complex methods. The use of factory methods vs. overloaded constructors makes code quite a bit more understandable.

v ?
by earthworm on Fri 6th Feb 2004 11:35 UTC

It's nice to see another project adopting khtml. Good luck on this to the GNUStep guys.

Re: ?
by Felix on Fri 6th Feb 2004 12:36 UTC

GNUStep's native language is Objective-C. Mozilla is written in C++ and has no Objective-C wrappers. KHTML has Objective-C wrappers available (i.e. WebCore). GNUStep and Cocoa (the OSX API) are both based on the OPENSTEP API (or is it the OpenStep API? I can never remember); indeed, many programs written for GNUStep should run fine on Cocoa (though they'll almost certainly want changes to the UI).

yellowTAB
by Franxico on Fri 6th Feb 2004 13:20 UTC

Anyone have some news about yT progress on that port? It was announced here sometime ago <http://www.osnews.com/story.php?news_id=4057> and we never heard about it again...

Thanx,
François

RE: ?
by Owen Anderson on Fri 6th Feb 2004 13:36 UTC

What does Mozilla have to do with this?

RE: ?
by Felix on Fri 6th Feb 2004 13:47 UTC

One presumes that because Mozilla is a webbrowser, it has something to do with webbrowsers. It was a ligitimate question.

Mozilla is heavy
by Kevin Francis on Fri 6th Feb 2004 14:47 UTC

Remember why Apple chose KHTML? Add to that the fact that it's proven good combo.

Re: hmmmm
by Nicolas Roard on Fri 6th Feb 2004 14:51 UTC

first, yay! I'm glad to see GNUstep is going to have at least a few applications. secondly, i wonder what they'll call the browser...GNUfari? heh.

Hem, there is already more than "a few" applications :
http://wiki.gnustep.org/index.php/All%20GNUstep%20Applicati...

... in fact, I'm basically using a gnustep-only desktop, the only two apps I use regularly beside are a jabber client and mozilla. I guess that I won't have to use mozilla in the coming months ;-)

Big thanks to stephan, because it sure was a painfull thing to rewrap KHTML in C function for the glue !
Hopefully next gcc versions will have ObjC++ which will help us for others ObjC++ apps or C++ libs, but anyway, stephan did a wonderful job.

 Re: hmmmm
by a farm boy on Fri 6th Feb 2004 15:01 UTC

Isn't that KHTML itself already has Objective-C binding somewhere?
http://dot.kde.org/1041971213/1041983392/1042003371/

Did he write the C glue?
by Roberto on Fri 6th Feb 2004 15:23 UTC

Because you know, there is a whole set of nicely done C wrappers for khtml at KDE´s kdebindings package ;-)

Hell, there´s even Obj-C wrappers already.

v all four gnustep users overjoyed
by blahblah on Fri 6th Feb 2004 17:14 UTC
RE: all four gnustep users overjoyed
by RJW on Fri 6th Feb 2004 17:35 UTC

Ha ha, that's funny. Actually, Gnustep seems to have picked up a lot of steam since OSX came out. And it's always been an active community. I'd probably prefer it over Knome if it was a bit more mature.