Android Tutorial Setting value for a text label

Hi,

Sorry for the silly question.

I have created a layout with a single label called jbox.
I simply want to set the text of the label in the program but cant seem to do it.

My code ..

Sub Activity_Create(FirstTime As Boolean)
activity.LoadLayout("Layout1")
jbox.Text="test"

When I compile, it complains that I am using a varible without setting it?

Help!

Many thanks.

Jason
 

wize999

New Member
Licensed User
Longtime User
Thanks for your replies - all sorted now.

I wish there was a consolidated manual for this, its hard to find the right information when it is spread around so many different pages etc.

Cheers,

Jason
 

Andris

Active Member
Licensed User
Longtime User
I just had this same problem, and indeed defining the view (eg dim jbox as label) within Activity_Create solves it. However, I had already previously used the Generate Members tool, and the declaration already appeared in Global. Why was that declaration not relevant if it was already a Global declaration?
 
Top