[Top][All Lists]

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

Re: NSBrowser cleanup

From: Gregory John Casamento
Subject: Re: NSBrowser cleanup
Date: Wed, 30 Jun 2004 11:04:09 -0700 (PDT)

See below.

--- 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
> 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

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".
> 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


Gregory John Casamento -- CEO/President Open Logic Corp.
#### Maintainer of Gorm for GNUstep.

reply via email to

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