native.newTextField showing in wrong place

Is anyone else noticing something funky with the daily builds (including the latest, 2014.2147) and native.newTextField? 

I have a registration page with two text fields, till this last week it was fine and worked great. Now, however, I notice that on simulator/Android all is well but on iPhone 4 (with iOS 7) the text fields are being drawn waaaay off. 

Attached is a screenshot that shows what I’m seeing. I have tried tweaking anchor points as well (no luck) but again this was all working post-graphics 2.0. Just fishing to see if anyone else has noticed similar behaviour.

Here is the code I use to create them:

 email = native.newTextField( 350, 220, 250, 70 ) email:addEventListener('userInput', onEmail) email.font = native.newFont(native.systemFont, 14) email.size = 14 email.anchorX = 0 email.anchorY = 0 barcodeNumber = native.newTextField( 350, 305, 250, 70 ) barcodeNumber:addEventListener('userInput', onBarcodeNumber) barcodeNumber.inputType = "number" barcodeNumber.font = native.newFont(native.systemFont, 14) barcodeNumber.size = 14 barcodeNumber.anchorX = 0 barcodeNumber.anchorY = 0 
  • Using storyboard I’ve placed this code on enterScene as well as createScene with no change in behaviour.

  • Tweaking or removing explicit anchors also doesn’t fix anything and in fact messes things up for Android/simulator as expected.

Any ideas?

Couple more notes, just confirmed I’m seeing the same on iPhone 5 (with latest iOS). 

Also forgot to mention in first post that the screenshot on the right (what I see on device) it actually shows NOTHING because the textfields are rendered so far to the right. I cut the coordinates down so I could at least verify that text fields were being drawn. 

The actual code for creating the rightmost screeny textfields is:

 email = native.newTextField( 250, 150, 250, 30 ) [Blah blah] barcodeNumber = native.newTextField( 250, 235, 250, 30 ) [Blah blah]

As you said, this seems to be a bug in the most previous versions on all iOS devices. It actually worked when I downgraded to version 2100. Thanks! :slight_smile:

Interesting discovery while I was dicking around with it… I tried out the NativeDisplayObject sample project and out of the box it worked perfectly.

 

Then I changed the sample’s config.lua file and doubled the width and height (from 320x480 to 640x960 like I have in my affected project) and that’s when things went crazy. Worked fine on simulator/Android but not on iOS, jumped to the right. Even more than if the anchor was defaulting to top left.

 

Can someone else change the width/height (to 640x960 for starters) on their projects and try to replicate?

Yes. I can see this as well when I change to 640x960. 

I went back to 2096 and repeated the test and the issue went away so you are absolutely right. This seems like a bug introduced post 2100 and affects the native.text when resolution is 640x960 etc. Good catch. Suggest submitting a bug report so the clock starts ticking. 

Bug submitted and a developer by the name of ‘Tom’ says it should be patched in the next daily build or so.

Booya, can launch next binary soon xD

Good news. Thanks for the update. Seems like CL is quite responsive to bugs affecting native objects.

No problem, just super glad they are turning it around so fast. Client will be overjoyed too, and I dreaded the idea of downgrading to 2100 to release an updated binary.

Couple more notes, just confirmed I’m seeing the same on iPhone 5 (with latest iOS). 

Also forgot to mention in first post that the screenshot on the right (what I see on device) it actually shows NOTHING because the textfields are rendered so far to the right. I cut the coordinates down so I could at least verify that text fields were being drawn. 

The actual code for creating the rightmost screeny textfields is:

 email = native.newTextField( 250, 150, 250, 30 ) [Blah blah] barcodeNumber = native.newTextField( 250, 235, 250, 30 ) [Blah blah]

As you said, this seems to be a bug in the most previous versions on all iOS devices. It actually worked when I downgraded to version 2100. Thanks! :slight_smile:

Interesting discovery while I was dicking around with it… I tried out the NativeDisplayObject sample project and out of the box it worked perfectly.

 

Then I changed the sample’s config.lua file and doubled the width and height (from 320x480 to 640x960 like I have in my affected project) and that’s when things went crazy. Worked fine on simulator/Android but not on iOS, jumped to the right. Even more than if the anchor was defaulting to top left.

 

Can someone else change the width/height (to 640x960 for starters) on their projects and try to replicate?

Yes. I can see this as well when I change to 640x960. 

I went back to 2096 and repeated the test and the issue went away so you are absolutely right. This seems like a bug introduced post 2100 and affects the native.text when resolution is 640x960 etc. Good catch. Suggest submitting a bug report so the clock starts ticking. 

Bug submitted and a developer by the name of ‘Tom’ says it should be patched in the next daily build or so.

Booya, can launch next binary soon xD

Good news. Thanks for the update. Seems like CL is quite responsive to bugs affecting native objects.

No problem, just super glad they are turning it around so fast. Client will be overjoyed too, and I dreaded the idea of downgrading to 2100 to release an updated binary.