• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
modalForWindow query
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

modalForWindow query


  • Subject: modalForWindow query
  • From: "Nicholas Brawn" <email@hidden>
  • Date: Wed, 25 Oct 2006 14:36:57 +1000

I've been working with the XML parser example from Apple (see below for
link), and have included it in a Cocoa application of mine.

The problem is nothing to do with the XML side of things, but rather
NSOpenPanel. In particular, this line of code:

   [oPanel beginSheetForDirectory:startingDir file:nil types:fileTypes

                   modalForWindow:[self window] modalDelegate:self //
Warning for this part

                   didEndSelector:@selector
(openPanelDidEnd:returnCode:contextInfo:)

                      contextInfo:nil];

The warning I receive is: 'MyController' may not respond to '-window'

In Interface Builder I have an instance subclass of NSObject called
MyController with an NSButton and NSTextView on it. I'm guessing that the
[self window] is looking for an NSWindow, but where should that be defined?

XML Parser Basics link:
http://developer.apple.com/documentation/Cocoa/Conceptual/XMLParsing/Articles/UsingParser.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: modalForWindow query
      • From: Robert Martin <email@hidden>
  • Prev by Date: Both view and subview receive mouse events?
  • Next by Date: Re: outlets to multiple views (NSView)
  • Previous by thread: Both view and subview receive mouse events?
  • Next by thread: Re: modalForWindow query
  • Index(es):
    • Date
    • Thread