Cannot access top and left variables in slider

I have the weirdest behaviour of a Corona slider widget. It is defined as

[lua]
local slider = widget.newSlider
{
    top = 100,
    left = 100,
    anchorX = 0,
    anchorY = 0,
    width = 200,
    value = 1
}
[/lua]
The slider is correctly added to the point (100, 100). However, if I check the top value it will give me nil.
I tried to change the position of the slider by using slider.top = 300 which should move the slider so that it is located at (100, 300).
The slider is however still shown at (100, 100), but now slider.top returns 300.
The same thing applies to slider.left, but slider.width seems to work fine. Why can’t I access the top and left properties of the widget?

The attributes passed to the widget are not really the attributes for the object.  In other words, top and left are just initializers.  Once it’s created you will position it using .x and .y which represent the center of the rectangle occupied by the slider.   

Since top and left are not really part of the object, when you first access it, they will be nil. Once you set it, it will be set for the future but those attributes are not used.

Rob

Thank you for your quick answer!

The attributes passed to the widget are not really the attributes for the object.  In other words, top and left are just initializers.  Once it’s created you will position it using .x and .y which represent the center of the rectangle occupied by the slider.   

Since top and left are not really part of the object, when you first access it, they will be nil. Once you set it, it will be set for the future but those attributes are not used.

Rob

Thank you for your quick answer!