• 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: Accessing IB objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing IB objects


  • Subject: Re: Accessing IB objects
  • From: Scott Anguish <email@hidden>
  • Date: Tue, 11 Mar 2003 13:22:00 -0500

On Tuesday, March 11, 2003, at 12:52 PM, John Stokes wrote:

I'm rather new to Cocoa programming, so forgive me if I ask some dumb
questions...

I've created an NSScrollView in IB (as a subclass of NSDrawer), and I want
to access It programmatically so I can enable it for drag and drop. However,
I can't figure out how to access an IB object that hasn't been explicitly
linked to an action or outlet. I haven't found any docs on the subject.

Well, you have two options...

First, it's not a bad thing to hook it up to an outlet... it's the easiest way to do it.

The other option is to assign it a tag in IB, and then look up the tag using  viewWithTag: on the window's contentView (but it appears that NSScrollView's inspector doesn't allow you to set the tag... so in this particular case, you'll need to connect to an outlet)
_______________________________________________
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.
References: 
 >Accessing IB objects (From: John Stokes <email@hidden>)

  • Prev by Date: Re: Toolbar hide/show button
  • Next by Date: Applescript question: Creating objects without location specifier
  • Previous by thread: Accessing IB objects
  • Next by thread: RE: Accessing IB objects
  • Index(es):
    • Date
    • Thread