|
|
How could I...
|
|
|
|
Junior Member
Join Date: Apr 2007
Status:
Offline
|
|
MacBrowse
Well I have JUST started coding and this is my first ever app.
Well I want to do the following things and I am wondering if people could help me with ANY:
1. You have to type http:// for the page to load, is there a way for it to add itself if the user didn't?
2. Add bookmarks
3. Add history
4. Make a loading bar above the page.
5. Tabs at one point or another
Well I have tried HARD for number 4, I have created a link from the WebView object to the loading bar with output: frameLoadDelegate, but that doesn't seem to work.
If anyone can help me with any of these I would appreciate it a LOT.
Thanks
PS. If I need to provide the .xproj I will
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
NSProgressIndicator doesn't implement the WebFrameLoadDelegate protocol. Your delegate should be a controller object that updates the loading bar.
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status:
Offline
|
|
This thread's title is awesome.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
You really should become familiar with the developer documentation. Some of the answers are quite simple once you get to know the classes by looking through the documentation.
Eg, for prepending 'http://' if required...
Check the documentation for the NSString class (and NSMutableString). In particuluar, you might be interested in the methods -[NSString rangeOfString:] and -[NSMutableString replaceCharactersInRange:withString:] (or -[NSString appendString:]).
Two of these three methods are almost all that's required to solve your .1. point.
After a very superficial look, the app's interface looks neat. Should probably not distribute as a zipped .dmg. A .dmg is compressed anyhow so this just complicates the user's access to it (and you can control the degree of compression too).
Agree with the comment about the thread title.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Apr 2007
Status:
Offline
|
|
Hey, thanks for the replies.
Sorry, as I said I'm still learning so I didn't think of going to the documentation.
And what's so good about the thread title? I don't like sarcasm >:3
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
Originally Posted by alainmeyer1
And what's so good about the thread title? I don't like sarcasm >:3
Thread titles should give some idea of what the thread is about. I think it may even be in the forum rules. It should be descriptive enough so that people can decide if the thread is likely to interest them, or if they can help, without reading having to click and load the entire thread.
eg, "Questions about my first ever application", or, "Need help building a web browser", or "Basic NSString use and other queries".
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
I like how it sounds like he's aghast at himself. "How could I…? I'm such a heartless monster!"
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Junior Member
Join Date: Apr 2007
Status:
Offline
|
|
Ohhh okay, next time I'll make a better title
Well this is my code to for the URL connection:
- (IBAction)connectURL id)sender{
[urlString setStringValue:[sender stringValue]];
[[webView mainFrame] loadRequest:
[NSURLRequest requestWithURL:
[NSURL URLWithString:
[sender stringValue]]]];
}
Is there a way for me to change that so that the app checks if there is a ":" in the beginning and if there isn't adds http://?
Thanks
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Aug 2001
Status:
Offline
|
|
Yes. Just check [sender stringValue] for an http:// prefix, and add it if it's not there. See the NSString documentation for how to do this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|