gnustep-dev
[Top][All Lists]
Advanced

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

Re: Current status of NSTextStorage/NSLayoutManager/NSTextContainer?


From: Derek Fawcus
Subject: Re: Current status of NSTextStorage/NSLayoutManager/NSTextContainer?
Date: Wed, 23 Sep 2009 16:51:05 +0100
User-agent: Mutt/1.4.1i

On Sat, Sep 19, 2009 at 05:32:56PM +0200, Fred Kiefer wrote:
> Thank you for you example code, you really should have send it to the
> list, as it make such a great example of using the text system
> components by themselves without an NSTextView.

I didn't think it'd be of general interest.  However,  there is nothing
special in there,  so feel free to do whatever you wish with the code.

> The issue you had with
> GNUstep was easy to track down, you didn't set a paragraph style for
> your string and GNUstep wasn't handling that gracefully.

Aha.  Thanks.

I'd started debugging,  but didn't get too far, having got burried in
the GSTextLayout stuff.

> I changed
> GNUstep SVN to use the default paragraph style when none is set, now
> your example runs correctly for me. You either will have to update to
> GNUstep SVN to see this or use an explicit paragraph style in your code.

Well the final program needs to use non default styles anyway...

BTW - From reading the source,  it seemed to me that NSTextContainer
could do with the addition of a method like:

- (id)init
{
    return initWithContainerSize: NSZeroSize;
}

simply to ensure that the instance variables get initialised to
something sensible if/when code does:

        textContainer = [[NSTextContainer alloc] init];

(or uses the 'new' method).   This in spite of the comment
in the code about zero sized containers.

>From observing the class contents under OSX (10.4.11) I noticed
that it does initialise all of its instance variables when
-init is used - picking an NSSize of (10000000,10000000).

DF




reply via email to

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