Sign in to follow this  
Followers 0
Xandy

Programming with files

7 posts in this topic

#1 ·  Posted (edited)

Files are great programming tools?

Lets say we have a last settings file for a dialog.  Stores the users last confirmed field values.

How much concern is there to update this file every time the settings are confirmed?

Considering dialog can be called mutable times during program duration, and hard drive wear from a file update, or possibly file create.  I've lost my research into the technology used in Win7 that switches SSD current writes to least written to bit.  I forget what it's called.

I've been writing to files for decades.  Always seemed to be the way to get the job done and my hard drives have lasted 5-10.

Is my example bad practice, if the program gets allot of use?

Edited by Xandy

I am not a lawyer.  (-_-) Xandy About  (^o^) Discord - Xandy Programmer

Share this post


Link to post
Share on other sites



I wouldn't worry about it, It's your page file you should worry about if you have low memory.

But I tend to read from file/registry when start program and write when end program, during is all memory.

1 person likes this

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

 

But I tend to read from file/registry when start program and write when end program, during is all memory.

 

Same here. 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I like to store the last values for mutable dialogs.

A dialog to load surfaces.

A dialog to attach surface objects to surface objects.

A dialog to create animations.

Dialog to set colorkey.

Dialog to edit surfaces, pen dialog.

Many more in fact, but those are some.

Functions with local data, written to files to remember last used settings.

Edited by Xandy

I am not a lawyer.  (-_-) Xandy About  (^o^) Discord - Xandy Programmer

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

The dialogs used here don't need saved, but other dialogs could use it.

http://youtu.be/DZwG6339ku0

Settings on this dialog could be saved.

http://youtu.be/wh-6PD_vhec

Edited by Xandy

I am not a lawyer.  (-_-) Xandy About  (^o^) Discord - Xandy Programmer

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I wrote a AutoIt script.  The script includes SDL UDF.

AdmiralAlkex might know more specifics concerning your question because he wrote the >SDL UDF.

My script also includes a SDL_Template file I have been writing in C++ for years.  The AutoIt version of my SDL_Template only has a few converted functions, such as the windowclass .  You can see about 14 windowclass objects in the first video.

I don't really understand the question.

edit: the program it'self was going to be an animation program.  I stopped development on the AutoIt version and moved back to C++.

I recently finished adding the contextmenuclass to my SDL_Template in C++.  Context menu class gives a menubar without MFC in C++, and of course right-click context menus.  

Edited by Xandy

I am not a lawyer.  (-_-) Xandy About  (^o^) Discord - Xandy Programmer

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0