• 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: Disturbing Control Problem in Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disturbing Control Problem in Tiger


  • Subject: Re: Disturbing Control Problem in Tiger
  • From: Fritz Anderson <email@hidden>
  • Date: Thu, 23 Jun 2005 09:35:05 -0500

On 23 Jun 2005, at 9:15 AM, John Nairn wrote:

    NSButton *newBtn=[[NSButton alloc] init];
    [newBtn setFrame:[srcBtn frame]];

-init is not the designated initializer for NSButton (or any NSView). -initWithFrame: is.

    [box addSubview:newBtn];

    

    // copy properties from source button
    NSButtonCell *btnCell=[newBtn cell];
    NSButtonCell *srcCell=[newBtn cell];
    [btnCell setButtonType:aType];
    [btnCell setControlSize:[srcCell controlSize]];

From this last line, I don't think you mean to initialize srcCell and btnCell to be the same thing.

Query on why you are using cell methods to copy traits that can be copied at the control level. Pick up AppKiDo, <http://homepage.mac.com/aglee/downloads>, for a tool that will let you see all the inherited methods of a framework's class.

    -- F

 _______________________________________________
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: Disturbing Control Problem in Tiger [Solved]
      • From: John Nairn <email@hidden>
    • Re: Disturbing Control Problem in Tiger
      • From: John Nairn <email@hidden>
References: 
 >Disturbing Control Problem in Tiger (From: John Nairn <email@hidden>)

  • Prev by Date: Re: Link C library in Cocoa.
  • Next by Date: Re: CoreData: get/set methods in undo and flushing of caches
  • Previous by thread: Disturbing Control Problem in Tiger
  • Next by thread: Re: Disturbing Control Problem in Tiger
  • Index(es):
    • Date
    • Thread