Re: [OT] Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Ken Thomases via Cocoa-dev
On Apr 29, 2020, at 5:27 PM, Sandor Szatmari via Cocoa-dev 
 wrote:
> 
>> On Apr 29, 2020, at 17:12, Alex Zavatone via Cocoa-dev 
>>  wrote:
>> 
>> Not sure about this, but in Objective-C, you’re not supposed to start 
>> methods with new.
> 
> I’ve always operated under the premise that using a reserved prefix, such as 
> new, was not verboten.  Rather, if one chose the prefix new one must ensure 
> that the method followed memory management conventions, and would return an 
> object with a +1 retain count.  Am I mistaken about this?

No, you're not mistaken.  That's correct.

Regards,
Ken

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


[OT] Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Sandor Szatmari via Cocoa-dev
Alex,

> On Apr 29, 2020, at 17:12, Alex Zavatone via Cocoa-dev 
>  wrote:
> 
> Not sure about this, but in Objective-C, you’re not supposed to start 
> methods with new.

I’ve always operated under the premise that using a reserved prefix, such as 
new, was not verboten.  Rather, if one chose the prefix new one must ensure 
that the method followed memory management conventions, and would return an 
object with a +1 retain count.  Am I mistaken about this?

Sandor

> 
>>> On Apr 29, 2020, at 4:07 PM, Carl Hoefs via Cocoa-dev 
>>>  wrote:
> NSTimer *newTimer = [NSTimer timerWithTimeInterval:1.0  // should be 1/sec
>   target:self
> selector:@selector(newData:)
> userInfo:nil
>  repeats:YES];
>   [[NSRunLoop mainRunLoop] addTimer:newTimer
> forMode:NSRunLoopCommonModes];
> 
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/admin.szatmari.net%40gmail.com
> 
> This email sent to admin.szatmari@gmail.com
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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