Re: cocoa-dev digest, Vol 2 #810 - 14 msgs
Re: cocoa-dev digest, Vol 2 #810 - 14 msgs
- Subject: Re: cocoa-dev digest, Vol 2 #810 - 14 msgs
- From: Mel Walker <email@hidden>
- Date: Thu, 20 Jun 2002 10:45:24 -0600
On Thursday, June 20, 2002, at 02:18 AM, cocoa-dev-
email@hidden wrote:
if([startdate minuteOfHour] < 10){
starttime = [[NSString alloc] initWithString: [NSString
stringWithFormat: @"%d:0%d",
[startdate hourOfDay], [startdate minuteOfHour]]];
}
With removal of the alloc/init of starttime in the init method.
If you have any suggestions on a better or more elegant way, please tell
me,
but yes it works perfectly!!!! Thanks a lot. A happy newbie...
Try using
starttime = [[NSString alloc] initWithFormat:@"%d:0%d", [startdate
hourOfDay], [startdate minuteOfHour]]
saves you a step, and an autorelease (from NSString stringWithFormat).
--
Mel Walker <email@hidden>
Software Engineer
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.