Re: RegEx in cocoa, and where to dl PB+IB?
Re: RegEx in cocoa, and where to dl PB+IB?
- Subject: Re: RegEx in cocoa, and where to dl PB+IB?
- From: Cryx <email@hidden>
- Date: Sun, 28 Apr 2002 00:20:02 -0500
I'm sending this back to the list because I'm interesting in whether
anyone else has an elegant solution to the "vertical scrolling text
field that can easily process a raw keyDown".
On Saturday, April 27, 2002, at 11:44 PM, Joel Rosenblum wrote:
On Saturday, April 27, 2002, at 10:37 PM, Cryx wrote:
If I recall correctly, you can receive delegate notifications when the
window needs a field editor.
That went a bit over my head. What's a delegate, what's a delegate
notification, what's a field editor, what's a FirstResponder, or where
can I type those things in to learn about them?
Just go to developer.apple.com and search for any of the topics and read
up on the objects. In a nutshell to get you started: a delegate is an
object that has elected to receive notifications from another object.
The field editor is the object that is managing the "editing" of the
text storage. The first responder is the first object in a responder
chain (list of objects) that UI events are sent for processing.
You can use these to substitute your own editor subclass with a
keyDown method. In my own case, it proved to be much simpler to use a
plain NSTextField and catch the keyDown events.
I'd like a text field which can scroll vertically. NSTextField doesn't
appear to have that capability. Or am I missing something obvious?
Sigh. I wanted vertical scrolling on my text field too, but I was
willing to sacrifice it to process keystrokes. I figure I'll implement
my own scrolling on a text field some day, unless someone else who has
accomplished the same task can provide guidance.
Also, on a related note, where is the scrollbar control in IB? Don't
tell me there is none!
There is, but it's not obvious: use a "custom view" and change its
class to NSScroller.
_______________________________________________
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.