Re: An OutlineView with Finder Editing Behavior
Re: An OutlineView with Finder Editing Behavior
- Subject: Re: An OutlineView with Finder Editing Behavior
- From: Guillaume Gandreau <email@hidden>
- Date: Mon, 7 Nov 2005 13:37:39 +0100
Hi,
I got almost it !
In TextDidChange, I saw that the TextView frame changes as far as I
insert some char.
The frame of the TextView is growing.
As you told me about _NSKeyboard..., I've made a code to go through
View hierarchy and you were right, _NSKeyborad... view enclosed my
textView.
So in TextDidChange, I send a myTextVieW superview
setFrame:frameofmytextview.
and guess what ? It works !
The field is growing.
But now, I have to solve rectangle around the text which has to grow
too.
And field has to reduce when backspace is used.
Have you got an idea ?
Thank you so much, you give me the solution !
See you.
Le 3 nov. 05 à 00:31, Dragan Milić a écrit :
Hi there,
sorry for dalayed answer, I've been too busy and absent at the same
time. However, my answer won't be of much help. I told you that
"should work theoretically", but I've never tried. About strange
behaviour: it probably has something to do with the fact that while
you're editing a cell, a textView (the one that posts a
notification) is made subview of _NSKeyboardFocusClipView instance
object. Now, it's name beginning with underscore clearly shows you
that it's private to the framework and that you shouldn't mess
around with it, since your code may brake with new framework release.
As far as creating your own textView, I guess it won't help either,
and then you must override -editColumn:row:withEvent:select: and
inside that method send -
selectWithFrame:inView:editor:delegate:start:length: message to the
cell you're editing. In order to do so, you must access the cell
directly. Don't forget that NSTableView/NSOutlineView allows you to
access only rows and columns. There is a way to access cells
directly though, but it is also very dirty and undocumented, so
you'll be probably better off doing it, since it would probably
result in the same behaviour you're already experiencing. You may
try messing around with above mentioned _NSKeyboardFocusClipView
object and see what results that gives.
As I've said, I'm not of much help at all.
Regards,
Milke
On 29.10.2005. at 22:10, Guillaume Gandreau wrote:
Ok thanks.
your tip on LineBreak works very nice ! thanks !
For text field, I understand what you mean and subclassed
TextDidChange (I already had an outlineview subclass).
I have tried that but it sounds strange.
You're right, in aNotification under TextDidChange, the object is
an NSTextView.
But I can't make it resizing !
I've tried with SetConstrainedFrameSize or SetNeedsDisplayInRect...
But no success. The field stay as it is and text inside had a
strange behavior ( scroll left sometimes...).
Have I to create my own textview in the method you told ? ( -
(void)editColumn:(int)columnIndex row:(int)rowIndex withEvent:
(NSEvent *)theEvent select:(BOOL)flag)
Would NSLayoutManager or TextContainers or other friends be
helpfull ?
I don't understand very well usage of theses "Text System archi"
objects...
Thanks !
Guillaume
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden