Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Widgets 2.0 Open-Source
Started by Brent Sorrentino Apr 23 2013 12:33 PM

22 replies to this topic
widgets widget
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Brent Sorrentino

[GLOBAL: userInfoPane.html]
Brent Sorrentino
  • Corona Staff
  • 4,665 posts
  • Jedi

Hello Corona SDK developers,

 

As promised, we have officially open-sourced Widgets 2.0. While the core library handles most needs, we understand that many developers want to tinker "under the hood" or build in functionality that is customized to a very specific behavior. The decision to open-source the widgets library was made with that intent in mind.

 

Note that the core widgets library will continue to receive updates and bug fixes. However, if you wish to inspect and modify the code, you may now download the necessary files from our GitHub repository:

 

https://github.com/coronalabs/

 

In this repository, you will find two libraries: framework-widgets and framework-widgets-sample. Please read the corresponding "README" file in each directory for usage details and other information.



[TOPIC: post.html]
#2

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Pro
  • PipPipPipPipPipPip
  • 2,768 posts
  • Jedi

Brent, thanks for this post. I apologize for the ignorant question that follows.

 

If I have no interest in inspecting the widgets code and improving them myself will I be ok to simply download the latest daily build and carry on as before? In other words, if I only wish to use the Corona supplied version of the widget 2.0 library, will it still be included in the Daily builds? I am hoping not to have to chase the latest & greatest out of github all the time.

 

Additionally, there are bunch of widget related bugs out there being discussed by fellow developers and Corona Labs staff. Now that the source is out there, will Coronal Labs continue to remain committed to those bug fixes?

 

Thanks for your clarification. 



[TOPIC: post.html]
#3

Brent Sorrentino

[GLOBAL: userInfoPane.html]
Brent Sorrentino
  • Corona Staff
  • 4,665 posts
  • Jedi

Hi @ksan,

 

That's not an ignorant question at all. :) Certainly, we'll continue to build upon the widgets core library, investigate/fix bugs, and add various improvements. The open sourcing is mainly intended for users who want to customize widgets at the deepest level for a specific functionality, or need a certain fix immediately.

 

Brent



[TOPIC: post.html]
#4

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Pro
  • PipPipPipPipPipPip
  • 2,768 posts
  • Jedi

Hi Brent, 

 

This is wonderful news! Thanks much for this confirmation. I look forward to seeing prompt resolutions to the current crop of issues with this library that has been keeping you busy. Thanks for all the hard work by the Corona Labs team. 

 

Cheers,

Kerem



[TOPIC: post.html]
#5

roboward

[GLOBAL: userInfoPane.html]
roboward
  • Pro
  • PipPipPip
  • 44 posts
  • Advanced Member

That's great. Anyone up to making scrollView work in both directions at the same time? (Diagonal flicking/dragging). 



[TOPIC: post.html]
#6

brad.herman

[GLOBAL: userInfoPane.html]
brad.herman
  • Pro
  • PipPipPipPipPipPip
  • 154 posts
  • Jedi

Thanks for getting this out!



[TOPIC: post.html]
#7

OwenYang

[GLOBAL: userInfoPane.html]
OwenYang
  • Starter
  • PipPipPipPipPipPip
  • 161 posts
  • Jedi

It has so many bugs.....

the more i transfer from Widget 1.0 to 2.0

,more bugs i got........................

 

when it's going to be stable?

i can't publish my app for long time .....especially now it 's almost 5/1

 

i can't use old one (build 993) to publish in iOS.

 

it's one immature bad widget....i can't truest it . 

also i have reported some bugs.

the more i use , more bug i found......

can u fix it and make it stable?

when u wanna do one "BIG" change , please make sure it's good.

Also u enforce us to change , it's not good action.

takes lots time to change "ALL" my apps.

 

and got bug bug bug........upset

 

PLZ, don't do that again OKAY? serious

Owen



[TOPIC: post.html]
#8

Brent Sorrentino

[GLOBAL: userInfoPane.html]
Brent Sorrentino
  • Corona Staff
  • 4,665 posts
  • Jedi

