Global Variable in iOS like VB6

Hello,
I am a new in Xojo , come from VB6 and wanted to use to program iOS apps as a hobby.
Where I have some problems to understanding is :
In VB6 I could be a variable or array when the program starts assign
" Global xyz ( 10 ) as String "
and throughout the program to access it. How it works in iOS Xojo or how can I pass to the next view.
Thank you for a help determine which is a little something for most professionals .
Thanks Gerd

Create a module called “Globals”. In that module add the global property you want (yz(10) as String), with the scope “Public”.

And then access the variable from anywhere in your application!

i have done what you wrote, but i get this following error message
NilObjectExeption
do you know, what’s my error ?

We need more information. What line is throwing the nil object exception? Showing code will be helpful.

OK, in the event activated in the view, i must write this code

if ValueXYZ = nil then
ValueXYZ = new Value
end if

[quote=171617:@Gerd Hofmann]OK, in the event activated in the view, i must write this code

if ValueXYZ = nil then
ValueXYZ = new Value
end if[/quote]

What is ValueXYZ ? What kind of object ?

can i send you a printscreen from the declaration, it is not possible to upload a image to this forum

To post an image to the forum if you do not have a web space, upload it to your dropbox account (free to open at dropbox.com) and post the public URL.

https://drive.google.com/file/d/0B0h99F2CUB6JOFdJUWF1dnZuYVk/view?usp=sharing

You can’t use arrays as return values in computed properties (or shared computed properties). Instead you must create a method (or shared method):

Function KanalWert() As YourClass() Return your array here End