[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSBrowser cleanup
From: |
Serg Stoyan |
Subject: |
NSBrowser cleanup |
Date: |
Wed, 30 Jun 2004 20:22:02 +0300 |
Hi everybody,
Doing some fixes in NSBrowser I come up to idea that NSBrowser needs some
reorganization. Let me explain what I mean.
NSBrowser.m has 3 classes NSBrowserColumn, GSBrowserTitleCell and NSBrowser
itself.
The idea is to sepearate classes location:
- NSBrowser stays in NSBroser.m
- NSBrowserColumn goes into AppKit/NSBrowserColumn.h and
Sources/NSBrowserColumn.m
- change GSBrowserTitleCell name to NSBrowserTitleCell and put into
AppKit/NSBrowserTitleCell.h and Sources/NSBrowserTitleCell.m
Notice that NSBrowserTitleCell.h and NSBrowserColumn.h can be installable or
not. I've
also noticed that GSBrowserTitleCell is used by NSFontPanel so it should be
modified too.
Is there any objections?
I've done some formatting inside NSBrowser.m also. The basic principles of this
formatting are:
1. Methods are placed in order specified in OpenStep specification.
2. Methods are grouped by activity prepending with comments in the form:
//-------------
// Acttivity group description as described in OpenStep specification
//-------------
3. GNUstep additions should go in category with name "GNUstepAdditions". Example
@implementetaion NSBrowser (GNUstepAdditions)
// GNUstep specific methods go here
@end
4. Cocoa additions should go in category with name "CocoaAdditions" (there's no
Cocoa
specific code in NSBrowser, although).
5. Private method names should be prepended with "_" and go into category with
name
"Private".
As a result it should make GNUstep code more maintainable and clean. Moreover,
when
documentation generated, we'll see GNUstep and Cocoa specific methods (if any)
separated
from OpenStep standard's methods. I think there are other classes that needs
such cleanup.
What do everybody think about adding such formatting rules info "Coding Style"
section of
"Coding Standarts" document?
--
Serg Stoyan