Jump to content

Programming with files


Recommended Posts

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
Link to comment
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.

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

Monkey's are, like, natures humans.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...