« Return to Thread: NSView drawing in tool

NSView drawing in tool

by Andreas Höschler :: Rate this Message:

Reply to Author | View in Thread

Hi all,

I have a tool (service) that is supposed to generate PNG images using
NSView drawRect and

       NSBitmapImageRep *rep = [[NSBitmapImageRep alloc]
initWithFocusedViewRect:[mapView bounds]];

When running this tool and calling the above method (NSView, NSImage
stuff,...) I get

GSFontInfo.m:71  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.

OK, I modified my main.m to call

       [NSApplication sharedApplication];

before starting the event loop with [[NSRunLoop currentRunLoop] run],
but this gives me

        /opt/GNUstep/Local/Tools/OSMMapServer: Uncaught exception
WindowServerCommunication, reason: Unable to connect to X Server `'

What am i missing?

Thanks a lot!

Regards,

   Andreas



_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@...
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

 « Return to Thread: NSView drawing in tool