Need quick help on easy(?) problem please.

Malky

Active Member
Licensed User
Longtime User
Hi I have my data no downloaded into a db on my phone and get the scrollview displaying ok, but I need to add a 'Menu' option at the top of the list to return.
The next following scrollviews will require a 'Menu' and 'Back' option, so I need this working first.

I tried adding the required panel before the database loop kicks in to populate the scrollview, but I am getting a 'not initialised' error and I cannot see where?

Please help as I've looked at this all day. (File attached)

Malky
 

Attachments

  • malkscroll.zip
    17.5 KB · Views: 228

Malky

Active Member
Licensed User
Longtime User
Hi Erel, basically it all works, but in the FillAreaScrollview routine, I try to insert a row with 'Menu' in it, before the list of data from the database is added inside the for loop. This works ok, but when I click on the menu option, I get the 'Not Initialized' error.
The items in the for loop that have been added work ok when clicked and give the correct result.

I may consider just adding a panel above the scrollview instead and use a button or something to return to the Menu screen?

Cheers,

Malky
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
I had a look at your project.
Unfortunately I can't test it the program hangs in line 250
req.InitializePost2("http://....

Looking in the FillAreaScrollView routine I see that you are adding 1 Label in the first row.
But in the following rows you add 3 Labels !
Then in pnlArea_Click you try to get
lbl = CurrentPanel.GetView(1)
there is no view with index 1 in row 1 !

You must either :
- In FillAreaScrollView add a dummy Label1 in the first row and perhaps also a dummy Label3 or
- in pnlArea_Click treat the first row differently.

Best regards.
 
Upvote 0

Malky

Active Member
Licensed User
Longtime User
Hi Guys, thanks for the input. Can't understand how the web call hangs though? It's been tested so many times without fail?

I get your point Klaus about the differing number of labels, but as I have another 2 or 3 scrollviews to create after getting this one to work, I may change tact and save the hassle and coding in the click event(s)?

I came across your TabHostScrollview example 5 minutes ago and may choose that route, just adding the menu (and possible other options) at the top in a separate tab bar and let the lists do their stuff?

Many thanks again,

Malky
 
Upvote 0
Top