I downloaded the list class from the sample code, which works great. Now, I’d like to modify the example app so that there are two lists on screen instead of just one, and I’m no good in OO in lua.
The main.lua starts with declaring that List is a class, then there are ten functions which identify how the class operates and is initiated.
Finally, down at the bottom of the code, a list of items is created, which is then used to instantiate a class object:
myList = List({items=items})
I thought, well, I can create my own list:
nList = List({items=items})
and, yeah, it shows up on the screen right beside the original list, just like I want it to.
But the problem is that all events are directed at the original list, regardless of which list is touched.
I don’t want to post code, because its 300 lines of code and my contribution is small… I changed the png image width of the list background to 160px, and added just enough code to declare the second list with a different set of items. So I realize I’m asking a question and not really providing enough info.
But any ideas why the new list doesn’t get events?
Thanks,
Sean.
[import]uid: 4993 topic_id: 1497 reply_id: 301497[/import]