• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Experimenting with Timers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Experimenting with Timers


  • Subject: Re: Experimenting with Timers
  • From: Isaac Sherman <email@hidden>
  • Date: Sun, 21 Oct 2001 21:40:37 -0400

on 10/21/01 8:46 AM, email@hidden wrote to me:

> Well, right off the bat, what is "CurrentTime"? Is it a class, a
> singleton instance of a class, or an ivar?

currentTime (was CurrentTime) is an IBOutlet, connected to an NSTextField.


on 10/21/01 8:30 AM, email@hidden wrote to me:

> I'd say you have to have 'self' as the target (assuming that
> UpdateCurrentTime: and ASet: are in the same object.) You definitely
> shouldn't have 'nil' as the target, or the timer will just send a
> message to nowhere every second, unless I'm mistaken.

Thanks! It works now. I knew it was something fairly obvious (my error log
was being added to at the rate of two messages per second, so I had a pretty
good idea where the problem was =).


on 10/21/01 3:27 PM, email@hidden wrote to me:

> 1. You don't need to put the (NSTimeInterval), (SEL), (id), etc.
> next to the arguments when you call the method.

Thank God!! I thought they were mandatory...

> 2. In Objective-C, the convention is to have variable and method
> names start with a lower case letter (e.g. updateCurrentTime
> instead of UpdateCurrentTime). Words starting with capital
> letters are usually class or type names, so your code below
> looks kind of strange because it looks like you're calling a
> whole bunch of class methods instead of methods on your instance
> variables.

This has been noted and, rather than awaiting attention, corrected. My
existing code is now ObjC compliant.


Thanks again...

--
Isaac Sherman
Charon Software (forthcoming)


  • Follow-Ups:
    • ObjC argument typing (was: Experimenting with Timers)
      • From: Ondra Cada <email@hidden>
References: 
 >Re: Experimenting with Timers (From: Brian Webster <email@hidden>)

  • Prev by Date: Re: CORBA with Mac OS X
  • Next by Date: Twin arrows
  • Previous by thread: Re: Experimenting with Timers
  • Next by thread: ObjC argument typing (was: Experimenting with Timers)
  • Index(es):
    • Date
    • Thread