Keyboard help? (willing to pay $)

So I have a simple entertainment app I wanted to make. Basically the app has a preloaded background with a few places that you can tap on and add text.

I made it in GameSalad in less than an hour (not including graphics), but decided I was going to have to remake it in Corona because…

A: The text for the keyboard implementation in GS is fuzzy and you can’t do stuff like make it BOLD.

B: I can’t have a ‘share to facebook or twitter’ button in GS.

C: I can’t have a ‘save to your photo album’ button in GS.

ANYWAY…

I got all the graphics and text set up in Corona, and it looks really nice so far… but i’m having trouble with the keyboard.

For example,
near the top of the iphone app there’s text that says ‘demo text’. I want people to be able to just tap on that text, then the regular iphone keyboard pops up, and they type in their own text.

BUT I can’t seem to do that!

I’ve searched around Corona, and any code I find related to keyboards I DON’T UNDERSTAND. (Keep in mind i’m used to GameSalad).

If someone could PLEASE help me out, and explain to me how i can easily implement this into my app, that would be amazing. I’m even willing to send someone $20 via paypal if they make a quality video tutorial on how to do it on youtube. (Or you could do it for free for karma points?)

Thanks. [import]uid: 120095 topic_id: 20800 reply_id: 320800[/import]

Hi there,

I’m not sure if this is quite what you want or not, it’s a text field that says “demo text”, the user clicks in and that text is cleared and they can key in whatever they like.

If you want something more specific I’m happy to try and assist you but it would help if you were very clear in what you were trying to achieve.

[lua]local field

limitField = function (event)
if event.phase == “began” then
field.text = “”
elseif event.phase == “submitted” then
–do stuff here
end
end

field = native.newTextField(20, 15, 100, 20, limitField)
field.text = “demo text”[/lua]

Peach :slight_smile:

PS - Build that for the Xcode simulator, it wont work quite properly in the Corona simulator yet. [import]uid: 52491 topic_id: 20800 reply_id: 81812[/import]

How do i build it for the Xcode simulator?

I tried right clicking on my main.lua file and selecting ‘open with iOS Simulator’ but when the simulator opens its just frozen and doesn’t work. [import]uid: 120095 topic_id: 20800 reply_id: 81988[/import]

What does limitField mean? In other sample does i’ve seen it say handlerFunction where you put limitField.

Also, is there a way of hiding the box surrounding the text? Can i some how make the opacity 0? I just want the text to show.

Sorry for my total noobishness, i’m trying to find a good Corona book so I don’t need to spam the forums. Are there any you could recommend? [import]uid: 120095 topic_id: 20800 reply_id: 81993[/import]

What version of Corona are you running? It shouldn’t freeze.

To build for Xcode simulator you open the project in Corona and press CMD+B and select “Xcode simulator” and “Build”.

limitField was what I chose to name the function I made. You can name it whatever you want (no spaces, can’t start with a number) - you could change that to “fieldHandler” and it would work fine, too.

There is a book out by Dr Burton I have heard good things about; http://www.burtonsmediagroup.com/books/mobile-app-development-with-corona-getting-started/

Peach :slight_smile: [import]uid: 52491 topic_id: 20800 reply_id: 82132[/import]

Thanks, i’ll check that book out.

when I try to do that, it shows a loading screen that says ‘connecting to server’

once it’s loaded it says ‘The Corona Connect terms and conditions have changed. Click OK to read and agree to the new terms’.

When I click OK it brings me to the Corona log in page.

When I log in it just goes to the regular ‘welcome back’ successful login page. I’ve tried many times but there’s never actually a place to agree to the new terms.

Help?

Thanks. [import]uid: 120095 topic_id: 20800 reply_id: 82360[/import]

Oh drat, that has happened before.

Uh…

Try going “Account” (link at top right of page) then “Edit” - there’s a box at the bottom to tick for terms.

Can you please let me know if that sorts out the issue?

Peach :slight_smile: [import]uid: 52491 topic_id: 20800 reply_id: 82420[/import]

I tried that, but whenever I go back it still shows that I haven’t ticked the box, even though I tick it every time. It’s still now working :confused: [import]uid: 120095 topic_id: 20800 reply_id: 82537[/import]

OK, can you use this form to explain your issue, please? Someone should be able to help you out;

http://developer.anscamobile.com/forms/support

Peach :slight_smile: [import]uid: 52491 topic_id: 20800 reply_id: 82646[/import]