Hi Ansca,
I have been working with the updated (horizontal-scrolling) widget.newScrollView API, but for some reason I’ve yet to get the scrollToX method working properly. Anytime I call it, I get the following error message in the terminal:
Runtime error
attempt to call method 'scrollToX' (a nil value)
Depending at which point in my code I call the scrollToX method, the app either crashes in the simulator, or at the very least, it throws up the error message in the terminal, and the scrollView doesn’t scroll to the specified point. Below is the code I’m using to create the scrollView, and call the method. Hopefully this is just me doing something wrong, but I have a suspicion there might be a bug in the latest few daily builds. Thanks for your help!
[code]
drawerScroll = widget.newScrollView{
hideBackground=true,
left=225,
maskFile=“drawerMask.png”,
}
drawerGroup:insert(drawerScroll)
drawerScroll:scrollToX(-200) – this is the line that causes the terminal error message. If I remove it, the scrollView works just fine, but I’d really like to get the scrollToX method working!
[/code] [import]uid: 27636 topic_id: 20972 reply_id: 320972[/import]