newScrollView insert

It seems I have not choice but to try and solve this somehow.

This link describes the problem and the fix, but I need someone more skilled to either help me or guide me on how to do it, as my feeble attempts remain unsuccessful. I am able to edit the error but not to execute/use it.

https://forums.coronalabs.com/topic/68105-scrollview-speed-limit-and-scrolling-abruptly-stopping-when-adding-new-elements-within/?hl=%2Bscrollview+%2Bstops+%2Bscrolling

I would appreciate it a lot.

Anaqim

I finally found a working solution.

To help anyone else experiencing the same sudden scroll release stop when adding content to the view, here is how i did it.

Go to https://github.com/coronalabs/framework-widget and download the widget_scrollview.lua file from within the widgetLibrary folder.

Comment out or remove line 438, which looks like this: “self:scrollToPosition( { x = origX, y = origY, time = 0 } )

Save the lua file and copy it to the root of your project.

Scrolling should now work perfectly without changing anything in your own lua code.

I am not entirely sure why this works, but I am guessing that when the widget code looks foor lua files, it defaults to the root directory, and as such overrides the old file with the new edited one.

This problem/bug needs to be fixed by Corona with a simple deactivate option to accommodate all users and uses.

I’ve spent almost a week in frustration trying to work around and/or fix this, and frankly, official support could have been better.

Anaqim

UPDATE!!!

It seems this is not fixed after all and I am at loss what to do.

The above solution works with a win32 build but not in the simulator, nor on android.

Ideas?

I’m pretty sure the local copy of the lib is NOT getting used.  

Simply dropping it in the root folder isn’t enough.  The widget library preloads the first time it is required, and you have to do some specific things to get your local changes to be used.

I have outlined this before in another thread:

https://forums.coronalabs.com/topic/68339-categories-rows-on-tableview-doesnt-display-the-right-one/

PS - Please don’t vent on the staff.  I realize you may be frustrated, but lets be clear.  Their time is worth gold.  While your week spent has probably been educational.  Additionally, this feature may not be so universally useful to warrant adding it to the standard builds.

Finally, features are not changed based on posts in the forums except on rare occasions.  There are two ways to get changes into Corona:

  1. File a bug using the bug link.

  2. File a feature request.

PPS - Don’t forget.  Time is money for us all.  I and others try to help a little for free, but this goes against time we could spend making money.    I personally offer a paid service for situations exactly like this, where more help is required than I can afford to give for free.  

https://forums.coronalabs.com/topic/69420-hire-a-hitman-problem-solver-is-back/

This may seem simple “to fix” but we were going through it last night and there are lots of potential ramifications to removing that line.  No-one likes “fixes” breaking their existing code.

You really are better of customising the widgets library to your implementation as this will certainly be quicker.  I’d recommend you let Ed (aka roaminggamer) help you with this as unfortunately I am far too busy.

A horizontal tableView would be the answer and I am pushing for this, but again this is not going to be anytime soon.

Hi guys,

Thanks for taking the time to answer.

I am aware everyone has their own projects and I am not demanding answers, dont get me wrong.

@Ed,

Checked the link and did exactly what you wrote, yet I get an error which I am sure is something silly, but I havent figuered out.

How can this code…

local widget=require("widgetFix") 

and this…

local scroll=widget.newScrollView({ top=70, left=20, width=dcw-40, height=dch-70-70, hideBackground=true, horizontalScrollDisabled=true, hideScrollBar=true, isBounceEnabled=true, listener=scrollViewArtistsEvent}) dgSearchP1:insert(scroll) 

give this error message? 

attempt to index upvalue ‘widget’ (a boolean value)

I suspect the required library is not being loaded? Could it be a SDK vs Enterprise issue?

I am aware of your hitman service and if I ever get into the situation where I am truly stuck, I’ll take you up on it.

In the meantime, I appreciate hints and while I am new to all this, whenever I see the posibility to help someone else, I try to do so, since we’re all solving problems, only at different levels.

I’ll try to vent somewhere else in the future  :wink:

@Ed,

You sure that code snippet works?

Doesnt seem like it wants to load.

Got it working after studying 

https://docs.coronalabs.com/api/library/package/require.html

and realizing that it should look like this

require("widgetFix") local widget=require("widget")

instead of

local widget=require("widgetFix")

Thanks again Ed!

**UPDATED**

I use it all the time, but I have a slightly older local copy of the widget library.

Let me check and get back to you.

OOPS, saw your updated response.  Glad it worked for you.

-Ed

Thanks Ed, appreciate your help alot!