Re: UIView animation docs question

2009-11-04 Thread Fritz Anderson


On 3 Nov 2009, at 4:23 PM, lorenzo7...@gmail.com wrote:

[UIView setAnimationDidStopSelector:@selector 
(animationDidStop:finshed:context:)];



-(void)animationDidStop:(NSString *)animationID finished:(NSNumber *) 
finished context:(void *)context{...}


May I point out the spelling of the second part of the selector? In  
the method, it's fin_i_shed; in the argument, it's fin__shed.


— F

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: UIView animation docs question

2009-11-04 Thread Matt Neuburg
On Wed, 4 Nov 2009 09:17:30 -0600, Fritz Anderson fri...@manoverboard.org
said:

On 3 Nov 2009, at 4:23 PM, lorenzo7...@gmail.com wrote:

 [UIView setAnimationDidStopSelector:@selector
 (animationDidStop:finshed:context:)];


 -(void)animationDidStop:(NSString *)animationID finished:(NSNumber *)
 finished context:(void *)context{...}

May I point out the spelling of the second part of the selector? In
the method, it's fin_i_shed; in the argument, it's fin__shed.

Yeah, he knows.

This is the whole problem with passing things around as strings (selector
names, key-value coding, etc.); there are so many places to go wrong, and
when you do, it can be hard to debug. m.

-- 
matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: UIView animation docs question

2009-11-03 Thread Klaus Backert


On 3 Nov 2009, at 23:23, lorenzo7...@gmail.com wrote:


Here's the code:

[UIView beginAnimations:@display context:NULL];
[UIView setAnimationDuration:0.30];
[UIView setAnimationDelegate:self];
[UIView  
setAnimationDidStopSelector 
:@selector(animationDidStop:finshed:context:)];


Really finshed -- the i missing -- above and finished below in  
your code?


-(void)animationDidStop:(NSString *)animationID finished:(NSNumber  
*)finished context:(void *)context{...}


Klaus

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Re: UIView animation docs question

2009-11-03 Thread lorenzo7620

On Nov 3, 2009 5:08pm, Klaus Backert klaus.back...@t-online.de wrote:



On 3 Nov 2009, at 23:23, lorenzo7...@gmail.com wrote:






Here's the code:





[UIView beginAnimations:@display context:NULL];



[UIView setAnimationDuration:0.30];



[UIView setAnimationDelegate:self];


[UIView  
setAnimationDidStopSelector:@selector(animationDidStop:finshed:context:)];





Really finshed -- the i missing -- above and finished below in your  
code?





-(void)animationDidStop:(NSString *)animationID finished:(NSNumber  
*)finished context:(void *)context{...}






Klaus




Silly mistake, sorry for the noise.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Re: UIView animation docs question

2009-11-03 Thread lorenzo7620

On Nov 3, 2009 3:44pm, Fritz Anderson fri...@manoverboard.org wrote:

On 3 Nov 2009, at 3:29 PM, lorenzo7...@gmail.com wrote:





The documentation for setAnimationDidStopSelector in the XCode 3.2.1:  
says this:




...The message sent to the animation delegate after animations end. The  
default value is NULL. The selector should be of the form: -  
(void)animationDidStop:(NSString *)animationID finished:(NSNumber  
*)finished context:(void *)context. Your method must take the following  
arguments:...




I created a method using this signature, but it was never called. I  
looked through some sample code from Apple and found at least one example  
that actually uses its own user defined selector that takes no arguments.  
Mimicking that, I created my own selector and that actually gets called.  
So my question is two fold:





1) Is this a bug in the documentation?


2) If I want the data that should be passed to the selector, how do I go  
about it?





Paste your code in which you set the delegate and the longer selector you  
want; also the callback you wanted Core Animation to use (you can omit  
the body of the method).





— F





Here's the code:

[UIView beginAnimations:@display context:NULL];
[UIView setAnimationDuration:0.30];
[UIView setAnimationDelegate:self];
[UIView  
setAnimationDidStopSelector:@selector(animationDidStop:finshed:context:)];



-(void)animationDidStop:(NSString *)animationID finished:(NSNumber  
*)finished context:(void *)context{...}


Thanks
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: UIView animation docs question

2009-11-03 Thread Fritz Anderson

On 3 Nov 2009, at 3:29 PM, lorenzo7...@gmail.com wrote:

The documentation for setAnimationDidStopSelector in the XCode  
3.2.1: says this:


...The message sent to the animation delegate after animations end.  
The default value is NULL. The selector should be of the form: -  
(void)animationDidStop:(NSString *)animationID finished:(NSNumber *) 
finished context:(void *)context. Your method must take the  
following arguments:...


I created a method using this signature, but it was never called. I  
looked through some sample code from Apple and found at least one  
example that actually uses its own user defined selector that takes  
no arguments. Mimicking that, I created my own selector and that  
actually gets called. So my question is two fold:


1) Is this a bug in the documentation?
2) If I want the data that should be passed to the selector, how do  
I go about it?


Paste your code in which you set the delegate and the longer selector  
you want; also the callback you wanted Core Animation to use (you can  
omit the body of the method).


— F

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com