...continua...
" That is what I thought too but it doesn't work.
If the .config is
[Filter]
filteractive=-1
then isNull(Settings["Filter"]) will always be true as Settings will
always return a null if the key is a slot not a value.
My problem is that if no Filter/things are set, when the settings are
saved then the entire slot disappears from the .config file.
> in case you want to do something when the "Filter" key does not exist.
>
> Regards,
> Tobi
>
I have figured out a workaround, but its messy and fragile. I create a
dummy boolean valueitem called "filtered". I set it true if any filters
are set and false if none are set. It is fragile because I do not know
at the time I close down the app how many filter things there are. So
each bit of code that creates or sets a filter item must manage a global
boolean value (and thus it is fragile because it involves each bit
checking on all other filter items....).
But at least that way I always will have a [Filter] slot with at least
one valueitem in it.
Hmm. You second idea works, but I was trying to avoid that as I will be
calling it multiple times, at least once for each filter item that gets defined.
But it might be better than the messy solution I just posted back to Tobi.
--
Bruce "