Newbie questions: init, new, standard dialogs
Newbie questions: init, new, standard dialogs
- Subject: Newbie questions: init, new, standard dialogs
- From: Matt Ronge <email@hidden>
- Date: Wed, 05 Dec 2001 21:04:35 -0600
Hi,
I wrote a very simple stack class that uses NSMutableArray. Anyway I have a
number of questions.
Stack.h
@interface Stack : NSObject {
NSMutableArray *theStack;
}
- (void) initialize;
- (void) dealloc;
- (void) push:(id) object;
- (id) pop;
- (int) count;
1. For initialization do I overload initialize or init? I have seen both
done, which works, or which is better?
2. How come when I have code like this:
Stack *newStack;
[newStack new];
It doesn't work? It says stack does not respond to new? Even [[newStack
alloc] init] doesn't work!?
3. Is there a standard input dialog? Something along the lines of an
Applescript like dialog to except input? I would of course only use such a
thing for debugging or quick hacks.
4. Is there a builtin stack class? Binary tree? Priority Queue? Any data
structures besides MutableArrays and MutableMatrices builtin?
5. Once a nib is compiled is it changed in someway so that someone with
Interface Builder can't open it up?
Thanks, sorry about all the questions,
--
Matt Ronge
President
Monkeybread Software
http://www.monkeybreadsoftware.com