Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Edit Box Bug Android and IOS

Author
Message
nja
12
Years of Service
User Offline
Joined: 11th Dec 2011
Location:
Posted: 28th May 2012 20:59 Edited at: 28th May 2012 21:00
Hi All,

With the below code what I am trying to achieve is that when the user edits the text in the text box and clicks enter, the text in the label will update. Now this works perfectly fine on the PC, but does not work on android or iphone. On the android and iphone, when I click on enter (android) or (done) for iphone, the label doesn't update. When I just tap on the screen again, the label finally updates. Does anyone know a slick way to get around this. I've tried using the keycode of the enter key as well, to no avail.

Thanks!

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th May 2012 21:20
I think the problem may be that the box doesn't actually lose focus in iOS/Android when the pop-up keyboard goes away.

The GetEditBoxChanged command is based on whether the input box has lost focus.

You might need to try something like this:


The EditBox thing allows for multiple line input (which you cannot do on iOS, at least, because there is no 'enter' key), so a command that checked the 'enter' or 'return' key wouldn't work.

There should be some sort of command that indicates when the 'enter' (android/windows) or 'done' (iOS) key is used.

Cheers,
Ancient Lady
nja
12
Years of Service
User Offline
Joined: 11th Dec 2011
Location:
Posted: 1st Jun 2012 02:28
Excellent thanks, that works perfectly! Gives a little different results on ios than android. On android the label changes with each key press, but on the ios it only changes when clicking done. It works good enough for me, though.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 1st Jun 2012 02:49
Each system handles things differently.

TGC is trying to make something (AGK) work across so many platforms that it isn't surprising that some bits aren't perfect.

Cheers,
Ancient Lady
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Jun 2012 11:49
Useful to know, many thanks. I'm just working on edit box input now but just on the PC while I develop. Can you advise before I get to it, do I need to put edit boxes in the top half of the screen to allow for popup keyboards?

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 1st Jun 2012 16:23 Edited at: 1st Jun 2012 16:24
BatVink, yes, you should put the edit boxes high on the display to allow for the keyboard.

My suggestion to get around the differences in how each platform determines 'doneness', is to put up however many edit fields you need and a button to be pressed when the user is done entering the fields.

Then, in the loop, you check for the button press only and get the value(s) when that happens.

Cheers,
Ancient Lady
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 2nd Jun 2012 13:45 Edited at: 2nd Jun 2012 14:45
Does anyone use the 'Swype' keyboard on Android? Both the EditBox and TextBox do not work... After swyping the text, AppGameKit only prints the last letter...

Not sure what to do about this one? Anyone have any suggestions (other than not using the 'Swype' keyboard ha)...

Login to post a reply

Server time is: 2024-11-23 14:10:21
Your offset time is: 2024-11-23 14:10:21