Nicola Pero wrote:
>>Richard latest changes to NSData caused that the NSSavePanel now 
>>complains, if it cannot find a .hidden file in a directory:
>>
>>2002-10-05 13:21:29.687 Ink[1323] File NSData.m: 219. In 
>>readContentsOfFile Open (/.hidden) attempt failed - No such file or 
>>directory
> 
> 
> I'm not sure if it is a good policy that the base library jumps to talk
> directly to the user (/stderr) ... because it's a very inflexible /
> uncustomizable behaviour - the library should instead allow the program to
> perform/provide its own checks / error routines, which might depend a lot
> on the situation - a NSLog might be totally inappropriate.
> 

When run in a graphical environment, a User wouldn't even typically see 
these message, since they would go to the console. NSLog messages are 
more for developers and bug tracking.


> NSString +stringWithContentsOfFile should return nil if the file can't be
> opened ... it is up to the caller to decide what to do in that case, if
> this is perfectly acceptable or it is a major error, if it needs to be
> logged to stdout / stderr / a file / displayed in an alert panel /
> whatever, or if it can be ignored (as in the case of NSSavePanel).

Well, it would be nice if the reason for the error could be stored 
somewhere (like Unix's errno/errstring). That was the reason that this 
change was made in the first place - the libraries spit out an error 
that was completely different than the real reason it failed. It's 
typically the higher level methods that need to decide if something is 
an error anyway.


-- 
Adam Fedor, Digital Optics Corp.      | I'm glad I hate spinach, because
http://www.doc.com                    | if I didn't, I'd eat it, and you
                                       | know how I hate the stuff.



_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to