• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSLog(@"%@",[NSProxy class]);
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSLog(@"%@",[NSProxy class]);


  • Subject: Re: NSLog(@"%@",[NSProxy class]);
  • From: Philippe Mougin <email@hidden>
  • Date: Sun, 12 Mar 2006 02:20:23 +0100

Le 12 mars 06 à 01:30, Greg Herlihy a écrit :

NSProxy is not "broken". NSProxy happens to be an abstract class - which
means first - it must be subclassed before it can be used; and second -
there are certain methods which a subclass of NSProxy must implement.

[...]

And all of this information about NSProxy is easily found in the Foundation
Reference for Objective-C documentation.


Greg

To clarify: what was discussed in this thread is the behavior of NSProxy at the class level: what happens when you try to manipulate the NSProxy class object itself (by opposition to instances of NSProxy). It is at the class (and metaclass) level that NSProxy is broken.


Best,

Philippe Mougin
http://www.fscript.org

On 3/11/06 4:03 PM, "Philippe Mougin" <email@hidden> wrote:

Agent M wrote:
I have come across a difficulty with an NSProxy subclass
on 10.3.9 which can be summed up with the following lines:

Class p=[NSProxy class];
NSLog(@"class %@",p);

The second line throws an exception:
*** Uncaught exception: <NSInvalidArgumentException>
*** -[NSProxy methodSignatureForSelector:] called!

Actually this is a general problem. Briefly, the whole meta level of the NSProxy class hierarchy is broken, making the NSProxy class object non-functional. The problem comes from the fact that, in the current (broken) implementation, NSProxy's meta class inherits from the NSProxy class. This mimics the NSObject class system layout, but while this layout is correct for NSObject, it is not correct for NSProxy because of the differences in semantic between the concept of an object an the concept of a proxy.

Executive summary: the NSProxy class object is broken. Do not use it,
or write workarounds (like you did) to support the functionality you
need.

Best,

Philippe Mougin
http://www.fscript.org

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSLog(@"%@",[NSProxy class]);
      • From: glenn andreas <email@hidden>
References: 
 >Re: NSLog(@"%@",[NSProxy class]); (From: Greg Herlihy <email@hidden>)

  • Prev by Date: Re: NSLog(@"%@",[NSProxy class]);
  • Next by Date: Re: complicated (I think) Binding
  • Previous by thread: Re: NSLog(@"%@",[NSProxy class]);
  • Next by thread: Re: NSLog(@"%@",[NSProxy class]);
  • Index(es):
    • Date
    • Thread