Hi Owen,

 

We realize there were (and still are) some lingering bugs with Widgets 2.0 and we've been working almost every day to fix them. Even when we fix a bug, some issues remain on various devices and/or with "uncommon" usage of widgets. It's impossible for us to predict each and every use of widgets and how they will perform if, for example, you place 600 display objects into a TableView and run it on an older Android device.

 

As for the bugs, in my investigation of some of these cases, they are not actually "bugs" but instead user error in converting from 1.0 to 2.0. Many parameters changed, which is why the Migration Guide was created: http://docs.coronalabs.com/api/library/widget/migration.html.

 

Finally, we are not enforcing that you change to anything. You now have three choices:

  1. Use Widgets 2.0 "stock" as we provide it
  2. Use Widgets 2.0 open-sourced and implement the low-level specific functionality you need
  3. Use Widgets 1.0, also open-sourced (it has been for several weeks): https://github.com/coronalabs/widget-v1

 

So in summary, although there are still some bugs to work out, most people are pleased with the performance and flexibility of Widgets 2.0 in comparison to 1.0. But as I said, you are free to use 1.0 if you want... drop the files into your project and code just as you did before 2.0.

 

Sincerely,

Brent Sorrentino



[TOPIC: post.html]
#9

sunmils

[GLOBAL: userInfoPane.html]
sunmils
  • Pro
  • PipPipPipPipPipPip
  • 142 posts
  • Jedi

Is it intended soon to add a reRender function for the hole visible tableView? Like this:

 

local list — the tableView
local flag

local function buttonHandler(event) -–toolBarButton Handler
  flag = true
  list.reRender
end

local function onRowRender(event)
  if flag then
    -— put something new in the row
  end
end


[TOPIC: post.html]
#10

disdanes

[GLOBAL: userInfoPane.html]
disdanes
  • Starter
  • PipPip
  • 12 posts
  • Member

Corona Staff,

 

Thank you immensely for open sourcing the Widget 2.0 library!

 

I am running into an interesting scenario when trying to use the libraries from github vs. the built-in corona widget libraries. I am using the frameworks-widget-sample for testing changes.

 

When I have this directory structure:

21bgRGE.pngI seem to have no problems and whatever overrides I make to the widgets work.

 

But when I do this:

um7Rdb1.png

and then in the code use:

local widget = require( "widgets.widgetLibrary.widget" )

it defaults to using the Corona built-in widget library and none of my widget overrides work.

 

Now I can use the first setup, but for large projects I feel like this tends to crowd the directory structure. Does anyone have any experience with the problem and know a way to pack the widgetLibrary into a sub directory ? 

 

Thanks!

-Justin Lindsey



