bugGNUstep - Bugs: bug #34434, gnustep doesn't contain a...

Group
 
 

bug #34434: gnustep doesn't contain a definition of the NSXMLParserDelegate protocol

Submitter:  julian <julian_>
Submitted:  Thu 29 Sep 2011 01:27:56 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Change Request Status:  Fixed
Privacy:  Public Assigned to:  FredKiefer
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 09 Nov 2011 12:09:56 PM UTC, comment #16: 

No problem, I just wanted to point that out...

Sebastian Reitenbach <buzzdee>
Group Member
Wed 09 Nov 2011 11:44:41 AM UTC, comment #15: 

i did not advocate breaking pre-gcc-4.6 systems, but just extending the macro so that @optional is used on clang AND gcc > 4.6 instead of only on clang

julian <julian_>
Wed 09 Nov 2011 11:35:32 AM UTC, comment #14: 

for example OpenBSD only ships gcc-4.2.1 in the base system, and due to licensing, there will probably never a newer version.

In the ports tree, there is only gcc-4.3, so it would not work on OpenBSD, well, clang could be used...

Sebastian

Sebastian Reitenbach <buzzdee>
Group Member
Wed 09 Nov 2011 11:12:59 AM UTC, comment #13: 

gcc supports @optional starting with version 4.6 btw ;-)

julian <julian_>
Tue 08 Nov 2011 12:52:26 PM UTC, comment #12: 

thanks that fixes it for me (on llvm). doesn't gcc support @optional too in recent versions?

julian <julian_>
Mon 07 Nov 2011 08:59:24 PM UTC, comment #11: 

Being lazy myself, I just changed the code to be similar to NSNetServices.h.

Fred Kiefer <FredKiefer>
Group Member
Mon 07 Nov 2011 05:46:11 PM UTC, comment #10: 

Yes, @optional is ObjC2
and yes, discrimination by feature is better than compiler version ... but I guess it means more configure tests ... and I hate trying to write them :-)

Richard Frith-Macdonald <CaS>
Group Member
Mon 07 Nov 2011 05:41:54 PM UTC, comment #9: 

Are you referring to the @optional attribute? We could add checks similar to those in NSNetServices.h. Although I think is is always wrong to discriminate based on the compiler and not on features.

Perhaps we need another check in configure for this.

Fred Kiefer <FredKiefer>
Group Member
Mon 07 Nov 2011 05:09:46 PM UTC, comment #8: 

I think my previous comment about needing #ifdef's for different compilers was missed.  Essentially the new protocol is ObjC2 specific and therefore should not be used in the vast majority of cases.
Probably the last change should be reverted (or, better, be fixed to be conditional on the presence) of an ObjC2 compiler).

Richard Frith-Macdonald <CaS>
Group Member
Mon 07 Nov 2011 04:43:18 PM UTC, comment #7: 

hm now i am getting a lot of warnings because i don't implement all of the delegate protocol methods. in cocoa all methods are defined as @optional  as can be seen in comment #2

julian <julian_>
Mon 07 Nov 2011 04:07:12 PM UTC, comment #6: 

The protocol was already there, all I needed to do was turn the informal protocol into a real protocol. I don't think it is worthwhile to define this differently for different base version numbers.

Fred Kiefer <FredKiefer>
Group Member
Sat 01 Oct 2011 06:27:20 AM UTC, comment #5: 

PS. also bear in mind that GNUstep is portable ... so it must work on a variety of compilers (gcc-4.0.0 is the baseline) ... so any patch needs to work for different compilers and optional protocols don't work for older compilers so #ifdef's to support the different compilers are needed.

Richard Frith-Macdonald <CaS>
Group Member
Thu 29 Sep 2011 02:40:03 PM UTC, comment #4: 

Hmm ... when I asked for contribution ... I meant in a usable form ...
ie a diff to NSXMLParser.h which would actually compile and with indentation line lengths and use of white space conforming to the coding style standard and with comments/documentation.  We also need copyright assignment if you haven't already done one.

What we can't do is just copy Apple headers!

