Widget 2.0 Can't get height of scrollview content

HI,

Am I missing something here?

In the old scrollView widget, the height of the content I was scrolling seemed to be automatically detected (i.e.: I didn’t have to specify).

Because the content of my scrollview is being created on the fly from a database I don’t actually know the height of it as it changes.

In the new scrollView widget 2.0 it seems to need a scrollHeight parameter, without which my content always pings back to its original position as soon as you release your finger.

Am I seriously going to have to work out the height of each set of content on the fly and pass this in to the scrollView widget? I have a lot of scrollviews in my app so this is going to be a major hassle. Calling content.height returns a 0.

Is there another way of me getting the height or telling the scrollView to automatically set the contentHeight attribute to be the height of the content I’m giving it?

If anyone from Corona can shed some light on this for me I’d really appreciate it.

Thanks,

Ian [import]uid: 123492 topic_id: 36448 reply_id: 336448[/import]

Hey keystagefun:

The next daily build (after 1038) resolves this issue. [import]uid: 84637 topic_id: 36448 reply_id: 144668[/import]

Thanks Danny. That’s good to know.

The most recent listed is 1038 so do I need to wait until tomorrow or after the weekend to get the next daily build?

Thanks,

Ian [import]uid: 123492 topic_id: 36448 reply_id: 144671[/import]

Hi,

I installed the latest Daily Build.

Now my scrollviews fly off horizontally whenever I tap them - they literally zoom off to the right with one tap.

Anyone have any idea what’s going on? Is this another bug or am I missing something?

And yes - I have the horizontalScrollingDisabled property set too true and the vertical one set to false.

Here’s my code:

 local content = params.content;  
 local px = params.px;  
 local py = params.py;  
 local maskFileName = params.maskFileName;  
 local w = params.w;  
 local h = params.h;  
 local layer = params.layer;  
  
 local widget = require "widget"  
 sv = widget.newScrollView{  
 width = w,  
 height = h,  
 maskFile = maskFileName,  
 horizontalScrollingDisabled = true,   
 verticalScrollingDisabled = false,   
 backgroundColor = {255,255,255,0},   
 scrollHeight = display.contentHeight  
 }  
 sv.isHitTestMasked = true;  
 sv.x = px;  
 sv.y = py;  
 sv:insert( content );  
 layer:insert( sv );  

If any of the guys from Corona or anyone else can shed some light on this that would be really helpful as I’m trying to get an update out and these problems with the new widget library are really delaying me.

Thanks,

Ian [import]uid: 123492 topic_id: 36448 reply_id: 145064[/import]

Hi.

This was a regression bug from another fix for the scrollView.

It has been fixed and the fix will be available in one of the next few daily builds.
Thanks [import]uid: 84637 topic_id: 36448 reply_id: 145076[/import]

Hey keystagefun:

The next daily build (after 1038) resolves this issue. [import]uid: 84637 topic_id: 36448 reply_id: 144668[/import]

Thanks Danny. That’s good to know.

The most recent listed is 1038 so do I need to wait until tomorrow or after the weekend to get the next daily build?

Thanks,

Ian [import]uid: 123492 topic_id: 36448 reply_id: 144671[/import]

Hi,

I installed the latest Daily Build.

Now my scrollviews fly off horizontally whenever I tap them - they literally zoom off to the right with one tap.

Anyone have any idea what’s going on? Is this another bug or am I missing something?

And yes - I have the horizontalScrollingDisabled property set too true and the vertical one set to false.

Here’s my code:

 local content = params.content;  
 local px = params.px;  
 local py = params.py;  
 local maskFileName = params.maskFileName;  
 local w = params.w;  
 local h = params.h;  
 local layer = params.layer;  
  
 local widget = require "widget"  
 sv = widget.newScrollView{  
 width = w,  
 height = h,  
 maskFile = maskFileName,  
 horizontalScrollingDisabled = true,   
 verticalScrollingDisabled = false,   
 backgroundColor = {255,255,255,0},   
 scrollHeight = display.contentHeight  
 }  
 sv.isHitTestMasked = true;  
 sv.x = px;  
 sv.y = py;  
 sv:insert( content );  
 layer:insert( sv );  

