Small Bug when inserting newLine into a scrollView

The following wraning message keep showing when inserting newline into scrollview in the corona simulator output:

WARNING: line.width is deprecated. Use line.strokeWidth

local scrollView = widget.newScrollView { id = "something", backgroundColor = {0,0,0,0}, top = 0, left = 0, width = display.contentWidth, height = display.contentHeight, horizontalScrollDisabled = true, isBounceEnabled = false, listener = nil } local newLine = display.newLine( scrollView, 0 , 0, 100, 100 ) newLine:setStrokeColor( 0 ) newLine.strokeWidth = 10 scrollView:insert(newLine)

The final line “scrollView:insert(newLine)” is producing the warning message.
The program still runs fine for now but who knows in future. Can anyone please look into this?

Can you try not adding it to the scrollView when you create the line? i.e.

local newLine = display.newLine( 0 , 0, 100, 100 )

and see if that changes the behavior. You’re re-inserting it 3 lines down.

I tried removing and only run this:
 

local scrollView = widget.newScrollView { id = "something", backgroundColor = {0,0,0,0}, top = 0, left = 0, width = display.contentWidth, height = display.contentHeight, horizontalScrollDisabled = true, isBounceEnabled = false, listener = nil } local newLine = display.newLine( 0 , 0, 100, 100 ) newLine:setStrokeColor( 0 ) newLine.strokeWidth = 10 scrollView:insert(newLine)

Same thing happened, the final scrollView:insert(newLine) is causing the console to print the warning message.

I looked through the widget source code and I can’t find any where that this could possibly be happening. I went ahead and filed a bug report since I was able to easily duplicate it using your code. The Case ID is 46721.

That said, this will likely be a low priority for engineering. It seems to be a harmless warning message that can be easily ignored. But it’s in the system none-the-less.

Rob

Can you try not adding it to the scrollView when you create the line? i.e.

local newLine = display.newLine( 0 , 0, 100, 100 )

and see if that changes the behavior. You’re re-inserting it 3 lines down.

I tried removing and only run this:
 

local scrollView = widget.newScrollView { id = "something", backgroundColor = {0,0,0,0}, top = 0, left = 0, width = display.contentWidth, height = display.contentHeight, horizontalScrollDisabled = true, isBounceEnabled = false, listener = nil } local newLine = display.newLine( 0 , 0, 100, 100 ) newLine:setStrokeColor( 0 ) newLine.strokeWidth = 10 scrollView:insert(newLine)

Same thing happened, the final scrollView:insert(newLine) is causing the console to print the warning message.

I looked through the widget source code and I can’t find any where that this could possibly be happening. I went ahead and filed a bug report since I was able to easily duplicate it using your code. The Case ID is 46721.

That said, this will likely be a low priority for engineering. It seems to be a harmless warning message that can be easily ignored. But it’s in the system none-the-less.

Rob