Hi, I have an outline view which uses variable row heights, and need to resize 
and position the field editor as the user edits the text. My code in my outline 
view is as follows:

- (void)textDidChange:(NSNotification *)aNotification { 
        NSInteger editedRow = [self editedRow];
        if (editedRow > -1) {
                [self noteHeightOfRowsWithIndexesChanged:[NSIndexSet 
indexSetWithIndex:editedRow]];
                NSTextView *editor = (NSTextView *)[[self window] 
fieldEditor:NO forObject:self];
                NSRect newRect = [self frameOfCellAtColumn:[self editedColumn] 
row:editedRow];
                [editor setFrame:newRect];
        }
         
        [super textDidChange:aNotification];
}

I have confirmed that the editor is an object of the expected class (a subclass 
of NSTextView, but I have also checked with NSTextView), so as far as I can 
tell, it is the actual text editor.

No matter what I do, it doesn't update the frame of the editor. When the editor 
wraps to the next row, it draws the cell the right size but the editor only 
covers the top line of the cell. 

I can't help thinking I must be missing something obvious here, but haven't 
been able to find it. Any suggestions?

Thanks

Gideon








_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to