If any of the guys from Corona or anyone else can shed some light on this that would be really helpful as I’m trying to get an update out and these problems with the new widget library are really delaying me.

Thanks,

Ian [import]uid: 123492 topic_id: 36448 reply_id: 145064[/import]

Hi.

This was a regression bug from another fix for the scrollView.

It has been fixed and the fix will be available in one of the next few daily builds.
Thanks [import]uid: 84637 topic_id: 36448 reply_id: 145076[/import]

Hey keystagefun:

The next daily build (after 1038) resolves this issue. [import]uid: 84637 topic_id: 36448 reply_id: 144668[/import]

Thanks Danny. That’s good to know.

The most recent listed is 1038 so do I need to wait until tomorrow or after the weekend to get the next daily build?

Thanks,

Ian [import]uid: 123492 topic_id: 36448 reply_id: 144671[/import]

Hi,

I installed the latest Daily Build.

Now my scrollviews fly off horizontally whenever I tap them - they literally zoom off to the right with one tap.

Anyone have any idea what’s going on? Is this another bug or am I missing something?

And yes - I have the horizontalScrollingDisabled property set too true and the vertical one set to false.

Here’s my code:

 local content = params.content;  
 local px = params.px;  
 local py = params.py;  
 local maskFileName = params.maskFileName;  
 local w = params.w;  
 local h = params.h;  
 local layer = params.layer;  
  
 local widget = require "widget"  
 sv = widget.newScrollView{  
 width = w,  
 height = h,  
 maskFile = maskFileName,  
 horizontalScrollingDisabled = true,   
 verticalScrollingDisabled = false,   
 backgroundColor = {255,255,255,0},   
 scrollHeight = display.contentHeight  
 }  
 sv.isHitTestMasked = true;  
 sv.x = px;  
 sv.y = py;  
 sv:insert( content );  
 layer:insert( sv );  

If any of the guys from Corona or anyone else can shed some light on this that would be really helpful as I’m trying to get an update out and these problems with the new widget library are really delaying me.

Thanks,

Ian [import]uid: 123492 topic_id: 36448 reply_id: 145064[/import]

Hi.

This was a regression bug from another fix for the scrollView.

It has been fixed and the fix will be available in one of the next few daily builds.
Thanks [import]uid: 84637 topic_id: 36448 reply_id: 145076[/import]

Hey keystagefun:

The next daily build (after 1038) resolves this issue. [import]uid: 84637 topic_id: 36448 reply_id: 144668[/import]

Thanks Danny. That’s good to know.

The most recent listed is 1038 so do I need to wait until tomorrow or after the weekend to get the next daily build?

Thanks,

Ian [import]uid: 123492 topic_id: 36448 reply_id: 144671[/import]

Hi,

I installed the latest Daily Build.

Now my scrollviews fly off horizontally whenever I tap them - they literally zoom off to the right with one tap.

Anyone have any idea what’s going on? Is this another bug or am I missing something?

And yes - I have the horizontalScrollingDisabled property set too true and the vertical one set to false.

Here’s my code:

 local content = params.content;  
 local px = params.px;  
 local py = params.py;  
 local maskFileName = params.maskFileName;  
 local w = params.w;  
 local h = params.h;  
 local layer = params.layer;  
  
 local widget = require "widget"  
 sv = widget.newScrollView{  
 width = w,  
 height = h,  
 maskFile = maskFileName,  
 horizontalScrollingDisabled = true,   
 verticalScrollingDisabled = false,   
 backgroundColor = {255,255,255,0},   
 scrollHeight = display.contentHeight  
 }  
 sv.isHitTestMasked = true;  
 sv.x = px;  
 sv.y = py;  
 sv:insert( content );  
 layer:insert( sv );  

If any of the guys from Corona or anyone else can shed some light on this that would be really helpful as I’m trying to get an update out and these problems with the new widget library are really delaying me.

Thanks,

Ian [import]uid: 123492 topic_id: 36448 reply_id: 145064[/import]

Hi.

This was a regression bug from another fix for the scrollView.

It has been fixed and the fix will be available in one of the next few daily builds.
Thanks [import]uid: 84637 topic_id: 36448 reply_id: 145076[/import]