Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to grab the Scroller of a WebView?



I saw a few similar questions around. But none answered my problem. I have a WebView and want to change the width/color/location of the associated scroller.
I implemented a WebView delegate and try to get the "enclosingScrollView" in the awakeFromNib, but that fails:


--------

@implementation WebView (ENExtras)

- (void) awakeFromNib
{	
	[self setFrameLoadDelegate: self];

	NSLog(@"%@", [[self mainFrame] frameView]);
	NSLog(@"%@", [[[self mainFrame] frameView] webFrame]);
	NSLog(@"%@", [[[self mainFrame] frameView] documentView]);

// What I want to get
NSScrollView *scrollView = [[[[self mainFrame] frameView] documentView] enclosingScrollView];
}


[...]
---------

returns:

2006-04-10 14:50:35.939 MyApplication[4738] <WebFrameView: 0x164c55d0>
2006-04-10 14:50:35.939 MyApplication[4738] <WebFrame: 0x164a6470>
2006-04-10 14:50:35.939 MyApplication[4738] (null)

--------

Could someone let me know why I can't get the documentView? Much appreciated!
I tried doing this from the Controller object calling the WebView object from there rather than the 'self' but I get the same problem. When if not in the awakeFromNib should I do this? These are settings to be called once.


Thank you!

Tristan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.