[Top][All Lists]

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

Re: NSSavePanel complains about .hidden

From: Richard Frith-Macdonald
Subject: Re: NSSavePanel complains about .hidden
Date: Wed, 9 Oct 2002 11:17:33 +0100

On Tuesday, October 8, 2002, at 06:37  pm, Jeff Teunissen wrote:

Adam Fedor wrote:

Pascal Bourguignon wrote:

It should be quite easy to add a function to set the file descriptor (or a stream, which could be a memory stream) to which NSLog output
should be sent.

You can already create your own NSLog_print_handler to take over the job of dealing with NSLog output. There's even a user preference to redirect
the output to syslog.

Yes, there is...unfortunately, it's not as useful as it could be -- tools often use NSLog() to output information that should always be printed to
stdout. I was trying to figure out what was wrong with a plist, and
getting confused because plparse was producing no output. :)

So, consider this a bug report. :)

Yep ... I admit to laziness ... in the tools I've written I have often used
NSLog() to write strings out, because I can just do


rather than having to write the much longer

    NSString    *s = [foo description];
NSData *d = [s dataUsingEncoding: [NSString defaultCStringEncoding]];

    if (d == nil)
        d = [s dataUsingEncoding: NSUTF8StringEncoding];
     fprintf(stderr, "%*.*s\n", [d length], [d length], [d bytes]);

Perhaps having a GSPrintf() function to write formatted data to a FILE would be
a worthwhile addition to GNUstep?

reply via email to

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