All your GLOBAL are belong to us!
Eric White
10 posts
|
Yes, i know, sorry, but can you help a brother out with sending variables between UIviews? I have found bits and pieces of things here and there, but in the end nothing seems to work completely. Mostly because I should be programming my 6809 Coco not my iPhone. So, how do you make global variables that can be seen from anywhere (even from outer space, which I find myself quite often now in xcode?) or How do you pass simple values between UIViews? Thanks for all the fishes. |
Bill Dudney
372 posts
|
Hey Eric, Take off every Zig! So I can’t tell for sure from your post, but I assume that you have 2 UIViewControllers that are managing 2 UIViews and you want to pass your model object from the first UIViewController to the second. Best way to accomplish that is to have a ‘setModel:’ method on the second UIViewController that you call from the first UIViewControler just before the second UIViewController is pushed onto the nav stack. HTH Just sit back and let the planet dissolve around you… |
Eric White
10 posts
|
I took off every Zig, but then i get a
“NSString:Udon’tKnowWhatThe{@#}UrDoing” error… I looked for the
Which I have decided to have a t-shirt made of, but perhaps I neglected to mention in my earlier post, I work best with “copy, paste & hope” code techniques. Which I know can be annoying to the professional programmer crowd. You did you your super-mind-powers to see through my noobly-encoded query, for that I am impressed. Yes, I have two
I have read stories about the government controlled I think I just got pushed onto the nav stack again. |
Bill Dudney
372 posts
|
:) So you need to write a set of methods such as
one for each of the variables. Or if you want to take it up a notch you could define a model class - new file in Xcode choose Obj-C Class
and then in the .m file
And to graduate from ‘the only marginally geeky because you know weird video game translations and HGTTG’ you need to grok OO programming and Obj-C. The Kochan book is good for Obj-C and probably a bit of OO as well. Good Luck! |
Eric White
10 posts
|
Chapter 3 After a good round of iGolf, i have finally seen the light. Your suggestion on the book “Programming in Objective-C” by Stephen Kochan was a hole-in-one! Chapter 3 talks about Classes, Objects and Methods in a down to earthling kinda way that doesn’t expect the reader to know C or any other letter-languages. Very refreshing for us who don’t belong to the programmer class. |
Bill Dudney
372 posts
|
Hey Eric, Glad it helped, you have plenty chance to survive, make your time! |
Eric White
10 posts
|
One more thing… Just found this and found it kinda interesting and somewhat related to my original query… http://cocoawithlove.com/2008/11/singletons-appdelegates-and-top-level.html |
7 posts, 2 voices
