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 / Editbox and File problems after update 12

Author
Message
gbison
13
Years of Service
User Offline
Joined: 15th Dec 2010
Location: USA
Posted: 24th May 2013 07:04 Edited at: 24th May 2013 09:29
Evening folks,

Have a few questions for ya, has anyone had problems with their edit-boxes or reading from files in beta 12? We have two apps on Google Play of which beta 12 broke both of them....

First our edit box creations no longer return an integer as an id or that's how its appearing...

Example:
global myBox as integer
myBox = CreateEditBox()
SetEditBoxMaxChars(myBox, 2 ) //<---app fails here as myBox will always = 0

In fact, you will get a message box popup stating Edit Box 0 does not exist then the program exits. This is happening on every instance of an editbox which depends on the method to return an id value.

Now if you open a new project and try this you will get prompted that since you don't have some sort of sensor you need to choose a default location for the file, if you choose one, it pops up every time, if you tell it no; you will never see it again and the editbox works as expected, this does not happen with our previous apps? We are doing more tests as we speak....

Secondly, our shopping app just black screens...and if you touch the window, it crashes(ie....program not responding dialog). Our shopping app reads from a rate file to get saved variable values and to understand if the user has performed certain tasks in order to make decisions on what they should be presented with. If the file previously exists, it does recognize that its there, however running the opentoread() method results in an error stating the file doesn't exist. If we do not comment the file code out we are hit with an error that it doesn't exist even after getfileexists said otherwise. When its commented out we simply get a black screen....and this is where a console log or debugger would make agk a better product.....sigh.

Example:
fname as string : fname = "apprate.txt"
file as integer
value as string

if (getfileexists(fname))
file = opentoread(fname)
value = readstring(file) //<---crash
closefile(file)
endif

However, the compiler detects nothing wrong with either app and they worked flawlessly(published) under beta 11.

Has something changed we didn't get the memo on....lol?




***UPDATE***
Reverted back to beta 11 and all our issues go away. Staying here for now.



Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 24th May 2013 17:23
I just ran a very simple EditBox test (create one and set a bunch of states, including max chars) and it worked fine on my Nexus 7.

This is the code I tested with, can you see if it works for you?


I haven't tried anything for your file read issue.

Have you tried splitting this line 'fname as string : fname = "apprate.txt"' into two lines? It might be that the use of the colon is the issue and not the file bits.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th May 2013 17:36 Edited at: 24th May 2013 17:37
Quote: "SetEditBoxMaxChars(myBox, 2 ) //<---app fails here as myBox will always = 0"


maybe u use this, this don't work and there was no compiler error.
global myBox as integer = CreateEditBox()

Quote: "value = readstring(file) //<---crash"


did you wrote this value with writestring before or did you edit the textfile manual with notepad?
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 24th May 2013 18:03
Quote: "get a message box popup stating Edit Box 0 does not exist then the program exits"


This could be caused by an old player being used with a new compiler, both must be from beta 12 for it to work.

Login to post a reply

Server time is: 2024-11-24 13:41:16
Your offset time is: 2024-11-24 13:41:16