Re: beginner's webKit questions
Re: beginner's webKit questions
- Subject: Re: beginner's webKit questions
- From: Scott Anguish <email@hidden>
- Date: Tue, 21 Feb 2006 21:03:14 -0500
On Feb 21, 2006, at 4:05 PM, Jay Swartzfeger wrote:
Hi all,
I'm just dipping my toes into the Cocoa/Xcode pool and experiencing
a few challenges. I've searched the archives and came up empty-
handed so decided to post my first request (I apologize if these
answer have been covered previously).
Also, I apologize in advance if these questions are too rudimentary
for the list -- I have four cocoa/xcode/objective-c books on order
and waiting for them to arrive.
none of which will cover WebKit.. :-) the doc is your best place to
start
There is a webkit specific list as well...
Basically, I started my first project by trying various 'build your
own browser' tutorials. I've been mostly successful but have run
into some issues:
1. connectURL: and default http:// protocol
In my urlString field, I'm forced to enter the full url, ie "http://
www.apple.com/" ; simply entering "www.apple.com" won't work. Is
there a way to search for a : so if a user doesn't enter "http://"
the url will still work?
this is not something that is automatically supported by WebKit.
Safari handles it by implementing the code.
In a nutshell, you could test if the string entered is a valid URL
(using NSURL) and if it is not, then try prepending http://
2. page titles and full url
I used didReceiveTitle to display a page's title, but page titles
simply show "untitled". Also, I used [urlString
setStringValue:url]; to display the full url but it still only
displays the base URL I enter in my urlString. I can't see anything
I entered incorrectly... any ideas?
3. default homepage:
I used NSString *urlText = [NSString stringWithString:@"http://
www.google.com"]; to display a default homepage, but it only
intermittently displays. Did I implement it correctly, or can I
chalk this up to a connectivity issue?
I don't see where you're telling the WebView (or whichever object
you're supposed to set the URL on, I can't remember) what the
defaultHomePage is
_______________________________________________
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