bug-gnustep
[Top][All Lists]
Advanced

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

[bugs #10649] It is not possible to subclass NSBundle


From: Richard Frith-Macdonald
Subject: [bugs #10649] It is not possible to subclass NSBundle
Date: Wed, 13 Oct 2004 14:35:09 -0400
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5 (KHTML, like Gecko) Safari/125.9

This mail is an automated notification from the bugs tracker
 of the project: GNUstep.

/**************************************************************************/
[bugs #10649] Latest Modifications:

Changes by: 
                Richard Frith-Macdonald <rfm@gnu.org>
'Date: 
                Wed 10/13/2004 at 18:22 (GMT)

            What     | Removed                   | Added
---------------------------------------------------------------------------
              Status | Open                      | Declined


------------------ Additional Follow-up Comments ----------------------------
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.






/**************************************************************************/
[bugs #10649] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10649>
Project: GNUstep
Submitted by: Stefan Urbanek
On: Tue 10/12/2004 at 15:28

Category:  Base/Foundation
Severity:  3 - Ordinary
Item Group:  Bug
Resolution:  Invalid
Privacy:  Public
Assigned to:  None
Status:  Declined


Summary:  It is not possible to subclass NSBundle

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

Follow-up Comments
------------------


-------------------------------------------------------
Date: Wed 10/13/2004 at 18:22       By: Richard Frith-Macdonald <CaS>
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.

-------------------------------------------------------
Date: Wed 10/13/2004 at 18:12       By: Stefan Urbanek <stefanu>
So how can I subclass NSBundle and make sure that I get the right class for 
requred bundle?

-------------------------------------------------------
Date: Tue 10/12/2004 at 16:01       By: Richard Frith-Macdonald <CaS>
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.













For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10649>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/







reply via email to

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