Main Page | Report this Page
Computers Forum Index  »  Computer Languages (Objective-C)  »  Need help in understanding objective c code...
Page 1 of 1    

Need help in understanding objective c code...

Author Message
silverburgh...
Posted: Thu May 28, 2009 4:25 am
Guest
I need some help in understanding the following code:

1. What is the meaning of ' at (no spam) ' in at (no spam) "Reload"

button = MakeTestButton(&button_rect, at (no spam) "Reload", content);
[button setTarget:web_view];
[button setAction: at (no spam) selector(reload:)];

2. Where I can find the definition of " at (no spam) selector(reload:)"?
 
Gregory Weston...
Posted: Fri May 29, 2009 4:37 am
Guest
In article
<69fbd3d6-f4b9-4db6-9bd7-de150e98065a at (no spam) p6g2000pre.googlegroups.com>,
silverburgh <silverburgh.meryl at (no spam) gmail.com> wrote:

Quote:
I need some help in understanding the following code:

1. What is the meaning of ' at (no spam) ' in at (no spam) "Reload"

It means that this is an NSString* instead of a char*.

Quote:
button = MakeTestButton(&button_rect, at (no spam) "Reload", content);
[button setTarget:web_view];
[button setAction: at (no spam) selector(reload:)];

2. Where I can find the definition of " at (no spam) selector(reload:)"?

Depends what you mean by that. The answer to my best guess at your
meaning is that at (no spam) selector returns a SEL object for the method name
provided as an argument. The result of the code that you show is that
when the button is clicked it will do this:

[web_view reload:button];

--
I saw a truck today that had "AAA Batteries / Delivered and Installed" on the
side. My first thought was: That's a really weird business model. How many
inept people have urgent need of skinny little battery cells?
 
Preston...
Posted: Mon Jul 06, 2009 2:23 am
Guest
On 2009-05-27 22:25:13 -0600, silverburgh <silverburgh.meryl at (no spam) gmail.com> said:

Quote:
I need some help in understanding the following code:

1. What is the meaning of ' at (no spam) ' in at (no spam) "Reload"

The at (no spam) prefix is an Objective-C extension that creates a literal
NSString which will exist for the duration of your application.
 
 
Page 1 of 1    
All times are GMT
The time now is Mon Dec 07, 2009 5:06 pm