Chris wrote:
I was a little unclear on my point. What I meant was that one way top
address cross-platfrom differences is to put in a:
if Platfrom == X:
do this
elif Plafrom == Y:
do this other thing
etc.
type contruct. I have never had to do this, and instead have found a way
that the exact same code works on all platforms (that I've tested
anyway). And the result is ussually better than if I'd just used the
above construct.
Yes, definitely. That's always an option.
It is simple and straightforward, but not so flexible. In general,
mixing multiple concepts as one attribute feels like a bad idea to me:
i.e. the frame's name and the name of the file being edited. Those are
two different things, even if they happen to be the same in the current
impimentation. You've also kind of mixed GUI and non-GUI concepts, which
might bite you later. Here are some issues I see right away:
It's really similar to having an abstraction layer, or kind of like using
opaque pointers. And linking the handling of frame instances to the underlying
API, which handles the creation and destruction of the pointers, means we're
always in synchronization with what's really happening with the user.
And then, of course, there's the fact that there's no extra code needed. Which
is always a good thing.
I'm sure you can tell I'm sold on the implementation... I've had no problems
in implementing any functionality using it. In fact it has made some features
quit easy to add.
- What if you want to have multiple frames all providing a view of the
same file?
Not a problem. STC has a multiview feature that handles all the low level
per document/instance housekeeping that may be necessary..
- What if the full path to the file is very long...and wouldn't fit in
the frame title?
Well, the frame name and frame title are different attributes. So there's
no real problem in this area either.
Just my $.02
I've been involved in enough software projects to know one thing, any
civilized discussion, and all of them should be, are worth while.
Joe
Joseph D. Poirier
DSP Software
IMN, Nokia Inc.
6000 Connection Drive
Irving, TX 75039