Re: WebKit not there
Re: WebKit not there
- Subject: Re: WebKit not there
- From: Mark Thomas <email@hidden>
- Date: Wed, 09 Mar 2005 17:56:52 +0000
- Organization: Coderus Ltd
Hi,
Thanks for the pointers and I have just about got there, but its seems for
some strange reason that the WebKit behaves only slightly different when
loaded via
NSBundle* webKitBundle;
webKitBundle = [NSBundle
bundleWithPath:@"/System/Library/Frameworks/WebKit.framework"];
if (webKitBundle) {
_webkitAvailable = [webKitBundle load];
}
As I have put all my webcontrol object into a separate nib file which I
then load and link via the File Owner proxy object (I think thats the right
way to talk about it (got this from the ADC Building Cocoa Applications)),
as doing "load" call will somehow bind that framework and do decoding in the
nib file will work, and do the right thing, Works great.
But for some reason Javascript to Java Applets do not work, via this
method compared to having the linker link to the framework, when it works
fine.
Anybody got any ideas
Thanks
Mark.
>
> The nitty gritty on weak linking is in Tech Note 2064
> <http://developer.apple.com/technotes/tn2002/tn2064.html>
>
> The bad news: WebKit doesn't do Availability Macro's or weak linking.
> <http://lists.apple.com/archives/webkitsdk-dev/2004/Feb/msg00089.html>
>
> I don't know why this is so, but it may have something to do with the
> underlying C++-ness of WebKit.
>
> What you can do is split off all code that references WebKit in a
> separate bundle, and load that after you determine at runtime that
> WebKit is available.
>
> Beware: testing if 'WebKit' is available may not be enough. You may be
> using a symbol that was introduced in some newer version of WebKit. So
> you should test for the newest WebKit symbol you use. However, there is
> no documentation (that I know of) that outlines which symbols where
> added when to WebKit, so you are on your own here. Trial and Error.
>
> patrick
>
> Op 8-mrt-05 om 18:42 heeft Mark Thomas het volgende geschreven:
>
>> Hi,
>> I tried removing the Webkit from my project to see what symbols I was
>> actually linked againist and to my surprise there weren't any. I guess
>> objective-c did this for me ???. (Is there anything on how system
>> frameworks
>> work with objective-c runtime calls, How does this all work ???)
>>
>> but when my app entered the NSApplication in main(), it barfed on
>> trying
>> to resolve my main.nib file where I have webcontrol and a window,
>> where I
>> have setup a connect to my control object via an outlet connection
>>
>> So I wondered if I do
>>
>> webKitBundle = [NSBundle
>> bundleWithPath:@"/System/Library/Frameworks/WebKit.framework"];
>>
>> [webKitBundle load];
>>
>> Would that make nib file code work, if WebKit is there of course, as
>> I'm
>> wonder if I should move my webkit resources into a separate nib file
>> ???, as
>> well as a separate objective-c object, where I could attach my outlets
>> to
>> ???. Does this make sense to anybody or am I going to the wrong way and
>> missing a trick here ???.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden