• 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 do you connect two classes (e.g IBOutlet and IBAction) when not using IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you connect two classes (e.g IBOutlet and IBAction) when not using IB


  • Subject: Re: How do you connect two classes (e.g IBOutlet and IBAction) when not using IB
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Sun, 23 Mar 2003 12:57:10 +0100

To define what your new button do, you can use setTarget:, and setAction:
For example:
NSButton myButton = [[NSButton alloc] initWithFrame:aFrame];
[myButton setTarget:theTargetObject];
[myButton setAction:@selector(theMethodeName:)];

No need to use an IBOutlet since myButton, is declared in your class
>
> After finding out how to create buttons and other stuff in code
> depending on a plist, I now am trying to figure out how to connect
> them to the rest of an interface already prebuilt in Interface Builder.
> So far I havent seen anything in tutorials relating to this since the
> whole world is revolved around IB.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: State of Cocoa adoption
  • Next by Date: Re: custom clipview
  • Previous by thread: Re: NSBezierPath winding rules and glyphs
  • Next by thread: read directory in table view
  • Index(es):
    • Date
    • Thread