Ask a Question related to Mac Programming, Design and Development.
-
None #1
delegate or subclass NSTextView?
I can't quite figure out if I should focus on using the delegate
methods of a NSTextView or if I should work on subclassing it. What I'd
like is to have is a continuously updated "translation" line of text
just under the user entered line of text (like DNA to protein, for
instance). I could maybe figure this out better if I knew what commands
get sent to a NSTextView delegate. Is there a list anywhere of the
selectors that get sent by doCommandBySelector?
Thanks for any tips
None Guest
-
Losing Delegate On Postback
I have authored a webcontrol that contains a SimpleCellCollection of SimpleCell objects. Both have custom typeconverters that handle viewstate... -
NSTextView problems plus a few others...
Hey I am trying to make an NSTextView resize itself to fit the text as the user types. These are the steps I take: NSView *superView; // Not a... -
impersonate/delegate problem
Ok.. so I've read and seen lot of messages and MSDN docs concerning the above issue.. how do I get it to work? I want to impersonate the current... -
NSMutableAttributedString in an NSTextView
In <210720032130382351%sgketcham@comcast.net> Steve Ketcham wrote: Do you mean an NSTableView? Do you mean an NSTableView? It sounds to... -
NSScrollView for NSTextView scrolls then snaps back
I have a text view created in IB that I use to display the contents of the clipboard by doing a paste into the text view. When the text is... -
Paul Mitchum #2
Re: delegate or subclass NSTextView?
None <none@none.com> wrote:
If you look at the documentation, you'll find a list of delegate methods> I can't quite figure out if I should focus on using the delegate
> methods of a NSTextView or if I should work on subclassing it. What I'd
> like is to have is a continuously updated "translation" line of text
> just under the user entered line of text (like DNA to protein, for
> instance). I could maybe figure this out better if I knew what commands
> get sent to a NSTextView delegate. Is there a list anywhere of the
> selectors that get sent by doCommandBySelector?
for NSTextView and its superclasses. You can tame the wild documentation
with Cocoa Browser: <http://www.macupdate.com/info.php/id/10291>
You probably want to make a delegate object for the user-entered text
view, and then have that delegate object translate it and put it in the
second text view. This is simpler, conceptually, and would be easier to
understand if you're not all that intimately familiar with Cocoa.
Paul Mitchum Guest
-
None #3
Re: delegate or subclass NSTextView?
In article <1g1niwd.mytc1j15odc3hN%usenet@mile23.com.r3m0v3 >, Paul
Mitchum <usenet@mile23.com.r3m0v3> wrote:
Sorry to be so dense, but I've read the documentation and the info in> None <none@none.com> wrote:
>>> > I can't quite figure out if I should focus on using the delegate
> > methods of a NSTextView or if I should work on subclassing it. What I'd
> > like is to have is a continuously updated "translation" line of text
> > just under the user entered line of text (like DNA to protein, for
> > instance). I could maybe figure this out better if I knew what commands
> > get sent to a NSTextView delegate. Is there a list anywhere of the
> > selectors that get sent by doCommandBySelector?
> If you look at the documentation, you'll find a list of delegate methods
> for NSTextView and its superclasses. You can tame the wild documentation
> with Cocoa Browser: <http://www.macupdate.com/info.php/id/10291>
>
> You probably want to make a delegate object for the user-entered text
> view, and then have that delegate object translate it and put it in the
> second text view. This is simpler, conceptually, and would be easier to
> understand if you're not all that intimately familiar with Cocoa.
Cocoa Browser as well as all posts in deja that I can find on this
subject, but still cannot figure it out. There is no list of selectors
that are sent by doCommandBySelector, so I can't guess which message
might be appropriate to override.
But it turns out to work quite well for me if I do just subclass the
NSTextView rather than trying to get the delegate to receive the
correct messages. Now I just have a different novice type question. By
subclassing NSTextView, my window no longer behaves correctly in the
application; i.e. making changes to the text does not set the window to
know that its content has been changed. I know I can implement the undo
manager manually myself, but is there an easy way to re-hook up my
subclassed nstextview to the default window behavior so I don't have
to? I gather this is a result of making my own scrollview in IB using
my subclass rather than the built in scrollview objects...
Thanks again,
None Guest



Reply With Quote

