Bug with Recent Builds and GIT framework-widget code for widget.newButton (error _oldAnchorX)

This affects both the public release and current daily builds.

There seems to be an issue (probably an update to the Git repository is needed).

If you use the repository included with the build things work as expected however if you use the code in the repository you get the following error.

Attempt to perform arithmetic on field ‘_oldAnchorX’ (a nil value)

easy to test with the following code (from the included doco) - you can swap between 

local widget = require ("widget ")  and  require(“widgetLibrary.widget”)

local widget = require( "widget" ) -- Function to handle button events local function handleButtonEvent( event ) if ( "ended" == event.phase ) then print( "Button was pressed and released" ) end end -- Create the widget local button1 = widget.newButton { left = 100, top = 200, id = "button1", label = "Default", onEvent = handleButtonEvent }  

 

Follow up - now using 2013.2114 build

If you can call the Button with the internal code successfully then occasionally in other scenes, the other buttons will call without an issue.

Weird but workaround is fine… 

Follow up - now using 2013.2114 build

If you can call the Button with the internal code successfully then occasionally in other scenes, the other buttons will call without an issue.

Weird but workaround is fine…