NSInteger compare - Help Needed

2010-07-17 Thread Steve Wetzel
Hi all, I am new to Cocoa programming and am trying to do something that I thought was straightforward but not working. I am using the tag field of a button to tell me what button is pushed. This code does not work - (IBAction) numberPressed:(id)sender { NSLog(@"Sender tag is:%d", [se

Re: NSInteger compare - Help Needed

2010-07-18 Thread Steve Wetzel
t;? That may work. > > - Carter Allen > > On Jul 17, 2010, at 1:58 PM, Steve Wetzel wrote: > >> Hi all, >> >> I am new to Cocoa programming and am trying to do something that I thought >> was straightforward but not working. I am using the tag fie

Access object from another view

2010-09-21 Thread Steve Wetzel
How do I access and object on one view from another view? I cannot figure it out. I have two view controllers and two views. Lets call them viewController1 and viewController2 and view1 and view2. ViewController1 loads the second view by: [self.view addSubview:viewController2.view]; There i

Re: Access object from another view

2010-09-21 Thread Steve Wetzel
2010, at 11:57, Steve Wetzel wrote: > >> How do I access and object on one view from another view? I cannot figure >> it out. >> >> I have two view controllers and two views. Lets call them viewController1 >> and viewController2 and view1 and view2. Vie

Re: Access object from another view

2010-09-21 Thread Steve Wetzel
AGE- > Hash: SHA1 > > On 9/21/10 11:57 AM, Steve Wetzel wrote: >> How do I access and object on one view from another view? I cannot >> figure it out. >> >> I have two view controllers and two views. Lets call them >> viewController1 and viewControlle

Re: Access object from another view

2010-09-21 Thread Steve Wetzel
xt too I suppose. > > > Google Voice: (508) 656-0622 > Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki > http://blog.ericd.net > > > > On Tue, Sep 21, 2010 at 5:03 PM, Steve Wetzel wrote: > Thanks Everyone. > > I could not get

Re: Access object from another view

2010-09-21 Thread Steve Wetzel
, at Sep 21:6:03 PM, Quincey Morris wrote: > On Sep 21, 2010, at 14:03, Steve Wetzel wrote: > >> I could not get the >> >> [self.viewController1.label2.text >> >> or the >> >> [self view addSubview:viewController2.view]; >> >> to

Newbie Question: implementing a stack

2008-12-19 Thread Steve Wetzel
Hi All, I am new to this list and new to mac programming as well. I am working on implementing a stack as a category of NSMutableArray. I want this stack to be able to store objects. This is what I have so far: // // Stack.h // Stack implements a basic stack object in an NSMutableArr

Re: Newbie Question: implementing a stack

2008-12-19 Thread Steve Wetzel
On Dec 19, 2008, at Dec 19:6:31 PM, Ricky Sharp wrote: On Dec 19, 2008, at 1:22 PM, Steve Wetzel wrote: I am new to this list and new to mac programming as well. I am working on implementing a stack as a category of NSMutableArray. I want this stack to be able to store objects. This is

Re: Newbie Question: implementing a stack

2008-12-20 Thread Steve Wetzel
On Dec 20, 2008, at Dec 20:12:08 AM, Graham Cox wrote: On 20 Dec 2008, at 4:52 pm, Graham Cox wrote: On 20 Dec 2008, at 3:15 pm, Steve Wetzel wrote: Regarding memory management - does it make more sense to copy the object to be pushed from within the Stack object rather then copying

Re: Cocoa-dev Digest, Vol 5, Issue 2186

2008-12-21 Thread Steve Wetzel
You're very confused. When you assign something new to myObj, you're only affecting that one pointer. You don't affect anything else that has a reference to the original object. For example: NSString *str = @"hello"; [stack push:str]; str = @"world"; [stack push:str]; Your stack now contains @"h

[pool release] error

2008-12-26 Thread Steve Wetzel
Does anyone know why the follow code produces an error on [pool release]?. I get the following error : "*** -[NSDecimalNumber release]: message sent to deallocated instance 0x10c310". How am I overreleasing anything #import "Fraction.h" @implementation Fraction -(id)init { if(self =

Re: [pool release] error

2008-12-26 Thread Steve Wetzel
the documentation. Steve On Dec 26, 2008, at Dec 26:10:41 AM, Dave Carrigan wrote: On Dec 26, 2008, at 8:29 AM, Steve Wetzel wrote: -(void)setNumerator:(NSInteger)n { [numerator release]; numerator = [NSNumber numberWithInteger:n]; +numberWithInteger creates an autoreleased

Re: [pool release] error

2008-12-26 Thread Steve Wetzel
problems with how I am doing things. Thanks again, Steve On Dec 26, 2008, at Dec 26:11:13 AM, mmalc Crawford wrote: On Dec 26, 2008, at 8:29 AM, Steve Wetzel wrote: Does anyone know why the follow code produces an error on [pool release]?. I get the following error

Sizing text to fit into UITextView

2008-12-29 Thread Steve Wetzel
Is there any easy way to change the size of the font so a string will fit into UITextView? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev

Switching Views on the iPhone

2009-01-06 Thread Steve Wetzel
I am trying to switch views in a view based application. I have a button on the main view and in the ViewController code for that view I have the following: -(IBAction)settings:(id)sender { if(self.settingsViewController == nil) { SettingsViewController *settings = [[

Is there an iPhone mailing list?

2009-03-20 Thread Steve Wetzel
Hey, I have a UITouch question and I am wondering if there is a mail list specifically for the iPhone. Is there? Steve ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Conta