• 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: matching interface builder object to source
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: matching interface builder object to source


  • Subject: Re: matching interface builder object to source
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 21 Jan 2004 10:44:54 -0800

On Jan 21, 2004, at 10:14 AM, Matthew Cook wrote:

For example, in one interface I have a large NSTextView that will act something like a scrolling console with messages added to the bottom from time to time. I've had no issue setting up an IBOutlet object in my controller class and correctly displaying the strings, but I need to access the NSScrollView (more specifically the NSClipView) of the NSTextView so that I can tell it to scroll down when new lines are added to the console.

If I just put an instance of an NSScrollView in my controller class, can I somehow reference the NSScrollView from the IBOutlet NSTextView object? Can I instantiate an NSScrollView in Interface Builder and somehow connect it to the NSScrollView that comes with the NSTextView? Should I just try and create, place and draw the whole NSScrollView and TextView programatically? Should I create a spicific NSScrollView in Interface Builder and place a NSTextView inside it, or will this make an NSTextView in an NSScrollView in an other NSScrollView?

When you drag out a text view in IB, what you actually get is a text view in a scroll view. Depending on where you control-drag to, you can connect an outlet to either one, or separate outlets to both. I would suggest connecting an outlet to your text view, and asking it for its enclosingScrollView when needed.

Douglas Davidson
_______________________________________________
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: 
 >matching interface builder object to source (From: Matthew Cook <email@hidden>)

  • Prev by Date: Re: Question about multi-processing, multi-threading...
  • Next by Date: Re: Small animation
  • Previous by thread: matching interface builder object to source
  • Next by thread: Re: matching interface builder object to source
  • Index(es):
    • Date
    • Thread