• 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
Re: How to implement an open dialog in a sheet and process its output?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to implement an open dialog in a sheet and process its output?


  • Subject: Re: How to implement an open dialog in a sheet and process its output?
  • From: Ron Fleckner <email@hidden>
  • Date: Tue, 13 Nov 2007 10:13:17 +1100


On 13/11/2007, at 8:54 AM, Nathaniel Gottlieb-Graham wrote:

No, I know that the button is connected to the IBAction, because I put an NSLog() at the beginning of the method definition, and clicking on the button does indeed log the string to the console. While I was there, something I noticed the console producing was:
-[NSWindow window]: unrecognized selector sent to instance 0x12f180


I get no compiler errors or warnings. Is this because the selector is calling the filePanelDidEnd: method at runtime? So what's wrong with filePanelDidEnd:? The code I'm using is exactly as shown below.

Thanks again,
Nathaniel

Sorry, but it's unclear whether you actually made the connection -- in Interface Builder -- between your button and the IBAction. You "know" that it's being called, but did you Control-drag from the button to the IBAction in Interface Builder? (I'm resisting the urge to write out that question in capitals.)


The "unrecognized selector" warning means that your code is sending a message to an instance of NSWindow which the window doesn't understand. This usually means that you are sending a message to an object that is no longer in existance or is out of scope when the message is sent. The window receiving the message just happens to be at the address (0x12f180) where your intended object was. Or you are sending the message to the NSWindow intentionally but haven't implemented the selector method in that window instance, for which you would need to subclass NSWindow or add a category which implements the method.

Where is your IBAction method -askForQuickTimeMovieSheet: located?

Like I said, I simply copied your code and pasted it into a small project and it worked. The only change I had to make was to replace your [welcomeWindow window] with (in my case) [NSApp mainWindow]. And, of course, I made Interface Builder aware of the changes to the object where I pasted the code and then Control-dragged from a button on the window to the action in the instantiated object in Interface Builder's main window. Perhaps your welcomeWindow instance is the cause of your problem?

Good luck,

Ron
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to implement an open dialog in a sheet and process its output?
      • From: Nathaniel Gottlieb-Graham <email@hidden>
References: 
 >How to implement an open dialog in a sheet and process its output? (From: Nathaniel Gottlieb-Graham <email@hidden>)
 >Re: How to implement an open dialog in a sheet and process its output? (From: Ron Fleckner <email@hidden>)
 >Re: How to implement an open dialog in a sheet and process its output? (From: Nathaniel Gottlieb-Graham <email@hidden>)
 >Re: How to implement an open dialog in a sheet and process its output? (From: Ron Fleckner <email@hidden>)
 >Re: How to implement an open dialog in a sheet and process its output? (From: Nathaniel Gottlieb-Graham <email@hidden>)

  • Prev by Date: Re: How to archive structs like NSRect
  • Next by Date: Spewing stderr to an NSTextView
  • Previous by thread: Re: How to implement an open dialog in a sheet and process its output?
  • Next by thread: Re: How to implement an open dialog in a sheet and process its output?
  • Index(es):
    • Date
    • Thread