• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: beginner's webKit questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Remove some (and not all) actions from the undo stack (From: Kaspar Fischer <email@hidden>)
 >beginner's webKit questions (From: Jay Swartzfeger <email@hidden>)

  • Prev by Date: How to quit application when close the main window by click icon x on left-top corner of the window?
  • Next by Date: Re: How to quit application when close the main window by click icon x on left-top corner of the window?
  • Previous by thread: beginner's webKit questions
  • Next by thread: Re: Remove some (and not all) actions from the undo stack
  • Index(es):
    • Date
    • Thread