Fred Kiefer wrote: > Alexander Malmberg wrote: [snip] > > Relying on two separate enums having distinct values for their constants > > is wrong unless there is explicit documentation stating that the two > > enums are disjoint wrt values. There isn't currently, afaict, any such > > documentation in GNUstep or OpenStep, and I think it'd be a hack to add > > this for just two specific enums. > > At least for Cocoa these enums are fully documented,
Where? The NSRun*Response enum documentation here: http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSApplication.html contains no information about the actual integer values of the constants. Similarly, the NS*Button enum documentation here: http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSPanel.html contains no information about the actual integer values. Thus, I don't see where the documentation says or implies that it's safe to do eg. -stopModalWithCode: NSOKButton > we just need to do > the same for GNUstep. And what is the hack, you see here? I just don't > get the meaning of the sentence. Your change relies on the fact that the actual integer value of NSRunLoopContinuesResponse is not the same as the actual integer values of any NS*Button enum. Unless there is documentation that makes this safe, I consider that an implementation detail, and relying on that is a hack. I suppose you could see the headers, which do specify the integer values, as implicit documentation, but GNUstep doesn't have a "the header is the documentation"-tradition. [snip] > The point where I may disagree but I am not that sure, is b). What would > be the result of -runModalSession: if -stopModalWithCode: gets called > with NSRunStoppedResponse or NSRunAbortedResponse? If this will still be > that value, things are fine for me. Yes, NSRunStoppedResponse and NSRunAbortedResponse would be returned, just as they are now. - Alexander Malmberg _______________________________________________ Bug-gnustep mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-gnustep