On Oct 22, 2009, at 9:54 am, Jeff Johnson wrote:
> "Ignore bbum. We hereby promise never to break == for SEL. (But SEL is not
> char*. We will break that.)"
> And now that it's on the mailing lists, it can be considered part of Apple's
> official documentation. ;-)
>
It already is:
On Oct 22, 2009, at 10:53 AM, Bill Bumgarner wrote:
Selectors are strings, but it is an implementation detail.
The runtime uniques the strings such that there is only ever one
instance of, say, the "drawRect:" selector floating about. Thus,
the runtime can use pointer comparison to determi
On Oct 22, 2009, at 9:01 AM, Jens Alfke wrote:
This statement is true; however those integers happen to be the
memory addresses of unique instances of the strings*. This makes it
very efficient for the runtime to convert a selector to an NSString,
and vice versa, and also helps with debugg
On Oct 22, 2009, at 5:54 AM, Jim Kang wrote:
However, a selector is not a string. I was just listening to this
podcast
with Mike Ash, and he discusses this around the 9:23 mark or so:
http://podcast.mobileorchard.com/episode-23-mike-ash-on-the-objective-c-runtime-objects-and-the-runtime-messa
On Oct 22, 2009, at 5:54 AM, Jim Kang wrote:
> However, a selector is not a string. I was just listening to this podcast
> with Mike Ash, and he discusses this around the 9:23 mark or so:
>
> http://podcast.mobileorchard.com/episode-23-mike-ash-on-the-objective-c-runtime-objects-and-the-runtime-
Jens, thanks for clearing up the thing about the selector defining a message
(method plus parameters) rather than a method and thus not being tied to a
class.
On Thu, Oct 22, 2009 at 1:21 AM, Jens Alfke wrote:
>
> On Oct 21, 2009, at 9:43 AM, Jim Kang wrote:
>
> That selector is a unique index t
With all due respect, but by 'directly answering the question' you
are doing the OP and all those reading this list a dis-service.
You are just rewarding his lazyness.
The OP has already been told to bone up on Obj-C basics, and he's
obviously completely ignored this advice, the reason being that
On 22/10/2009, at 3:52 PM, Joshua Garnham wrote:
> Ah, I see. so I need to send it to an instance of the class not the class it
> self.
> How would I do that?
With respect, please understand that your questions are akin to this:
Q. How do I start the car?
A. You turn the key.
Q. How do I driv
Selector to another Class.
On Oct 21, 2009, at 9:43 AM, Jim Kang wrote:
That selector is a unique index that points to a method of a specific class.
>
No, that's not true of Objective-C (although it is of C++ method-pointers.) A
selector is, basically, just a unique string: it d
On Oct 21, 2009, at 9:43 AM, Jim Kang wrote:
That selector is a unique index that points to a method of a
specific class.
No, that's not true of Objective-C (although it is of C++ method-
pointers.) A selector is, basically, just a unique string: it defines
a message, not a method, to use
That selector is a unique index that points to a method of a specific class.
Methods themselves belong to a specific class and can't operate outside of
their classes. (They compile down to regular C functions that accept an
additional object parameter.)
So, it doesn't make sense to use one class's
- Message from joshua.garn...@yahoo.co.uk -
but i get a warning in xcode, http://cld.ly/7c4la.
(JGManagedObject is what replaces otherClass)
That one is usually a case of not importing the JGManagedObject header
or not declaring the class method in that interface.
__
On Oct 21, 2009, at 10:02, Shawn Erickson wrote:
But I just get an error in the Debugger saying
+[otherClass doSomethingElse]: unrecognized selector sent to class
0xe5c4
You are sending a message to an object that doesn't respond to that
message
(aka no implementation for it). The error
.
From: Shawn Erickson
To: Joshua Garnham
Cc: cocoa-dev@lists.apple.com
Sent: Wednesday, 21 October, 2009 18:02:55
Subject: Re: Sending a Selector to another Class.
On Wed, Oct 21, 2009 at 9:23 AM, Joshua Garnham
wrote:
>How would I send a Selector to anot
On Wed, Oct 21, 2009 at 9:23 AM, Joshua Garnham
wrote:
> How would I send a Selector to another class?
> I know to send it to a selector in the same file you do
> [self performSelector:@selector(doSomething)];
>
Why not simply... [self doSomething] ?
> and for sending it to another class I've t
On Oct 21, 2009, at 12:23 PM, Joshua Garnham wrote:
How would I send a Selector to another class?
I know to send it to a selector in the same file you do
[self performSelector:@selector(doSomething)];
and for sending it to another class I've tried
[otherClass performSelector:@selector(doSomethi
16 matches
Mail list logo