This one has got me.
Looking at the screen shot, you have 3 controls to look at. Everything except for the native.newTextField are created in scene:create. The newTextField is created in scene:show [did] to handle the gotoScene:slideLeft that brings this on the screen. If the newTextField isn’t created, the display.newRoundedRect that shows on the screen on the bottomish-right appears where the newTextField is, and is actually the background for the editField. I have the editField being built in the :Show as it doesnt slide on. As soon as it (the editField) is created, the roundedRect moves to the current spot on the screen.
To see if something could be changing the x and y, I attached an event listener to grab a tap and then display x and y. when tapped, it gives the same x and y as the editField. (in the event listener, I printed the x and y for both controls) When I tap the submit button (which is just a newImageRect with its own tap event listener) the x is the same as both the editField and the rounded rect, and the y is larger than the y of the roundedRect that is obviously below it. I’m using the same code on the previous screen (a signon screen) that has two native.newTextFields, both with their own newRoundedRects, that if the back arrow on the top left of this screen is tapped, and gotoScene: slideRight is called, they stay in their proper positions. anchorX and anchorY are set to .5 for all controls (even though it appears that the top-left of the roundedRect is centered on the editField). The only displayGroup I’ve used explicitly is the self.view, though I am using a variation of the widget.newTextField in widget-extras from the business sample. I’m controlling the roundedRect directly so that I can dynamically change the color of the stroke to show an error or invalid entry.
any thoughts?
thanks in advanced