views:

178

answers:

1

In my first view I've overridden decidePolicyForNavigationAction, now I want to pass 'request' to another view that will be pushed onto the navigationController stack, which will display the content from the url in a uiwebview

My problem, I think, is pushing the next view onto the stack, I keep getting 'request for member 'navigationController' in something not a structure or union.

My code is below, I've lost track of the different solutions I've tried to this, its probably something stupid but I its getting late and I cant think...

    - (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id < WebPolicyDecisionListener >)listener
{
    TweetLinkView *tlvController = [[TweetLinkView alloc] initWithNibName:@"TweetLinkView" bundle:[NSBundle mainBundle]];
    tlvController.selectedLink = [NSString stringWithFormat:@"%@", request];
    [self.navigationController pushViewController:tlvController animated:YES];
    [tlvController release];
    tlvController = nil;
}

Thanks for your help, hopefully :)

A: 

Is the class defining that method extending UIViewController?

pfandrade
I dont think so, haven't got it in front of me. If I remember correctly, its within @class UITextView... I think.
avalore
If you're not extending UIViewController then you can't use "self.navigationController" because the navigationController property is defined in UIViewController.
pfandrade
Ok, any idea how I can solve this then?
avalore