Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
Cosmic rays? Disk corruption? Tired bits? Embedded escapes? Xcode cruft? Whatever the bug-a-boo was, with a freshly reinstalled Xcode (11.2.1) and command line tools, it's gone! I blew everything away and rebuilt the project and It Just Works™️. Thanks for all the support. Sorry for the noise!

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Chris Walters via Cocoa-dev
I’m not suggesting you do this as any kind of real solution I just wanted to see if it would work, but I was able to ‘hack’ the immutable timer interval, perhaps something like this can help you track down what is happening. I found a couple of structs in GitHub for CF source and wondered if it

Re: [OT] NSTimer +timerWithTimeInterval:

2020-04-29 Thread Alex Zavatone via Cocoa-dev
Sandor, it’s somewhere in the naming guide for the Objectice-C fundamental docs. I could be confusing things though. > On Apr 29, 2020, at 5:27 PM, Sandor Szatmari > wrote: > > Alex, > >> On Apr 29, 2020, at 17:12, Alex Zavatone via Cocoa-dev >> wrote: >> >> Not sure about this, but in O

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Ken Thomases via Cocoa-dev
Does this happen only when launched from Xcode, or also when launched normally? Does this happen with a different user account? Does it happen when run on another Mac? -Ken > On Apr 29, 2020, at 4:35 PM, Carl Hoefs via Cocoa-dev > wrote: > > There are no extensions or categories in the pro

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread John Bishop via Cocoa-dev
The documentation indicates "... for a repeating timer, you must invalidate the time object yourself by calling its invalidate method. Calling this method requests the removal of the timer from the current run loop; as a result, you should always call the invalidate method from the same thread

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 r

[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

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Keary Suska via Cocoa-dev
Are the timer values actual numeric constants, or a variable defined earlier in code? Keary Suska Esoteritech, Inc. "Demystifying technology for your home or business" > On Apr 29, 2020, at 3:35 PM, Carl Hoefs via Cocoa-dev > wrote: > > There are no extensions or categories in the project. >

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Alex Zavatone via Cocoa-dev
For giggles, comment out the current code and replace it with exactly the same code. Or put it in a new class and call the new class. > On Apr 29, 2020, at 4:45 PM, Carl Hoefs via Cocoa-dev > wrote: > > When everything goes wonky... it's time to reinstall all of Xcode...! > > *sigh* > -Car

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Rob Petrovec via Cocoa-dev
I thought when everything goes wonky you zap the PRAM and rebuild the Desktop? —Rob > On Apr 29, 2020, at 3:45 PM, Carl Hoefs via Cocoa-dev > wrote: > > When everything goes wonky... it's time to reinstall all of Xcode...! > > *sigh* > -Carl > > > __

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
When everything goes wonky... it's time to reinstall all of Xcode...! *sigh* -Carl ___ 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(

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
There are no extensions or categories in the project. I changed the -newData: method name to -arrivalOfNewData:. I changed the newTimer variable name to theTimer. I rebooted the machine. No joy. I realize this is no longer a Cocoa problem, but what - even theoretically - could cause this? A

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Alex Zavatone via Cocoa-dev
Just ot be safe, reboot your Mac to make sure that things aren’t completely borked. I’ve had to do this many times. > On Apr 29, 2020, at 4:26 PM, Carl Hoefs > wrote: > > I accept that NSTimer works as documented! But I allege there must be > something odd about my (inherited) project that

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
I accept that NSTimer works as documented! But I allege there must be something odd about my (inherited) project that I can't quite put my finger on. Perhaps the +timerWithTimeInterval: method is overridden... -Carl > On Apr 29, 2020, at 2:15 PM, Alex Zavatone wrote: > > I used your code in a

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Alex Zavatone via Cocoa-dev
I used your code in an iOS project and it works as expected. 2020-04-29 16:14:02.254107-0500 Timer[83275:13268128] Wed Apr 29 16:14:02 2020 2020-04-29 16:14:03.254048-0500 Timer[83275:13268128] Wed Apr 29 16:14:03 2020 2020-04-29 16:14:04.253957-0500 Timer[83275:13268128] Wed Apr 29 16:14:04 2020

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Alex Zavatone via Cocoa-dev
Not sure about this, but in Objective-C, you’re not supposed to start methods with new. > 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

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
On Apr 29, 2020, at 1:53 PM, Carl Hoefs via Cocoa-dev wrote: > > On Apr 29, 2020, at 1:43 PM, Steve Mills via Cocoa-dev > mailto:cocoa-dev@lists.apple.com>> wrote: >> >> On Apr 29, 2020, at 15:36:23, Carl Hoefs via Cocoa-dev >> wrote: >>> >>> When I issue NSTimer's +timerWithTimeInterval:::

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
On Apr 29, 2020, at 1:43 PM, Steve Mills via Cocoa-dev wrote: > > On Apr 29, 2020, at 15:36:23, Carl Hoefs via Cocoa-dev > wrote: >> >> When I issue NSTimer's +timerWithTimeInterval: method, I'm getting >> unexpected timer firing times (20X faster than expected). >> >> ∙ If I specify 1.

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Steve Mills via Cocoa-dev
On Apr 29, 2020, at 15:36:23, Carl Hoefs via Cocoa-dev wrote: > > When I issue NSTimer's +timerWithTimeInterval: method, I'm getting > unexpected timer firing times (20X faster than expected). > > ∙ If I specify 1.0 for the time interval, my method gets called 20 times/sec. > ∙ If I speci

Re: NSTimer +timerWithTimeInterval:

2020-04-29 Thread Alex Zavatone via Cocoa-dev
Are you ever removing your timers? Quit Xcode, reload the project and see if the same thing happens. > On Apr 29, 2020, at 3:36 PM, Carl Hoefs via Cocoa-dev > wrote: > > When I issue NSTimer's +timerWithTimeInterval: method, I'm getting > unexpected timer firing times (20X faster than e

NSTimer +timerWithTimeInterval:

2020-04-29 Thread Carl Hoefs via Cocoa-dev
When I issue NSTimer's +timerWithTimeInterval: method, I'm getting unexpected timer firing times (20X faster than expected). ∙ If I specify 1.0 for the time interval, my method gets called 20 times/sec. ∙ If I specify 20.0 for the time interval, my method gets called 1 time/sec. ∙ If I speci