[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSBrowser cleanup
Gregory John Casamento
Re: NSBrowser cleanup
Wed, 30 Jun 2004 11:04:09 -0700 (PDT)
--- Serg Stoyan <address@hidden> wrote:
> 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
> The idea is to sepearate classes location:
> - NSBrowser stays in NSBroser.m
> - NSBrowserColumn goes into AppKit/NSBrowserColumn.h and
> - change GSBrowserTitleCell name to NSBrowserTitleCell and put into
> AppKit/NSBrowserTitleCell.h and Sources/NSBrowserTitleCell.m
The only classes available, per the spec of either OpenStep and MOSX are
NSBrowser and NSBrowser cell. As a general rule, do not give classes that are
GNUstep specific NS* prefixes. This creates a clear deliniation as to what is
defined in OpenStep/Cocoa and what is defined in GNUstep specifically.
GNUstep specific classes should only use the GS* prefix.
> 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?
Only the ones above.
> 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".
> @implementetaion NSBrowser (GNUstepAdditions)
> // GNUstep specific methods go here
> 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
> 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
Gregory John Casamento -- CEO/President Open Logic Corp.
#### Maintainer of Gorm for GNUstep.