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 / I create a text editor which saves your files automatically. Does this mean I should save the file each time the user type a letter?

Author
Message
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 11th Jun 2019 23:12
It seems a bit overkill. Maybe there is a better way?
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 13th Jun 2019 09:53
a timer combined with waiting for character input (to ensure the file is being adjusted rather than just idle)?
and yes saving after each letter would be bad for the harddrive, if they used it a lot you would seriously shorten the life of the disk
life's one big game
spec= i5 4ghz, 16gb ram, Nvidia 1070ti gpu
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 13th Jun 2019 23:46
Thanks! I felt that constant saving sounded just wrong, but not sure if I was being paranoid.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Jun 2019 00:07
I don't think the timer should do it any more often than like every 10 minutes
a save button I think would be much more useful.

But you could have an algorthym that saved on a percentage of changes
as the document increased in size the percentage of changes got less
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Jun 2019 00:24
Look for pauses as the user types. If the file has changed but nothing has been entered after a minute or something, autosave.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Login to post a reply

Server time is: 2024-04-27 04:22:21
Your offset time is: 2024-04-27 04:22:21