entropyreduction wrote:

> 
> 
> On Fri, 12 Nov 2004 20:39:45 +0000 (UTC), you wrote:
> 
> how about this:
> 
>    ini.getVarBackupSectionName(type[, proc_id [, ini_file])
> 
> (noticed I've reversed position of ini_file/proc_id, having to do 
> with what might be optional)  
> 
> where type is "local", "static", maybe "local vectors", etc.  
> 
> You can then use ini.enum_values to get your var names.  

Sounds good to me.

> 
>>Similarly for ini.allLocals()
> 
> Not quite sure what you need these for: can't you just look at ini 
> file?  
> 

*I* can, a script can't (look) --at least not as easily as if you 
provide ini.enum_values. A script could be made to correctly restore all 
statics, for instance, w/o prior knowledge of which statics go where.
Another script could be made to initialize vectors and maps that are 
unknown before hand, sort of like restoring a database. My thinking is 
"decouple code from data" whenever possible.


> 
> Well, if globals are to be backed up, surely they should be backed up 
> in just one place.  It makes sense to backup locals and statics on a 
> per-procedure basis.  It makes no sense backing up globals per-
> procedure (otherwise you might end up with the same global with 
> different stored values at the same time).

Areyou're thinking that all procedures in your script folder get 
executed each time ppro starts? Mine don't, yet each one uses a bit of 
globals here and there that I'd like to backup to an ini file. Storing 
different values for the same global isn't an issue.

> 
> Okay, so we have one ini file for globals and globals only.

No. One for each procedure, like for statics, etc. Let users build a 
global if they want to, by enumerating all globals in their procedure 
ini files.

  The ini 
> file that's used when you invoke
> 
>   ini.saveVars(procid, ini_file)
> 
> has a [globals] section, but entires in that section are placeholders:

No. Allow for different stored values for the same global name.

> 
> Howzat?  Keeping the globals, global....
> 

They are globals in the moment they live in memory, otherwise they're 
just syntax and stored values in an ini file. A different beast...



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to