Native Input doesn't disappear right away when removed from display hierarchy

4 replies [Last post]
dwallin33
User offline. Last seen 18 weeks 2 days ago. Offline
Joined: 6 Feb 2010

Hi, I'm trying to put a native text input onscreen for the user to type their score into, however the input doesn't go away right away when I try to remove it. It often will stay on screen for several seconds or until someone tries to interact with it. Are there any work arounds?

Replies

Walker's picture
Walker
User offline. Last seen 20 weeks 6 days ago. Offline
Joined: 18 Jul 2009

I can't even get any input text fields to display, which is really putting me off buying this. I downloaded the sample code for the Twitter app and nothing! No input textfields display even in the example. I would really appreciate an email or something explaining what I should do. If I can't display input textfields then this no good to me. I'm using the 1.1 trial version at the moment but it says that inputs are supported now. So what gives?

carlos m. icaza's picture
carlos m. icaza
User is online Online
Ansca Staff
Joined: 22 Jun 2009

can you install the app on the iPhone?

There is a limitation on edit text fields on the Corona simulator. But they work on the device.

Dwallin, we fixed some bugs on text fields. Can you try to do another build?

Carlos

SumeragiSubaru
User offline. Last seen 19 weeks 6 days ago. Offline
Joined: 31 May 2010

Hello,
I use Corona SDK Beta 5, and I have same problem as dwalin..
on the device after removing textFiled remains on the screen.. I don't know how to delete it.. i use this code:

local jmenoGroup=display.newGroup();

function someFunction()
..
local name_txt=native.newTextField(325,120,320,40,fieldHandler);
name_txt.align="center";
name_txt.font=native.newFont(native.systemFontBold,30);
name_txt.text=name;
--this code works properly
jmenoGroup:insert(name_txt);
..
end

function fieldHandler( event )

if ( "began" == event.phase ) then
-- This is the "keyboard has appeared" event
-- In some cases you may want to adjust the interface when the keyboard appears.

elseif ( "ended" == event.phase ) then
-- This event is called when the user stops editing a field: for example, when they touch a different field

elseif ( "submitted" == event.phase ) then
-- This event occurs when the user presses the "return" key (if available) on the onscreen keyboard

-- Hide keyboard
native.setKeyboardFocus( nil )
end
end
function removeTxt()
for i=jmenoGroup.numChildren,1,-1 do
jmenoGroup[i].parent:remove(jmenoGroup[i]);
jmenoGroup[i]=nil;
end
end

but if I use this removing textFiled remains.. is there some other way to remove it?
thx

OderWat
User offline. Last seen 28 weeks 1 day ago. Offline
Joined: 4 Jun 2010

May I point you to this:

http://developer.anscamobile.com/forum/2010/07/02/nativenewtextfield-cant-be-removed

I start to think you ignore "uncomfortable" bugs which get reported...

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.