• 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: NSDate Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDate Question


  • Subject: Re: NSDate Question
  • From: Chris Suter <email@hidden>
  • Date: Fri, 8 Dec 2006 14:25:18 +1100

From the code you've sent, it looks like myDate is being autoreleased.

- Chris

On 08/12/2006, at 2:22 PM, Matt wrote:

I'm trying to use NSDate as a simple way to keep up a Last Viewed status item for a simple app I'm playing with. Here's the bit of code roughly put:

The only thing I am doing here is to create a date when I init this controller (in this case it's in the actual controller, I was trying this way because I was having issues in my app). There is a single button just to print out the date stored when clicked. I get garbage.

The date prints fine in the init method but I get stuff like "21397505" when you click the button. This is driving me crazy because I don't see why in the world this code wouldn't work.


- (id) init { self = [super init]; if (self != nil) { myDate = [NSDate date]; NSLog(@"%@", myDate); } return self; }

-(IBAction)buttonSetsDate:(id)sender {
	NSLog(@"%@", myDate);
}



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
systems.com


This email sent to email@hidden





Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >NSDate Question (From: Matt <email@hidden>)

  • Prev by Date: NSDate Question
  • Next by Date: Re: NSDate Question
  • Previous by thread: NSDate Question
  • Next by thread: Re: NSDate Question
  • Index(es):
    • Date
    • Thread