discuss-gnustep
[Top][All Lists]
Advanced

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

Re: AppKit Tool Problem


From: Andreas Hoeschler
Subject: Re: AppKit Tool Problem
Date: Fri, 2 Jul 2004 21:37:35 +0200

Hi all,

There have been quite a few changes since 0.9.0, so it is hard to tell, what is causing the difference for you. Which GUI classes are you actually using? In some cases it may be possible to work around the font allocation (which was causing your first problem), but if your are actually using GUI classes, they may have a reason to access a font.
In that case you need to initialise the backend, which gets done in the [NSApplication sharedApplication] call. Here you could try to redirect the X output, by pointing DISPLAY to another machine.

In the meanwhile I have found out which line in my tool causes the problem.

NAME:NSInternalInconsistencyException REASON:GSFontInfo.m:70 Assertion failed in GSFontEnumerator(class), method sharedEnumerator. Called with fontEnumeratorClass unset. The shared NSApplication instance must be created before methods that need the backend may be called.

It's the line

_textField = [[NSTextField alloc] init];

This text filed is not even used at this step. Just allocating an NSTextField seems to fire the backend. In earlier versions of GNUstep this was no problem. The reason why I do this in a tool is that a need to convert NSCalendarDate --> NSString and vice versa. I simply used

_textField = [[NSTextField alloc] init];
[[_textField cell] setFormatter:formatter];
return [_textField objectValue];

This is a bit hackish, but it worked until now. Any idea how to avoid the NSTextField approach or why this fires GSFontInfo stuff in newer releases of GNUstep?

Thanks a lot!

Regards,

Andreas


reply via email to

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