• 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: Glen Low <email@hidden>
  • Date: Thu, 22 Jan 2004 20:24:04 +0800

I've just recently moved into Cocoa after working in java Swing for a while,
and it's a bit of an adjustment, but I really like this ease of laying out
interface components with Interface Builder. I've been through a few
cocoa/objective-c books but I'm a little fuzzy on how best to access user
interface objects programatically.

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.

The documentation says NSTextView should be accessed programmatically through its textStorage method.

You can get the scroll view by using the NSView enclosingScrollView method.

You can scroll to a range (as Alun said) using NSTextView scrollRangeToVisible: method.

Cheers, Glen Low


---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
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: 
 >RE: matching interface builder object to source (From: email@hidden)

  • Prev by Date: Re: who knows small (free) database for my cocoa project
  • Next by Date: Drag & Drop on NSTableView
  • Previous by thread: RE: matching interface builder object to source
  • Next by thread: PDF with background transparent?
  • Index(es):
    • Date
    • Thread