[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TextFieldCell, editWithFrame:inView:editor:delegate:self

From: Fred Kiefer
Subject: Re: TextFieldCell, editWithFrame:inView:editor:delegate:self
Date: Sat, 06 Sep 2003 16:04:46 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204

Björn Giesler wrote:
can anybody explain to me something in the text system that I don't
understand? I'm building a NSView subclass that is supposed to show
address information on a person. Since the layout is greatly
variable, I keep the information in NSTextFieldCells and do the
layout in the view's drawRect: method (see
http://giesler.biz/bjoern/Downloads/Contax/Contax-pre.jpg for a
screenshot). Now, when somebody clicks on a textfield cell, I want to
start editing the cell, so I send it

[c editWithFrame: rect inView: aView editor: textView delegate: self event: event];

What I don't understand is: What exactly is aView supposed to be?
Whatever it is, it gets resized to rect, so it can't be self. I've
tried constructing a special view class, setting it to be a subview
of self and using that as aView, which kind of works, but the cursor
is not shown and the view is not updated while editing.

I guess I wouldn't be quite so clueless if I understood the purpose
of this third view; it seems superfluous to me, since there's already
a view involved (textView).

aView should obviously be the control view of the cell. And I do not
see, where it should get resized to rect. On the other hand rect normally is already the content rect of this view. I don't quite understand why this is not the case for you.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]