combining oF and UIkit

Hi,
I have now spent too many hours on something which might be dead simple.

I have managed to get a simple UI working, using the interfacebuilder.
I use the standard setup where the UI related code is in a UIViewController.m and .h file.

I want to access the values I receive from my UI objects in my TestApp, but can´t figure out how pass a value from the UIViewController.m code to the TestApp. I have tried declaring a variable in TestApp.h, but when I tried to use this variable within the IBAction code I am told that the variable isn´t declared within this scope.
If I instead try to declare the variable in the UIViewController.h file I get a duplicate symbol error with my variable.

Even if I move all the code from UIViewController to the TestApp, I still get an error that the variable is not declared within the scope of the IBAction part of the code.

Anybody with more luck doing similar things?

I think I need to use @property, but don´t really understand how to use it for other variables than those connected to the UI objects.

hc

Well,
after some more research online I realized that passing of variables seems to be one of the less pleasant qualities of obj-C.
I did however find a really simple way which works, which is not the best way to do it supposedly, basically using extern, explained here:
http://www.iphonedevsdk.com/forum/iphon-…-#post94113

Global variables are declared evil by “Dr. Touch” and he explains how to do it the proper way:
http://www.drobnik.com/touch/2009/05/th-…-variables/

hc