• 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
NSScrollView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSScrollView


  • Subject: NSScrollView
  • From: Matthew Cox <email@hidden>
  • Date: Sat, 13 Oct 2001 14:47:22 -0400

What is the correct way to use an NSScrollView? My understanding (and logical analysis) seems to deduce:

1: NSScrollView is placed in window, and linked to controller outlet (as a NIB file)
@interface
{
IBOutlet NSScrollView *scroller;
ArbitraryNSViewSubclass *view;
}
//__ Misc protoypes
@end
2: In awakeFromNib (or someplace similar)
{
//Prepare everything that view will need to draw (tilemap, etc.)

view = [[ArbitraryNSViewSubclass alloc] init];
[scroller setDocumentView:view];

//Clean up init. DON'T RELEASE view, NEEDED FOR FUTURE CONTROLLER TASKS
}

Events are handled in this fashion:
1 NSScrollView takes all events, performs any applicable to itself: Scrolling, resizing, etc.
2 ArbitraryNSViewSubclass gets all events that occur in the drawn area, such as mousedown, or any that do not apply NSScrollView (like 'k' pressed).

This about close to reality?


  • Prev by Date: Re: loginwindow
  • Next by Date: Re: loginwindow
  • Previous by thread: [somewhat off] Re: loginwindow
  • Next by thread: USB, interrupt pipes, and Siemens?
  • Index(es):
    • Date
    • Thread