Richard Frith-Macdonald <CaS>
Group Member
Thu 29 Sep 2011 02:30:33 PM UTC, comment #3: 

inline not such a god idea, attached

(file #24048)

julian <julian_>
Thu 29 Sep 2011 02:29:21 PM UTC, comment #2: 

@protocol NSXMLParserDelegate <NSObject>
@optional
- (void)parserDidStartDocument:(NSXMLParser *)parser;
- (void)parserDidEndDocument:(NSXMLParser *)parser;
- (void)parser:(NSXMLParser )parser foundNotationDeclarationWithName:(NSString )name publicID:(NSString )publicID systemID:(NSString )systemID;
- (void)parser:(NSXMLParser )parser foundUnparsedEntityDeclarationWithName:(NSString )name publicID:(NSString )publicID systemID:(NSString )systemID notationName:(NSString *)notationName;
- (void)parser:(NSXMLParser )parser foundAttributeDeclarationWithName:(NSString )attributeName forElement:(NSString )elementName type:(NSString )type defaultValue:(NSString *)defaultValue;
- (void)parser:(NSXMLParser )parser foundElementDeclarationWithName:(NSString )elementName model:(NSString *)model;
- (void)parser:(NSXMLParser )parser foundInternalEntityDeclarationWithName:(NSString )name value:(NSString *)value;
- (void)parser:(NSXMLParser )parser foundExternalEntityDeclarationWithName:(NSString )name publicID:(NSString )publicID systemID:(NSString )systemID;
- (void)parser:(NSXMLParser )parser didStartElement:(NSString )elementName namespaceURI:(NSString )namespaceURI qualifiedName:(NSString )qName attributes:(NSDictionary *)attributeDict;
- (void)parser:(NSXMLParser )parser didEndElement:(NSString )elementName namespaceURI:(NSString )namespaceURI qualifiedName:(NSString )qName;
- (void)parser:(NSXMLParser )parser didStartMappingPrefix:(NSString )prefix toURI:(NSString *)namespaceURI;
- (void)parser:(NSXMLParser )parser didEndMappingPrefix:(NSString )prefix;
- (void)parser:(NSXMLParser )parser foundCharacters:(NSString )string;
- (void)parser:(NSXMLParser )parser foundIgnorableWhitespace:(NSString )whitespaceString;
- (void)parser:(NSXMLParser )parser foundProcessingInstructionWithTarget:(NSString )target data:(NSString *)data;
- (void)parser:(NSXMLParser )parser foundComment:(NSString )comment;
- (void)parser:(NSXMLParser )parser foundCDATA:(NSData )CDATABlock;
- (NSData )parser:(NSXMLParser )parser resolveExternalEntityName:(NSString )name systemID:(NSString )systemID;
- (void)parser:(NSXMLParser )parser parseErrorOccurred:(NSError )parseError;
- (void)parser:(NSXMLParser )parser validationErrorOccurred:(NSError )validationError;
@end

julian <julian_>
Thu 29 Sep 2011 02:23:12 PM UTC, comment #1: 

GNUstep currently targets  OSX 10.4 with some extensions from later version.
That is, you can expect all 10.4 stuff, plus quite a good sample of later additions.

The NSXMLParserDelegate protocol is a recent (10.6) addition, but if you'd care to contribute header/documentation we can certainly add it for the next release.

Richard Frith-Macdonald <CaS>
Group Member
Thu 29 Sep 2011 01:27:56 PM UTC, original submission:  

gnustep doesn't contain a definition of the NSXMLParserDelegate protocol


Available in Mac OS X v10.3 and later.

julian <julian_>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #24048:  NSXMLParserDelegate.diff added by julian_ (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by buzzdee (Posted a comment)
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by julian_ (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-11-08 FredKiefer StatusReady For Test Fixed
        Open/ClosedIn Test Closed
    2011-11-07 FredKiefer StatusNone Ready For Test
        Assigned toNone FredKiefer
        Open/ClosedOpen In Test
    2011-09-29 julian_ Attached File- Added NSXMLParserDelegate.diff, #24048
    2011-09-29 CaS CategoryNone Base/Foundation
        Item GroupNone Change Request

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code