1. For Rob et.al.

I have a program which uses several include files.
Most of the includes do not contain any code that the user
needs to modify (or even see). There is a high probability
of a user deleting a file by accident, sooner or later.

I could bind them, right? Yes, but: there is one file which
DOES have some user-modifiable data:
-- prefs.e
 video_mode = 256 -- a global integer defined elsewhere
 vesa_mode = 1    -- or 0 for no vesa (ditto)
 fontpath = "C:\\EUPHORIA\\FONTS" -- set this to point to your font dir

Now, to get this into my bound program, I must include an ini reader, which
must: check for the existence of a prefs.e file, parse the file, check for
correct spelling (fontpaht, for example, must produce an error message),
type check the values (can't assign "NO" to use_vesa() for example,
and assign the values to the proper variables.

If I bind all this into my package, then as soon as someone says:
"I'd like to change the font", I must re-write the ini file handler
to include reference to "default_font", re-bind, and send new copies
to everyone who is using the program.

Awful lot of work when Euphoria can do all that reading and type-checking
and assigning already, if you just don't bind the code!

Rob, why can we not have, as mentioned in Ralf's letter to Santa last week,
something like: include unbound prefs.e
which would do just what it says: go out and get this file and include it
prior to running?

Irv

new topic     » topic index » view message » categorize

2. Re: For Rob et.al.

Irv Mullins writes:
> Rob, why can we not have, as mentioned in Ralf's letter to
> Santa last week, something like: include unbound prefs.e
> which would do just what it says: go out and get this file and
> include it prior to running?

It's an interesting idea, but for various reasons
I currently need to shroud and eliminate includes
before binding.

I suspect in the long run you would want to take control
of the parsing of your .ini file, rather than leave your user at
the mercy of whatever cryptic messages Euphoria might spit out.

Terry Constant wrote a .ini file reader/writer
- see The Archive page/utility programs.

Regards,
     Rob Craig
     Rapid Deployment Software
     http://members.aol.com/FilesEu/

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu