removing native.textField

The documentation for the native.textField says to just use the :removeSelf() function to remove it, but I find that it only removes the text in the text field.

My code(generally)

[code]

local name = “test”

local text3 = display.newText(name, 75, 275, nil, 52)
text3:setTextColor(255,255,255)

function onComplete (event)

textField:removeSelf()

end

function fieldHandler( event )

if ( “submitted” == event.phase ) then

native.setKeyboardFocus( nil )
name = textField.text
text3.text = name
onComplete()
end

end

textField = native.newTextField( 15, 80, 280, 30, fieldHandler )

[/code] [import]uid: 10903 topic_id: 4992 reply_id: 304992[/import]

More on this issue:

I’m using modules and I find that with the module I put the textfield in a function called main. When it’s in this function it only deletes the text inside the field. When there is no main function it is removed.

Any thoughts? [import]uid: 10903 topic_id: 4992 reply_id: 16364[/import]