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 / Only able to call GetEditBoxChanged once?

Author
Message
Faltor
9
Years of Service
User Offline
Joined: 20th Jul 2015
Location:
Posted: 19th Aug 2015 10:06
It seems like I can only call GetEditBoxChanged() once per editBox per Loop. Is that normal? It seems kinda weird that you wouldn't be able to check that directly more than once.
Should I just work it around with some simple Boolean variables?

-Faltor
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 19th Aug 2015 13:26
I am a litle bit confused...you are checking each editbox once per loop. It will only change once per loop, you only get an update after the Sync().

Or...do you mean that after calling GetEditBoxChanged() when it is 1, it immediately resets to 0 if you checked a second time in the same loop?

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Faltor
9
Years of Service
User Offline
Joined: 20th Jul 2015
Location:
Posted: 19th Aug 2015 18:39
The later is correct. After checking it once with a result of 1, it reverts to a result of 0, within the same loop.

-Faltor
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 19th Aug 2015 19:24
There were similar issues in DBPro with checking mouse clicks. After checking once, it flipped to zero. It's like quantum physics, once you observe it you have changed it's behaviour forever!

I would use the same workaround you have used. This is useful to know, thanks for sharing

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 19th Aug 2015 20:03 Edited at: 19th Aug 2015 20:06
i think it should stay at 1 until next sync.
because it is inconsequent to other commands.



AGK (Steam) V2 Beta .. : Windows 10 Pro, 8.1 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Faltor
9
Years of Service
User Offline
Joined: 20th Jul 2015
Location:
Posted: 19th Aug 2015 21:19
Ya I also believe it should stay true until the next sync. That would make it a lot easier to deal with when you have multiple logic routes and the possibility of calling GetEditBoxChanged twice.

-Faltor

Login to post a reply

Server time is: 2024-11-25 19:44:04
Your offset time is: 2024-11-25 19:44:04