Mac Help Forums


Reply
Thread Tools Display Modes

Tabbed Web Browser

 
New Member
Join Date: Sep 2007
Posts: 1
 
      24th September 2007
I'm trying to open web pages with WebView. I have no problems doing that. But when I try to open up WebView in Tab View, it doesn't work. I want to be able to open up multiple web pages and be able to go back and forth between them with tabs.

Here's what I have.

Code:
on clicked theObject
	GetURL()
end clicked

on end editing theObject
	GetURL()
end end editing

on GetURL()
	
	tell tab view 1 of window 1
		set theURL to "http://www.google.com" as text
		
		try
			set newString to (call method "stringByAddingPercentEscapesUsingEncoding:" of theURL with parameter 30)
			set URLWithString to call method "URLWithString:" of class "NSURL" with parameter newString
			set requestWithURL to call method "requestWithURL:" of class "NSURLRequest" with parameter URLWithString
			set mainFrame to call method "mainFrame" of object (view "browser1" of tab view item "tab1")
			
			call method "loadRequest:" of mainFrame with parameter requestWithURL
			
		end try
	end tell
end GetURL
Because I've been able to get WebView to work when it's not in the NSTabView, and because I've been able to get NSTabView to work when I'm just working with something simple like Text Field boxes, I know my problem must have something to do with the way I'm referencing my WebView in the Tab View. I've tried everything, and suggestions?

Last edited by George Washington; 24th September 2007 at 03:41 AM.. Reason: forgot the "end GetURL"
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Safari Tabbed Browser Ellie Mac 21 18th February 2009 06:38 AM
Safari Tabbed browsing and NewsFire David Cleland UK Macs 2 7th July 2007 11:49 PM
Safari Tabbed Browsing Gareth Slee UK Macs 6 27th December 2004 08:14 PM
Saving tabbed pages in Safari Mark Werner Communication 3 8th July 2004 06:55 PM
Safari 1.2 tabbed browsing bug Ian Gregory Mac 4 5th February 2004 07:15 AM


All times are GMT +1. The time now is 12:58 PM.
Mac-Help.com is an independent website and is not affiliated with Apple Inc.


Welcome!
Welcome to the Mac Help Forums
 


Latest Threads
New book about Steve Jobs << take part in it!
Arjan (3 Hours Ago, 09:37 AM)

Help! Stupid computer is automatically logging me out
Elizaboo (14 Hours Ago, 10:41 PM)

URGENT Help. Crazy talk Mac!
Joeker (15 Hours Ago, 09:42 PM)

PDF Document
yura (1 Day Ago, 12:13 PM)

Difficulties with internet speed (nothing to do with connection)
sammethh (1 Day Ago, 06:36 AM)

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51