bugGNUstep - Bugs: bug #10649, It is not possible to subclass...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #10649: It is not possible to subclass NSBundle

Submitted by:  Stefan Urbanek <stefanu>
Submitted on:  Tue 12 Oct 2004 03:28:09 PM UTC  
 
Category: Base/FoundationSeverity: 2 - Minor
Item Group: BugStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Declined

Wed 13 Oct 2004 06:22:47 PM UTC, comment #3:

Is that a trick question?
If you want the behavior of a method in a subclass to differ from that of the superclass, you override the superclass behavior by implementing your preferred behavior in the subclass.
eg. if you wanted +bundleWithPath: to not return a cached bundle, you might re-implement it to create and return a new bundle instead.

Richard Frith-Macdonald <CaS>
Project Member
Wed 13 Oct 2004 06:12:34 PM UTC, comment #2:

So how can I subclass NSBundle and make sure that I get the right class for requred bundle?

Stefan Urbanek <stefanu>
Project Member
Tue 12 Oct 2004 04:01:32 PM UTC, comment #1:

In the first place, +bundleWithPath: will return instances of subclasses.

In the second place, there is no requirement that bundleWithPath: should return an instance of any particular class as it is explicitly documented (MacOS-X) as being free to return a cached NSBundle.

Richard Frith-Macdonald <CaS>
Project Member
Tue 12 Oct 2004 03:28:09 PM UTC, original submission:

bundleWithPath: for any NSBundle subclass will return NSBundle instance instead of subclass instance. It should return MyNSBundleSubclass instance instead.

Stefan Urbanek <stefanu>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Wed 13 Oct 2004 06:22:47 PM UTCCaSOpen/ClosedOpen=>Declined
Tue 12 Oct 2004 04:01:32 PM UTCCaSStatusNone=>Invalid

Back to the top


Powered by Savane 3.1-cleanup1