[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Directories named *.kdelnk : bug in kfm or KSimpleConfig ?
From: "Robert Hagemann" <rhagemann () psipenta ! com>
Date: 1999-01-06 8:30:06
[Download RAW message or body]
Hi,
take my apologies for getting philosophical, but on answering Patrick
Dowler:
<cite>
Of course, having kfm try to use KSimpleConfig and seeing if it worked is a
valid way for kfm to check the thing.kdelnk. If KSimpleConfig is going to
check (it really should) kfm might just as well use that check rather than
duplicate it... I recall in java that I always just try to open the file by
creating a FileInputStream and catching exceptions, rather than checking
that
it exists, chekcing permissions, and then opening it (FIS does the same
checks I do, presumably).
</cite>
This reminds me on letting Your child touch the oven, in order to know
if it's heated...
A class (KSimpleConfig) should be the abstraction of an entity with
a set of related responsibilities. (You know CRC cards?)
IMHO, the responsibility of KSimpleConfig is to provide configuration
information and *not* to check for ordinary files, permissions a.s.o.
I think,
- kfm has to check the file, because it's its responsility to
provide a valid context for KSimpleConfig, and
- KSimpleConfig has to check the file bcause it has to handle
error conditions gracefully.
If both classes want to have a similar job done, the should request the
service of just another class (A file checker class).
Just my two pence...
Ciao
Robert Hagemann
.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic