Why Native Text Fields are not supported on Simulator?

Hi

I creating an app to do some calculations so I need Text Fields to input the data. Is a very simple app.

But when I explore the new sample project called NativeKeyboard2 in a comment it says “Native Text Fields not supported on Simulator”

I am very disappointed about that…

So I have two questions:

-Why Native Text Fields are not supported on Simulator?
-There is another Simulator in which i can test my app?
Thanks [import]uid: 5500 topic_id: 2256 reply_id: 302256[/import]

yes, you can build for the xcode simulator and they work there…however, the event object does not have much useful data in the current version of the product. Specifically, there is no event.target attribute [import]uid: 6175 topic_id: 2256 reply_id: 6794[/import]

The Xcode iPhone and iPad simulators offer the same event.target information found on actual iPhone/iPad devices. For native.newTextField you can tell when the user has canceled or finished typing. You can also read the entered text.

-Tom [import]uid: 7559 topic_id: 2256 reply_id: 7054[/import]

tom,
Are you saying that even though there is no event.target sent by the Corona simulator, the actual environment sends a more complete/robust event record??

If so, I’m really happy to hear that…I was pretty frustrated having to carry a distinct listener and closure for each entry field.

Where can we find documentation for the COMPLETE attributes of the “real” event record?

Thanks [import]uid: 6175 topic_id: 2256 reply_id: 7058[/import]

native.newTextField and newTextBox are not supported in the Corona Simulator but are supported in the Xcode iPhone/iPad simulator and on the device. You can see the NativeDisplayObjects sample code for an example of the textField listener. The event.name is “userInput”.

-Tom [import]uid: 7559 topic_id: 2256 reply_id: 7061[/import]

Tom,
I don’t know if you read my question carefully, or have looked at this one either:
http://developer.anscamobile.com/forum/2010/09/27/event-handling-native-input-fields-iphone

But it’s VERY FRUSTRATING to have to ask the same question over and over again, only get pointed to an anemic example that does not address the issue.

I’m VERY CLEAR that your Simulator does not support native entry fields and that Xcode does…
The question is, in the real-supported (runtime) environment, what (COMPLETELY) does the “event” record look like (contain) for a Native field.

In my tests, there are only two attributes (name and phase)----very anemic information.
event.target is NOT BEING SENT
This means that you cannot have one handler deal with a whole form (ie multiple fields). Each entry field needs it’s OWN LISTENER. So, you either have to use a closure around a main function, or maintain separate listeners. That sucks big time and I’d like some clarification of whether this is intentional, or just a temporary situation.

The example code you referenced only deals with one entry field (and also does not show event.target) so it seems completely irrelevant to my question.

I’ll say it again----where (documentation wise) can we see EVERYTHING that Corona should (now and future) be sending as an event record to the listener for a native object. I’m hoping that event.target is on that document. If not, please make it a feature request. [import]uid: 6175 topic_id: 2256 reply_id: 7063[/import]

The original question asled if there another simulator that can handle native Textfields and my answer was the Xcode simulator handles native objects the same as on an actual device.

You’re right about having to have multiple handlers for each textField you have on screen. It’s not the best solution, but it does work. Native display objects are special and don’t fully support all the features of the other objects so there are limitations.

We are looking at how to improve native objects in the future.

-Tom [import]uid: 7559 topic_id: 2256 reply_id: 7064[/import]

I have 3 developing apps which require user text input!

while, in the 2 that use just one word entry…I might continue developing trust to luck and hope for success in the build.

but, don’t think I can allow the one with 26 entries to run without testing repeatedly!

how can I test in the Xcode simulator?

MH [import]uid: 8655 topic_id: 2256 reply_id: 8320[/import]

You can test text input by building for Xcode Simulator. It works the same as on the device. Is that your question?

-Tom [import]uid: 7559 topic_id: 2256 reply_id: 8326[/import]