• 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: references to controllers in document based applications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: references to controllers in document based applications


  • Subject: Re: references to controllers in document based applications
  • From: Torsten Curdt <email@hidden>
  • Date: Sun, 10 Feb 2008 03:55:46 +0100

Hah! Thanks, Kyle

Yeah ...basically because when I call [self close] in my NSDocument
class - nothing happens :)

I really think you're doing something wrong here. I created a new Cocoa Document-based Application and added a -closeButtonClicked: action to it, which does nothing but NSLog and [self close]. Then I dropped an NSButton on my document window and wired it straight to the File's Owner's -closeButtonClicked: method.

Run the app and click the button, the document (and its window) close.
 Perhaps you did something differently?  Are you sure that code is
executing at all?  Drop a breakpoint on it to see.

Indeed I had a NSLog and the code got executed ...but(!)

I did not use the File's Owner and instead dragged my document into IB and created and instance. Which (now thinking about it) doesn't really make much sense ;) ...but it sort of worked - just gave this weird behavior. Thanks pointing out the "File Owner" wiring - that helped figure it out.

cheers
--
Torsten

_______________________________________________

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


References: 
 >references to controllers in document based applications (From: Torsten Curdt <email@hidden>)
 >Re: references to controllers in document based applications (From: "Kyle Sluder" <email@hidden>)
 >Re: references to controllers in document based applications (From: Torsten Curdt <email@hidden>)
 >Re: references to controllers in document based applications (From: "Kyle Sluder" <email@hidden>)

  • Prev by Date: Re: references to controllers in document based applications
  • Next by Date: Memory management with arrays
  • Previous by thread: Re: references to controllers in document based applications
  • Next by thread: Re: references to controllers in document based applications
  • Index(es):
    • Date
    • Thread