Re: noob: Question about senders and views

2009-04-08 Thread Graham Cox
On 09/04/2009, at 7:32 AM, Eric E. Dolecki wrote: My views will all import a "model" class and then I can call methods in that class to do things Others pointed you to conceptual documentation about "MVC" (Model-View- Controller). Read it. The whole point of it is that you do NOT allow

Re: noob: Question about senders and views

2009-04-08 Thread Eric E. Dolecki
Sounds like I architected this poorly. My views will all import a "model" class and then I can call methods in that class to do things. Anything within my views I'll just handle there. I'll have to check out the singleton. Thanks! On Wed, Apr 8, 2009 at 4:37 PM, Brian Slick wrote: > I won't c

Re: noob: Question about senders and views

2009-04-08 Thread Brian Slick
I won't claim to have the concepts down, but I'll try to answer to the best of my understanding. Hopefully someone else will correct any mistakes that I make. FirstViewController and SecondViewController don't know anything about each other, because one did not create the other. So in ord

Re: noob: Question about senders and views

2009-04-08 Thread I. Savant
On Wed, Apr 8, 2009 at 3:00 PM, Eric E. Dolecki wrote: > I have the method being called now in SecondViewController, but suddenly my > UILabel there is (null). ?? > ... > A scope issue? No, a research issue. Steps to remedy: 1 - Read. The. Documentation. I was kind enough to point out exactly

Re: noob: Question about senders and views

2009-04-08 Thread Eric E. Dolecki
I have the method being called now in SecondViewController, but suddenly my UILabel there is (null). ?? // Called from the FirstViewController -(void)populateTextFieldWithString:(id)string { [commandText2 setText:string]; NSLog(@"populateTextFieldWithString: %@, %@", string, commandText2 ); //

Re: noob: Question about senders and views

2009-04-08 Thread I. Savant
On Wed, Apr 8, 2009 at 1:58 PM, Eric E. Dolecki wrote: > How can I make FirstViewController aware of the method in the second class? > I tried import and still got a warning. ... > [SecondViewController populateTextFieldWithString:@"hey there"]; ... > As soon as I call that method the app bombs...

Re: noob: Question about senders and views

2009-04-08 Thread Eric E. Dolecki
How can I make FirstViewController aware of the method in the second class? I tried import and still got a warning. FirstViewController.m #import "FirstViewController.h" #import "SecondViewController.h" -(IBAction)buttonDown:(id)sender { NSLog(@"id: %d", [sender tag] ); [SecondViewController

Re: noob: Question about senders and views

2009-04-08 Thread Craig Williams
On Apr 8, 2009, at 11:08 AM, Eric E. Dolecki wrote: I have a tab bar and it's driven by FirstViewController. I have a second view with it's own xib. I can have buttons there call into a "buttonPress" method I have in the FirstViewController. I am able to get the sender tag easily. NSLog(

noob: Question about senders and views

2009-04-08 Thread Eric E. Dolecki
I have a tab bar and it's driven by FirstViewController. I have a second view with it's own xib. I can have buttons there call into a "buttonPress" method I have in the FirstViewController. I am able to get the sender tag easily. NSLog(@"id: %d", [sender tag] ); However in the second xib I have