On Wed, 30 Jun 2010 18:02:38 -0400, Laurent Daudelin
laur...@nemesys-soft.com said:
On Jun 30, 2010, at 17:48, Greg Parker wrote:
On Jun 30, 2010, at 2:42 PM, Laurent Daudelin wrote:
Yes, I know that, but can you send an instance method to a class object?
Yes, you can. Every class object is
On Wed, Jun 30, 2010 at 5:44 PM, Dave Carrigan d...@rudedog.org wrote:
On Jun 30, 2010, at 2:35 PM, Laurent Daudelin wrote:
Well, isn't -respondsToSelector: an instance method?
if ([[Someclass class] respondsToSelector:@selector(classSelector)]) {
// yup
}
An extremely minor
For more information: http://stackoverflow.com/questions/3107213
Dave
On Jul 1, 2010, at 10:05 AM, Michael Ash wrote:
On Wed, Jun 30, 2010 at 5:44 PM, Dave Carrigan d...@rudedog.org wrote:
On Jun 30, 2010, at 2:35 PM, Laurent Daudelin wrote:
Well, isn't -respondsToSelector: an instance
On Thu, Jul 1, 2010 at 12:05 PM, Michael Ash michael@gmail.com wrote:
An extremely minor nitpick: the use of +class here is necessary.
Of course I meant to write that the use of +class here is UNnecessary. Sigh.
Mike
___
Cocoa-dev mailing list
On Jul 1, 2010, at 9:14 AM, Michael Ash michael@gmail.com wrote:
On Thu, Jul 1, 2010 at 12:05 PM, Michael Ash michael@gmail.com wrote:
An extremely minor nitpick: the use of +class here is necessary.
Of course I meant to write that the use of +class here is UNnecessary. Sigh.
And it
On Jul 1, 2010, at 7:56 AM, Matt Neuburg wrote:
Instance methods defined in a root class can be performed both by instances
and by class objects. Therefore, all class objects have access to the
instance methods defined in the root class.
Not that it would generally be USEFUL to do so, since
On Jul 1, 2010, at 9:42 AM, Jonathon Kuo newsli...@autonomy.caltech.edu wrote:
On Jul 1, 2010, at 7:56 AM, Matt Neuburg wrote:
Instance methods defined in a root class can be performed both by instances
and by class objects. Therefore, all class objects have access to the
instance methods
On Jul 1, 2010, at 9:49 AM, Kyle Sluder wrote:
On Jul 1, 2010, at 9:42 AM, Jonathon Kuo newsli...@autonomy.caltech.edu
wrote:
On Jul 1, 2010, at 7:56 AM, Matt Neuburg wrote:
Instance methods defined in a root class can be performed both by instances
and by class objects. Therefore, all
Le 1 juil. 2010 à 19:30, Jonathon Kuo a écrit :
On Jul 1, 2010, at 9:49 AM, Kyle Sluder wrote:
On Jul 1, 2010, at 9:42 AM, Jonathon Kuo newsli...@autonomy.caltech.edu
wrote:
On Jul 1, 2010, at 7:56 AM, Matt Neuburg wrote:
Instance methods defined in a root class can be performed
On Thu, Jul 1, 2010 at 1:30 PM, Jonathon Kuo
newsli...@autonomy.caltech.edu wrote:
On Jul 1, 2010, at 9:49 AM, Kyle Sluder wrote:
On Jul 1, 2010, at 9:42 AM, Jonathon Kuo newsli...@autonomy.caltech.edu
wrote:
On Jul 1, 2010, at 7:56 AM, Matt Neuburg wrote:
Instance methods defined in a
On Thu, Jul 1, 2010 at 10:30 AM, Jonathon Kuo
newsli...@autonomy.caltech.edu wrote:
Interesting... so what happens at runtime if a class object invokes an
instance method that accesses instance variables? Exception? Assertion? Seg
fault?
Invoke is an inaccurate word. Let's use the proper
I need to check for backward compatibility whether a given class object
responds to a selector. I found the function 'class_respondsToSelector()' which
the doc says is defined in 'runtime.h'. However, I can't find that header
anywhere.
Does anybody know where that header might be? No, it's not
#import objc/runtime.h
Dave
Sent from my iPhone
On Jun 30, 2010, at 1:43 PM, Laurent Daudelin laur...@nemesys-soft.com wrote:
I need to check for backward compatibility whether a given class object
responds to a selector. I found the function 'class_respondsToSelector()'
which the doc
On Jun 30, 2010, at 12:43 PM, Laurent Daudelin wrote:
I need to check for backward compatibility whether a given class object
responds to a selector. I found the function 'class_respondsToSelector()'
which the doc says is defined in 'runtime.h'.
Is there some reason you can't call
On Jun 30, 2010, at 16:55, Greg Parker wrote:
On Jun 30, 2010, at 12:43 PM, Laurent Daudelin wrote:
I need to check for backward compatibility whether a given class object
responds to a selector. I found the function 'class_respondsToSelector()'
which the doc says is defined in 'runtime.h'.
On Jun 30, 2010, at 2:35 PM, Laurent Daudelin laur...@nemesys-soft.com wrote:
On Jun 30, 2010, at 16:55, Greg Parker wrote:
Is there some reason you can't call -respondsToSelector: on the class
object?
Well, isn't -respondsToSelector: an instance method?
Remember that NSObject is a
On Jun 30, 2010, at 17:41, Kyle Sluder wrote:
On Jun 30, 2010, at 2:35 PM, Laurent Daudelin laur...@nemesys-soft.com
wrote:
On Jun 30, 2010, at 16:55, Greg Parker wrote:
Is there some reason you can't call -respondsToSelector: on the class
object?
Well, isn't
On Jun 30, 2010, at 2:35 PM, Laurent Daudelin wrote:
Well, isn't -respondsToSelector: an instance method?
if ([[Someclass class] respondsToSelector:@selector(classSelector)]) {
// yup
}
--
Dave Carrigan
d...@rudedog.org
Seattle, WA, USA
On Jun 30, 2010, at 2:42 PM, Laurent Daudelin wrote:
Yes, I know that, but can you send an instance method to a class object?
Yes, you can. Every class object is itself an instance of NSObject. Therefore,
every class object also responds to all of NSObject's instance methods.
On Jun 30, 2010, at 17:48, Greg Parker wrote:
On Jun 30, 2010, at 2:42 PM, Laurent Daudelin wrote:
Yes, I know that, but can you send an instance method to a class object?
Yes, you can. Every class object is itself an instance of NSObject.
Therefore, every class object also responds to all
20 matches
Mail list logo