Re: iPhone: Accessing variable from another view controller

2009-08-21 Thread Luke the Hiesterman
On Aug 21, 2009, at 6:53 AM, Eric E. Dolecki wrote: However, how does one access class properties from one class to another (not using app delegate) - without making an instance of it - or do you need to do that? Looking for a singleton implementation. Well, properties are, like instance m

Re: iPhone: Accessing variable from another view controller

2009-08-21 Thread Luke the Hiesterman
On Aug 21, 2009, at 6:39 AM, Eric E. Dolecki wrote: When I trace out the class, it is indeed the app delegate and NOT the firstViewController. That's pretty strange. I was expecting to get at the actual FirstViewController class. What made you think that [[UIApplication sharedApplication]

Re: iPhone: Accessing variable from another view controller

2009-08-21 Thread Eric E. Dolecki
t;> Sent from the Verizon network using Mobile Email >>> >>> --Original Message-- >>> From: Luke the Hiesterman >>> To: "Eric E. Dolecki" >>> Cc: "cocoa-dev" >>> Date: Fri, Aug 21, 6:22 AM -0700 >>

Re: iPhone: Accessing variable from another view controller

2009-08-21 Thread Eric E. Dolecki
6:28 AM, edole...@gmail.com wrote: > > i caught that after sending. it still does not work >> >> -- >> Sent from the Verizon network using Mobile Email >> >> --Original Message-- >> From: Luke the Hiesterman >> To: "Eric E. Do

Re: iPhone: Accessing variable from another view controller

2009-08-21 Thread Luke the Hiesterman
l --Original Message-- From: Luke the Hiesterman To: "Eric E. Dolecki" Cc: "cocoa-dev" Date: Fri, Aug 21, 6:22 AM -0700 Subject: Re: iPhone: Accessing variable from another view controller On Aug 21, 2009, at 5:54 AM, Eric E. Dolecki wrote: FirstViewController *fvDeleg

Re: iPhone: Accessing variable from another view controller

2009-08-21 Thread edole...@gmail.com
i caught that after sending. it still does not work -- Sent from the Verizon network using Mobile Email --Original Message-- From: Luke the Hiesterman To: "Eric E. Dolecki" Cc: "cocoa-dev" Date: Fri, Aug 21, 6:22 AM -0700 Subject: Re: iPhone: Accessing v

Re: iPhone: Accessing variable from another view controller

2009-08-21 Thread Luke the Hiesterman
On Aug 21, 2009, at 5:54 AM, Eric E. Dolecki wrote: FirstViewController *fvDelegate = (FirstViewController *) [[UIApplication sharedApplication] delegate]; BOOL online = FirstViewController.availableNetwork; This should be fvDelegate.availableNetwork. You access the property on the instan

iPhone: Accessing variable from another view controller

2009-08-21 Thread Eric E. Dolecki
I have an application using a TabBar. The default view loaded and displayed (so this loads up first): FirstViewController: #import @interface FirstViewController : UIViewController { @public BOOL availableNetwork; } @property (readonly) BOOL availableNetwork; - (BOOL) isDataSourceAvailabl