Native Text Field not playing nice with tabview/director/tableview

Not sure what’s going on. I know that native text fields cannot be put into a display group and will always be above any display group. That’s fine. According to the documentation, I should still be able to manipulate the x/y/isvisible values and should be able to textField:removeSelf(). None of the aforementioned solutions work.

I have a table view which is being searched, and when someone leaves the page, or when someone clicks a list item, I want the text field to disappear. I figured adding this code to the transition would work:

transition.to(titleField, {time=400, y=titleField.y-1850})  

On the first couple passes, nothing happens, then the text field goes up a little bit, but reveals yet another text field underneath it. (I have checked, there is only one call to create the field and it’s not inside any loop or function.

using

titleField.isVisible=false  

or

titleField:removeSelf()  

Does nothing
any advice?
[import]uid: 77043 topic_id: 36262 reply_id: 336262[/import]

Are you using Storyboard? Are you switching scenes? It’s possible that you’re not removing the textfields when you leave the scene and when you come back you create new ones.

[import]uid: 199310 topic_id: 36262 reply_id: 144066[/import]

Regarding the issue with textFields not transitioning properly, that’s a known bug I assume as I reported it last year but it hasn’t been fixed yet. What I am currently doing to transition textFields is load in a fake textfield image and delete the real one, then just transition the image instead. It’s a messy workaround but does the trick. Btw the bug report id is #15926 [import]uid: 14018 topic_id: 36262 reply_id: 144074[/import]

I’m using director, not storyboard. Also, even when I remain within the same page, I can’t kill the native text field.

(I tried removing it once the entry has been made, but nothing happens.)

The duplicate appears when I try to move the original native text field. [import]uid: 77043 topic_id: 36262 reply_id: 144081[/import]

Mitaten, thanks for pointing out the bug submission. My issue is that I can’t even kill the original field. If I could do that, I’d be fine. [import]uid: 77043 topic_id: 36262 reply_id: 144084[/import]

How do you create the field? Perhaps it’s a reference issue? Got some code to paste? [import]uid: 14018 topic_id: 36262 reply_id: 144185[/import]

sure, here’s how I create my field:

  
local textFont = native.newFont( native.systemFont )  
local currentTop = sbHeight+tbHeight+shadow.contentHeight+10  
local padding = 10  
  
titleField = native.newTextField( padding, 5, display.contentWidth-(padding\*14), 80 )  
titleField.font = textFont  
titleField.size = 50  

Again, this is outside any function or for loop, so it should only be called once.

For the time being I’m using a rigged faux text field, but I’m not crazy about it. Artificial keyboard and the textfield itself feel…cheap? compared to the feel of the native textfield/keyboard.

I guess I could dress up my faux field to make it act like the native field, but it’s a lot of work to do something that should be easy. [import]uid: 77043 topic_id: 36262 reply_id: 144195[/import]

Are you using Storyboard? Are you switching scenes? It’s possible that you’re not removing the textfields when you leave the scene and when you come back you create new ones.

[import]uid: 199310 topic_id: 36262 reply_id: 144066[/import]

Regarding the issue with textFields not transitioning properly, that’s a known bug I assume as I reported it last year but it hasn’t been fixed yet. What I am currently doing to transition textFields is load in a fake textfield image and delete the real one, then just transition the image instead. It’s a messy workaround but does the trick. Btw the bug report id is #15926 [import]uid: 14018 topic_id: 36262 reply_id: 144074[/import]

I’m using director, not storyboard. Also, even when I remain within the same page, I can’t kill the native text field.

(I tried removing it once the entry has been made, but nothing happens.)

The duplicate appears when I try to move the original native text field. [import]uid: 77043 topic_id: 36262 reply_id: 144081[/import]

Mitaten, thanks for pointing out the bug submission. My issue is that I can’t even kill the original field. If I could do that, I’d be fine. [import]uid: 77043 topic_id: 36262 reply_id: 144084[/import]

How do you create the field? Perhaps it’s a reference issue? Got some code to paste? [import]uid: 14018 topic_id: 36262 reply_id: 144185[/import]

sure, here’s how I create my field:

  
local textFont = native.newFont( native.systemFont )  
local currentTop = sbHeight+tbHeight+shadow.contentHeight+10  
local padding = 10  
  
titleField = native.newTextField( padding, 5, display.contentWidth-(padding\*14), 80 )  
titleField.font = textFont  
titleField.size = 50  

Again, this is outside any function or for loop, so it should only be called once.

For the time being I’m using a rigged faux text field, but I’m not crazy about it. Artificial keyboard and the textfield itself feel…cheap? compared to the feel of the native textfield/keyboard.

I guess I could dress up my faux field to make it act like the native field, but it’s a lot of work to do something that should be easy. [import]uid: 77043 topic_id: 36262 reply_id: 144195[/import]

Are you using Storyboard? Are you switching scenes? It’s possible that you’re not removing the textfields when you leave the scene and when you come back you create new ones.

[import]uid: 199310 topic_id: 36262 reply_id: 144066[/import]

Regarding the issue with textFields not transitioning properly, that’s a known bug I assume as I reported it last year but it hasn’t been fixed yet. What I am currently doing to transition textFields is load in a fake textfield image and delete the real one, then just transition the image instead. It’s a messy workaround but does the trick. Btw the bug report id is #15926 [import]uid: 14018 topic_id: 36262 reply_id: 144074[/import]

I’m using director, not storyboard. Also, even when I remain within the same page, I can’t kill the native text field.

(I tried removing it once the entry has been made, but nothing happens.)

The duplicate appears when I try to move the original native text field. [import]uid: 77043 topic_id: 36262 reply_id: 144081[/import]

Mitaten, thanks for pointing out the bug submission. My issue is that I can’t even kill the original field. If I could do that, I’d be fine. [import]uid: 77043 topic_id: 36262 reply_id: 144084[/import]

How do you create the field? Perhaps it’s a reference issue? Got some code to paste? [import]uid: 14018 topic_id: 36262 reply_id: 144185[/import]

sure, here’s how I create my field:

  
local textFont = native.newFont( native.systemFont )  
local currentTop = sbHeight+tbHeight+shadow.contentHeight+10  
local padding = 10  
  
titleField = native.newTextField( padding, 5, display.contentWidth-(padding\*14), 80 )  
titleField.font = textFont  
titleField.size = 50  

Again, this is outside any function or for loop, so it should only be called once.

For the time being I’m using a rigged faux text field, but I’m not crazy about it. Artificial keyboard and the textfield itself feel…cheap? compared to the feel of the native textfield/keyboard.

I guess I could dress up my faux field to make it act like the native field, but it’s a lot of work to do something that should be easy. [import]uid: 77043 topic_id: 36262 reply_id: 144195[/import]

Are you using Storyboard? Are you switching scenes? It’s possible that you’re not removing the textfields when you leave the scene and when you come back you create new ones.

[import]uid: 199310 topic_id: 36262 reply_id: 144066[/import]