[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Corona Staff
  • 10,317 posts
  • Jedi

When I was testing out some things using the open source library. I have something like this:

-rwxr-xr-x   1 rmiracle  staff    339 May 19 20:59 config.lua
drwxr-xr-x   5 rmiracle  staff    170 May 19 21:10 images
-rw-r--r--   1 rmiracle  staff   2421 Jun 12 21:58 main.lua
drwxr-xr-x  16 rmiracle  staff    544 May 20 21:05 widgetLibrary
-rwxr-xr-x@  1 rmiracle  staff  16388 May 18 04:14 widgetx.lua

 

I move the widget.lua out of that folder and into the folder with my main.lua (and renamed it widgetx.lua).

 

That way my code can still do:

 

local widget = require("widgetx")

 

or

 

local widget = require("widget")

 

and not have to mess around with my requires other than changing the file name.  Though it seems if you left the files where they are, you should:

 

local widget = require("widgetLibrary.widget")



[TOPIC: post.html]
#12

mobilefun4me

[GLOBAL: userInfoPane.html]
mobilefun4me
  • Starter
  • PipPipPip
  • 48 posts
  • Advanced Member

I would like to follow this forum!   



[TOPIC: post.html]
#13

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Corona Staff
  • 10,317 posts
  • Jedi

Well now you're following this particular topic.  If you want to follow the whole widgets forum, you can click on "Widgets" in the breadcrumbs at the top and there should be a "Follow this forum" button and then you will be notified whenever someone posts to the widget forum.



[TOPIC: post.html]
#14

disdanes

[GLOBAL: userInfoPane.html]
disdanes
  • Starter
  • PipPip
  • 12 posts
  • Member

Reposting this here in hopes that someone will see it easier:

Corona Team,

 

I downloaded and installed the latest public release to start the migration over to the Graphics 2.0 style of doing things. 

 

I ran into some problems with the Widgets 2.0 library.

https://github.com/coronalabs/framework-widgets-legacy/blob/master/widgetLibrary/widget_button.lua#L1373 causes Corona to fail because it uses the legacy setReferencePoint functions that are now deprecated.  

 

Are you guys planning on updating the Widgets 2.0 framework on github with the new Graphics 2.0 changes ?

 

Thanks,

-Justin Lindsey



[TOPIC: post.html]
#15

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Corona Staff
  • 10,317 posts
  • Jedi

I think this question was asked on another subforum-topic.  Public build 2076 has the updated widgets for Graphics 2.0.  We have not had a chance to  update the github repository yet. I've reminded the engineers.

 

Rob



[TOPIC: post.html]
#16

Richard17

[GLOBAL: userInfoPane.html]
Richard17
  • Basic
  • PipPipPipPipPipPip
  • 67 posts
  • Jedi

When are you going to update the GitHub  for this ?

 

Even after the last round of "fixes" you released, there are still some serious bugs. I thought "ow well" I will just have to fix them myself, but latest version is not here

 

 

I think this question was asked on another subforum-topic.  Public build 2076 has the updated widgets for Graphics 2.0.  We have not had a chance to  update the github repository yet. I've reminded the engineers.

 

Rob



[TOPIC: post.html]
#17

dgaedcke

[GLOBAL: userInfoPane.html]
dgaedcke
  • Pro
  • PipPipPipPipPipPip
  • 264 posts
  • Jedi

Yes please.....we need the latest on github so we fully understand what we're overriding....

 

The scrollView "bounce" effect is not calling the listener so my placement/movement of native text fields gets totally messed up when the bounce happens.....

 

Has anyone else solved this yet???

 

Edit:

I should also mention that the scrollToPosition() method does not seem to call the listener either.....if you guys are fixing this, please fix both callbacks....



[TOPIC: post.html]
#18

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Corona Staff
  • 10,317 posts
  • Jedi

Still working on it.

 

Rob



[TOPIC: post.html]
#19

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Corona Staff
  • 10,317 posts
  • Jedi

We are working on it.



[TOPIC: post.html]
#20

Richard17

[GLOBAL: userInfoPane.html]
Richard17
  • Basic
  • PipPipPipPipPipPip
  • 67 posts
  • Jedi

We are working on it.

 

Please please please can you update the github copy of the widgets please.

 

If not, can you please explain why it is so difficult to do this ?



[TOPIC: post.html]
#21

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Pro
  • PipPipPipPipPipPip
  • 2,768 posts
  • Jedi

I see that the code on GitHub has now been updated. Thanks Alex!



[TOPIC: post.html]
#22

primoz.cerar

[GLOBAL: userInfoPane.html]
primoz.cerar
  • Starter
  • PipPipPipPipPipPip
  • 447 posts
  • Jedi

May be time for another update with the recent fixes.



[TOPIC: post.html]
#23

rshanlon

[GLOBAL: userInfoPane.html]
rshanlon
  • Starter
  • PipPipPipPipPipPip
  • 98 posts
  • Jedi

I'm using this local widget = require("widgetLibrary.widget")

 

I've placed widgetLibrary in the folder with main.lua

 

I get nil value errors (Attempt to perform arithmetic on field '_oldAnchorX').  After I remove the widgetLibrary and just use local widget = require("widget")    The widgets show up but without any of the fancy look - it's just plain jane graphics.

 

What am I doing wrong?




[topic_controls]
[/topic_controls]



Also tagged with one or more of these keywords: widgets, widget