Hey guys. If worst comes to worst, you can always fix this yourself:
https://github.com/coronalabs/framework-widget
I mean, if the problem is a show stopper, grab the widget source, add it to your project, and then fix that function.
This may not be the proscribed way to do this, but I find it to work:
-
Download the zip of the entire widget lib.
-
Copy the folder ‘widgetLibrary’ to the root of your project.
-
Put the following code in a file called “widgetFix.lua” in the same folder as main.lua
– Override Corona’s core widget libraries with the files contained in this project’s subdirectory. – Argument “name” will be set to the name of the library being loaded by the require() function. local function onRequireWidgetLibrary(name) --print("Loading local widget library ", name ) return require(“widgetLibrary.” … name) end package.preload.widget = onRequireWidgetLibrary package.preload.widget_button = onRequireWidgetLibrary package.preload.widget_momentumScrolling = onRequireWidgetLibrary package.preload.widget_pickerWheel = onRequireWidgetLibrary package.preload.widget_progressView = onRequireWidgetLibrary package.preload.widget_scrollview = onRequireWidgetLibrary package.preload.widget_searchField = onRequireWidgetLibrary package.preload.widget_segmentedControl = onRequireWidgetLibrary package.preload.widget_spinner = onRequireWidgetLibrary package.preload.widget_stepper = onRequireWidgetLibrary package.preload.widget_slider = onRequireWidgetLibrary package.preload.widget_switch = onRequireWidgetLibrary package.preload.widget_tabbar = onRequireWidgetLibrary package.preload.widget_tableview = onRequireWidgetLibrary
-
In main.lua before any files from your project, require widgetFix.lua
require “widgetFix”
-
Use widget library as per the documentation.
The above code causes require “widget” statements to load your local code.