Mailing Lists: Apple Mailing Lists

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

Re: local declaration of 'webView' ?



On Dec 5, 2005, at 9:46 AM, Michael Hanna wrote:

When compiling this frameLoadDelegate, I get this error in my didFinishLoadForFrame: delegate method:

warning: local declaration of 'webView' hides instance variable (// ***)

- (void)webView:(WebView *)webView didFinishLoadForFrame:(WebFrame *)frame
{
NSLog(@"didFinishLoadForFrame: %@", [(DOMHTMLElement *)[[[webView mainFrame] DOMDocument] documentElement] outerHTML]); //***
WebScriptObject * wso = [webView windowScriptObject]; //***
id result;
NSArray * args = [NSArray arrayWithObjects:scriptObject, nil];
result = [wso callWebScriptMethod:@"cocoacalling" withArguments:args];
NSLog(@"%@ result", result);
}


which is rather strange because I don't actually declare it locally!

This is just complaining that for this method, the parameter webView is conflicting with your instance variable webView. It's calling the parameter a local declaration. You can change the name of the parameter or the instance variable, whichever you prefer.


    -- Darin

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

This email sent to email@hidden
References: 
 >local declaration of 'webView' ? (From: Michael Hanna <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.