realbasic-nug
[Top] [All Lists]

Re: Naming Conventions

To: "REALbasic NUG" <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Naming Conventions
From: "Steven Taylor" <realbasic at superjacent dot net>
Date: Mon, 31 May 2004 20:44:20 +1000
Delivered-to: realbasic-nug at lists dot realsoftware dot com
List-help: <mailto:realbasic-nug-request@lists.realsoftware.com?subject=help>
List-id: REALbasic NUG <realbasic-nug.lists.realsoftware.com>
List-post: <mailto:realbasic-nug@lists.realsoftware.com>
References: <006a01c446ad$337f3e00$2002a8c0 at HAL1> <498D33E0-B2A9-11D8-AC85-000A95DC5C3A at satx dot rr dot com>
Thanks for that.

Steve Taylor

On Sun, 30 May 2004 21:21:56 -0500, "William Squires"
<wsquires at satx dot rr dot com> said:
> No, but I use the following:
> 
> Button, BevelButton - btn
> ListBox - lst
> GroupBox - grp
> Radio Button - rdb
> EditField - txt
> Checkbox - chk
> Timer - tmr
> StaticText - lbl
> Scrollbar (either), Slider - scr
> Progressbar - prg
> Popup menu - pop
> Disclosure triangle - dis
> Little Arrows - lar
> Spritesurface - spr
> Rb3D - r3d
> RBScript - scr
> Socket - soc
> SerialControl - ser
> OLE container - ole
> QuickTime movie player - mov
> QuickTime note player - nte
> Line control - lin
> Rectangle control - rec
> Oval control - ovl
> Canvas - cnv
> ImageWell - img
> Tabpanel - tab
> Pagepanel - none; I don't use these.
> Chasing Arrows - none; I don't use these.
> Placard - none; I don't use these.
> PopupArrow control - none; I don't use these.
> DataQuery control - none; I don't use these.
> Data control - dat
> Contextual menu - ctx
> Separator control - sep
> Menus and menu items - none; I name mine with the name of the menu then 
> the name of the menu item. So File | Quit would be FileQuit. No prefix.
> Toolbar & Standard Toolbar - none; I don't use these
> 
> For local variables, I use 'i','j','k','x','y','z',etc... for loop 
> variables. 'knt' for counters, 'sum<XXX>' for summations, 'l' for 
> string lengths, 'result' to hold the return value for functions, and 
> any others as necessary use titlecase but with 1st character lowercase.
> 
> For properties in a class, window, or module, I use a descriptive name 
> in Titlecase and a lowercase 'f' (for 'field') in front for 
> protected/private properties, and no letter 'f' for public properties, 
> or subs/functions that tie into a protected/private property. Ex: if I 
> have a class that acts as a container, it'll probably have a count 
> property, and will have an 'fCount As Integer' variable for the 
> private/protected storage, and a function 'Count() As Integer' as an 
> accessor for it to provide a ReadOnly public property. This comes from 
> the MVC (Model-View-Controller) paradigm, where I tend to think of my 
> model classes as representing records in a database, and the individual 
> properties thus map to fields of the record.
> 
> I use 'wnd' for windows, 'C' for classes (except for custom control 
> subclasses), and module names are all uppercase.
> 
> I also use VB 6/.Net as well, but only at work. I use the same naming 
> standards there, with the exception that windows (which are called 
> forms in VB) have the prefix 'frm'.
> 
> HTH!
> 
> On May 30, 2004, at 8:18 PM, Steven Taylor wrote:
> 
> > Hi all, I'm new to RB, coming fromVB/Access world.
> >
> > I'm currently going through the tuturial and all seems to make sense.  
> >  As
> > you can imagine I'm comparing things to VB.   In VB I have gotten use 
> > to a
> > naming convention, you know - prefixing objects/variables with a three
> > letter code which references the variable or control.
> >
> > Is there a document which recommends a suggested naming convention for 
> > RB
> > variables, controls etc.
> >
> > Thanks in advance.
> >
> > Steven Taylor
> > Melbourne, Australia.
> >
> >
> > _______________________________________________
> > Unsubscribe or switch delivery mode:
> > <http://support.realsoftware.com/listmanager/>
> >
> > Search the archives of this list here:
> > <http://support.realsoftware.com/listarchives/lists.html>
> >
> >
> William H Squires Jr
> wsquires at satx dot rr dot com dot nospam <- remove the .nospam
> 
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://support.realsoftware.com/listmanager/>
> 
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>
-- 
Steven Taylor
Melbourne, Australia
_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>