[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to NSWorkspace

From: Fred Kiefer
Subject: Changes to NSWorkspace
Date: Mon, 26 Nov 2001 20:31:32 +0100

I did do a lot of changes at NSWorkspace and will continue this work as
soon, as I am back home again. Although it is still in an intermediate
state I would like to hear your comments and suggestions. (Especially on
a way to find out if a drive is removable. I have no idea here)

Most of the changes are just cleanups and improvements, but there is one
change that will break compatibility for GWorkspace: 
I added some of the class variables to the instance itself. OK, we are
talking here about a singleton, still I prefer to keep things where they
belong. So now the method [init] must be called for NSWorkspace, and so
any subclass not doing so will get problems. Than again a subclass that
will call it gets problems, as this will return the shared instance.
The only way out is not to subclass any class that is a singleton, and
this is a general advice in oo programming.

What do do for GWorkspace? Don't inherit from NSWorkspace, but use one,
if you need it. I had a quick look at the code, and there aren't many
places where super methods are called, so this is easy to change and
will work with every implementation of NSWorkspace. There is one place
where functionality will be missing: The file operations. Here I want to
ask Enrico, if he would like to donate his implementation of them to


reply via email to

[Prev in Thread] Current Thread [Next in Thread]