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

Newbie-Initialization Question


  • Subject: Newbie-Initialization Question
  • From: Michael Hanna <email@hidden>
  • Date: Sat, 15 Jun 2002 18:43:22 -0400

Hi I just joined this list..

I made a very simple Cocoa/IB program that takes a number in a text field and adds it to another number.

in Controller.h I initialized:

int tally;
int newValue;

the only place the compiler would let me initialize the ints was awakeFromNib:

- (void)awakeFromNib
{
[numberField setIntValue: 0];
[displayTotal setIntValue: 0];
newValue = 0;
tally = 0;
}
@end

Is there a different, more elegant place to initialize?

Michael
_______________________________________________
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.

  • Follow-Ups:
    • Re: Newbie-Initialization Question
      • From: Jeff LaMarche <email@hidden>
  • Prev by Date: Re: Protecting Software w/ Software License Keys...
  • Next by Date: Re: NSPopUpMenuItem question
  • Previous by thread: Re: Properly capitalizing a path
  • Next by thread: Re: Newbie-Initialization Question
  • Index(es):
    • Date
    • Thread