Widget 2.0 ScrollView broken

I also noticed this. You could use a variable scrollHeight.
Set scrollHeight to 0. Then for every item you put to scrollView you should add its height to scrollHeight. At the end you will have the height of scrollable content. [import]uid: 138389 topic_id: 36206 reply_id: 144337[/import]

But once its set to 0 there is no updating the scrollHeight as per the docs…

scrollWidth, scrollHeight (required)
Numbers. This is the width/height of the total scrollable content area. This cannot be changed after the ScrollView widget has been created. [import]uid: 58885 topic_id: 36206 reply_id: 144339[/import]

You guys are correct, if you don’t pass a scrollHeight/scrollWidth it should use the content height of the scrollView’s content.

I will get this rectified asap.

Thanks [import]uid: 84637 topic_id: 36206 reply_id: 144345[/import]

In the previous version of scrollView as in this version there was no way to change scrollViewHeight after it was created but now you can use @Kyle Coburn method to resolve this until @Danny will give an official solution.

If you will put this table.foreach(scrollView.\_view, print) in your code you will see in OUTPUT window that there are scrollHeight , scrollWidth variables.
You can change width/height of the total scrollable content area this way:
[lua]scrollView._view._scrollHeight = yourContentHeight
scrollView._view._scrollWidth = yourContentWidth
[/lua] [import]uid: 138389 topic_id: 36206 reply_id: 144349[/import]

Thanks vovasoft! That works until Danny gets it fixed (I bet he’s crazy busy). [import]uid: 58885 topic_id: 36206 reply_id: 144351[/import]

Hey vova, I resolved this with the following:

yourScrollView.\_view.\_isHorizontalScrollingDisabled = true  

A quick tip for things like this - use table.foreach(object, print) to inspect the contents of display objects. This allows you to explore all their available properties and find what you need. Hopefully the docs will be fully updated soon. [import]uid: 87138 topic_id: 36206 reply_id: 143798[/import]

It should be:

widget.newScrollView  
{  
 horizontalScrollDisabled = true, -- no "ing"  
}  

Whilst the link to the docs (at the daily build page is being fixed), you can get the latest correct documentation here: Docs Download

Thanks for bug report.

PS: I don’t recommend changing internal widget properties. It was designed purposely to abstract you from this to prevent users overriding methods/properties incorrectly and breaking things. [import]uid: 84637 topic_id: 36206 reply_id: 143801[/import]

@Kyle Coburn you helped me a lot. I never thought to apply table.foreach. Thank you very much.

I hope Corona will fix the bugs I mentioned above because it is also applicable to listView …. [import]uid: 138389 topic_id: 36206 reply_id: 143802[/import]

@Danny I think the bug I mentioned above was introduced in widget 2.0.
In this video http://youtu.be/Jm_cZEgHTkU you can see when the bottom limit is reached and I try to scroll down, the scollview is locked for some milliseconds and then it will scroll up by itself. [import]uid: 138389 topic_id: 36206 reply_id: 143804[/import]

@Vovasoft, it goes without saying that we will fix any bugs in the new widget library asap. Thanks for the videos, I will take a look [import]uid: 84637 topic_id: 36206 reply_id: 143808[/import]

Update: This issue has been fixed and the fix will be available in the next daily build. [import]uid: 84637 topic_id: 36206 reply_id: 144316[/import]

In the last widget.newScrollView if you didn’t specify a scrollHeight it would adjust the scroll height dynamically. This appears to be gone/not working now. I have a webservice that adds content in “info boxes” when it returns and adds this to a scrollView. When I create the scrollview I don’t know what the scrollable content size will be so I can’t accurately set the scrollHeight on creation. [import]uid: 58885 topic_id: 36206 reply_id: 144335[/import]

I also noticed this. You could use a variable scrollHeight.
Set scrollHeight to 0. Then for every item you put to scrollView you should add its height to scrollHeight. At the end you will have the height of scrollable content. [import]uid: 138389 topic_id: 36206 reply_id: 144337[/import]

But once its set to 0 there is no updating the scrollHeight as per the docs…

scrollWidth, scrollHeight (required)
Numbers. This is the width/height of the total scrollable content area. This cannot be changed after the ScrollView widget has been created. [import]uid: 58885 topic_id: 36206 reply_id: 144339[/import]

You guys are correct, if you don’t pass a scrollHeight/scrollWidth it should use the content height of the scrollView’s content.

I will get this rectified asap.

Thanks [import]uid: 84637 topic_id: 36206 reply_id: 144345[/import]

In the previous version of scrollView as in this version there was no way to change scrollViewHeight after it was created but now you can use @Kyle Coburn method to resolve this until @Danny will give an official solution.

If you will put this table.foreach(scrollView.\_view, print) in your code you will see in OUTPUT window that there are scrollHeight , scrollWidth variables.
You can change width/height of the total scrollable content area this way:
[lua]scrollView._view._scrollHeight = yourContentHeight
scrollView._view._scrollWidth = yourContentWidth
[/lua] [import]uid: 138389 topic_id: 36206 reply_id: 144349[/import]

Thanks vovasoft! That works until Danny gets it fixed (I bet he’s crazy busy). [import]uid: 58885 topic_id: 36206 reply_id: 144351[/import]

Hey vova, I resolved this with the following:

yourScrollView.\_view.\_isHorizontalScrollingDisabled = true  

A quick tip for things like this - use table.foreach(object, print) to inspect the contents of display objects. This allows you to explore all their available properties and find what you need. Hopefully the docs will be fully updated soon. [import]uid: 87138 topic_id: 36206 reply_id: 143798[/import]

It should be:

widget.newScrollView  
{  
 horizontalScrollDisabled = true, -- no "ing"  
}  

Whilst the link to the docs (at the daily build page is being fixed), you can get the latest correct documentation here: Docs Download

Thanks for bug report.

PS: I don’t recommend changing internal widget properties. It was designed purposely to abstract you from this to prevent users overriding methods/properties incorrectly and breaking things. [import]uid: 84637 topic_id: 36206 reply_id: 143801[/import]

@Kyle Coburn you helped me a lot. I never thought to apply table.foreach. Thank you very much.

I hope Corona will fix the bugs I mentioned above because it is also applicable to listView …. [import]uid: 138389 topic_id: 36206 reply_id: 143802[/import]