NewButton WARNING: Attempting to set property(text) with nil

When ever I click on a new button widget the subject message is shown in the console.

I thought it might be an early release ‘bug’ but it still occurs on latest free download.

No major problem (i hope) but just wondering what have I missed/done incorrectly to cause the warnings.

Here is the button code

backButton = widget.newButton
{
   left = 10,
  – width=toolBarHeight*0.99,
  height=navBarHeight*0.70,
  width=navBarHeight,
   top = NavBar.y+ navBarHeight*0.15,
   id=1,
   defaultFile =“Images/backbtn.png”,
   overFile=“Images/backbtn over.png”,
   fontSize=10,–click message size
   labelAlign=right,
   onEvent = onButtonEvent
}

local function onButtonEvent( event )
   local phase = event.phase
 
   local target = event.target
      if ( “began” == phase ) then
     
            if  (2 == target.id )  then
                 target:setLabel( "Settings                         " )  --set a new label
          elseif (3 == target.id )  then
                 target:setLabel( "Download                               " )  --set a new label
         elseif (1 == target.id )  then
        end
   elseif ( “ended” == phase ) then
      target:setLabel( target.baseLabel )  --reset the label
      if (1 == target.id )  then
              GoToDashboard()
      end    
      if (2 == target.id )  then
              GoToSettings()
      end    
   end
   return  
end
 

Ok found it ,

By typing up tyhe problem  and posting it here I suddenly recognized what was causing the message

it is the  code

target:setLabel( target.baseLabel )  --reset the label

Sorry…

Ok found it ,

By typing up tyhe problem  and posting it here I suddenly recognized what was causing the message

it is the  code

target:setLabel( target.baseLabel )  --reset the label

Sorry…