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

Custom view problems


  • Subject: Custom view problems
  • From: Josh Black <email@hidden>
  • Date: Mon, 26 Apr 2004 11:40:21 -0700 (PDT)

Here is my setup: I have a document based application. The nib file
for my main document contains one large NSScrollView. I have defined
my own subclass of NSView called LineView. Inside this class, I've
created 2 NSTextViews and arranged them side by side. I have then made
the LineView class the documentView of the NSScrollView. My goal in
doing all of this was to have the NSScrollView scroll both NSTextViews
all at once, like in one big piece.

The problem I'm having is that I can not get focus to one of my
NSTextViews. I've explicitly called makeFirstResponder and
setInitialFirstResponder on the NSTextView I want to receive focus.
I've made sure that my LineView custom view class overrides
acceptsFirstResponder and returns YES. I've searched all of the Apple
developer documentation, but for the life of me, I can't figure out why
I can not get focus to this NSTextView.

Any ideas? Should I post my code? Any help is _greatly_ appreciated.
Thanks!

Josh
_______________________________________________
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: NSImageRGBColorTable crash
  • Next by Date: Re: file browsing?
  • Previous by thread: Re: setApplicationIconImage
  • Next by thread: Saving an object to a file
  • Index(es):
    • Date
    • Thread