In various scenes of my app, I’ve a segmentedControl. In Corona Emulator I don’t have any problem but when I run my app in my tablet (Android 4.0.4) it show a error message when try to create the segmentedControl. The error ocurrs in widget code, check the next lines (.
-- Create the labels local label if \_widget.isSeven() then label = display.newText( segmentedControl, segments[i], 0, 0, opt.labelFont, opt.labelSize ) if view.\_segmentNumber == i or opt.defaultSegment == i then label:setFillColor( unpack( view.\_labelColor.over ) ) else label:setFillColor( unpack( view.\_labelColor.default ) ) end else label = display.newEmbossedText( segmentedControl, segments[i], 0, 0, opt.labelFont, opt.labelSize ) label:setFillColor( unpack( whiteColor ) ) end
The error ocurrs in “else” part of isSeven control structure when it execute “setFillColor” method to the embossedText.
The error message is “attempt to call method ‘setFillColor’ (a nil value)”.
I’ve observed that the same error occurs in others parts of widget, ever when setFillColor is executed in a embossedText object.
With the code of widget I can solve replacing “setFillColor” with “setTextColor” but I don’t understand why occur this errors.
With the G2.0 builds we changed the text objects to use setFillColor() instead of setTextColor(). These should not be giving you an error. Since you are looking at the widget source, are you using the widgets as shipped with Corona or the downloaded version from GitHub? If you’re using the downloaded version do you have the latest version?
I can’t really open bugs for you. You have the test case and the setup information the bug form needs. When I contact engineering, I can get them to look at things, but it doesn’t generate a trackable bug. While I believe this may be addressed in the next batch of widget fixes, just to make sure it stays on the radar, can you file a bug report and when you get the email confirmation, post the bugID back to this thread?
With the G2.0 builds we changed the text objects to use setFillColor() instead of setTextColor(). These should not be giving you an error. Since you are looking at the widget source, are you using the widgets as shipped with Corona or the downloaded version from GitHub? If you’re using the downloaded version do you have the latest version?
I can’t really open bugs for you. You have the test case and the setup information the bug form needs. When I contact engineering, I can get them to look at things, but it doesn’t generate a trackable bug. While I believe this may be addressed in the next batch of widget fixes, just to make sure it stays on the radar, can you file a bug report and when you get the email confirmation, post the bugID back to this thread?