• 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: Problem with NSWindowController subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with NSWindowController subclass


  • Subject: Re: Problem with NSWindowController subclass
  • From: "Michael Ash" <email@hidden>
  • Date: Fri, 23 Jun 2006 15:12:27 -0400

On 6/23/06, D.K. Johnston <email@hidden> wrote:
I made a subclass of NSWindowController. It looks like this:

@interface TextDisplayController : NSWindowController
{
     IBOutlet id text;
     IBOutlet id citation;
     IBOutlet id title;
}
- (void)setText:(NSString *)textString;
- (void)setCitation:(NSString *)citationString;
- (void)setWorkTitle:(NSString *)titleString;
@end

I call the 'set' methods in this order:

        setWorkTitle:
        setCitation:
        setText:

and then call the showWindow: method. To my surprise, the
setCitation: and setText: methods are called again (in that order),
but not the other. Of course, none of these should be called twice. I
can't figure out why this is happening.

Cocoa thinks your set methods are accessors for your instance variables, since they have the same names. Change the names so that it no longer thinks that. See:

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSNib_Class/Reference/Reference.html

Mike
_______________________________________________
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


References: 
 >Problem with NSWindowController subclass (From: "D.K. Johnston" <email@hidden>)

  • Prev by Date: Re: NSOpenPanel isn't listening to me? I told it to only allow .zip and .xml!
  • Next by Date: top level objects and NSWindowController
  • Previous by thread: Problem with NSWindowController subclass
  • Next by thread: Re: NSOpenPanel isn't listening to me? I told it to only allow .zip and .xml!
  • Index(es):
    • Date
    • Thread