I feel the same way as well as I use tabs religiously.  Within this
paradigm, the only thing which annoys me now is how visual assist (i.e.
wholetomato.com) want to autoformat to using 2 or 3 spaces for inlined code.
Anyhow... with regards to osg... when in Rome do like the Romans.   This is
a lesson/saying I learned back when changing other peoples code, which can
go beyond formatting conventions.

Thanks Jean and Tomlinson for the steps to convert.

----- Original Message ----- 
From: "Jeremy Moles" <[EMAIL PROTECTED]>
To: "OpenSceneGraph Submissions" <[email protected]>
Sent: Monday, August 18, 2008 2:40 PM
Subject: Re: [osg-submissions] minor fixes for osgWidget


> On Mon, 2008-08-18 at 10:48 -0400, Tomlinson, Gordon wrote:
> > You can switch from using tabs ( which are evil ) and to spaces, what
>
> I use tabs religiously. A tab is exactly that: a user-defined, variable
> amount of space based on your own preferences. (Of course, tabs only
> makes sense at the beginning of a line, I never rely on them for spacing
> after normal text.) If the user doesn't have a tool that can space tabs
> properly for them, perhaps they need a new tool. I've never understood
> why people use spaces and force others to adhere to their spacing
> conventions when it's so easy to use tabs instead and allow the viewer
> of the code control over this.
>
> However, it's not my choice, so I'll definitely make sure to use spaces
> from now on... :)
>
> > VS won't do is convert tabs already in files to spaces (* you need an
> > external APP for that
> >
> > So set in VS
> >
> > VS->Tools->Options->text Editor->c/c++->tabs-> "select insert spaces and
> > set your tab/indent sizes"
> >
> >
> > Gordon
> >
> > __________________________________________________________
> > Gordon Tomlinson
> > Email  : gtomlinson @ overwatch.textron.com
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of
> > James Killian
> > Sent: Monday, August 18, 2008 10:42 AM
> > To: OpenSceneGraph Submissions
> > Subject: Re: [osg-submissions] minor fixes for osgWidget
> >
> > Can someone tell me the easiest way to switch from tabs to spaces using
> > Visual Studio?  Surely there is some easy way to do this.
> >
> >
> > ----- Original Message -----
> > From: "Robert Osfield" <[EMAIL PROTECTED]>
> > To: "OpenSceneGraph Submissions"
> > <[email protected]>
> > Sent: Monday, August 18, 2008 5:47 AM
> > Subject: Re: [osg-submissions] minor fixes for osgWidget
> >
> >
> > > Hi Sergey and Jeremy,
> > >
> > > Jeremy hasn't yet merged your change into his
> > > OpenSceneGraph-osgWidget-dev branch, and since I'm about to tag 2.7.0
> > > I wanted to get fully up to date, so I've gone head and merged your
> > > changes into svn/trunk.
> > >
> > > Jeremy, could you merge this changes into your branch, along with
> > > others made the svn/trunk to make sure things are in sync.   Another
> > > change I made to osgWidget was to convert all tabs to four spaces, to
> > > be in keeping with how the rest of the OSG is formatted.  four spaces
> > > are used in place of tabs to make sure that formatting is the same in
> > > all editors, as tab width can vary from editor to editor.
> > >
> > > Cheers,
> > > Robert.
> > >
> > > On Fri, Aug 15, 2008 at 3:46 PM, Leontyev, Sergey
> > <[EMAIL PROTECTED]>
> > wrote:
> > > > I submitted a fix for osgWidget 2 days ago, but I did not see it on
> > the
> > > > submission list.
> > > >
> > > > Maybe it got lost, so here it is again.
> > > >
> > > >
> > > >
> > > > Thanks
> > > >
> > > > Sergey
> > > >
> > > >
> > > >
> > > > From: Leontyev, Sergey
> > > > Sent: Tuesday, August 12, 2008 5:38 PM
> > > > To: '[email protected]'
> > > > Subject: minor fixes for osgWidget
> > > >
> > > >
> > > >
> > > > Some minor bug fixes for osgWidget:
> > > >
> > > > Jeremy Moles seemed to approve these fixes
> > > >
> > > >
> > > >
> > > > 1. In StyleManager
> > > >
> > > >
> > > >
> > > > when applying styles to a Label element the code below runs in a
> > infinite
> > > > loop.
> > > >
> > > > The reason for this is that nothing increments the Reader "r" in the
> > case
> > > > when applying a style to label,
> > > >
> > > > so I advance the reader when no match was found.
> > > >
> > > > ( To replicate the error apply style to any label)
> > > >
> > > >
> > > >
> > > > replaced this:
> > > >
> > > >                 while(!r.eof()) if(_styles[style]->applyStyle(t, r))
> > inc
> > =
> > > > true;
> > > >
> > > >
> > > >
> > > > with this:
> > > >
> > > >                 while(!r.eof())
> > > >
> > > >                  {
> > > >
> > > >                                 if(_styles[style]->applyStyle(t, r))
> > > >
> > > >                                     inc = true;
> > > >
> > > >                                 else
> > > >
> > > >
> > r.advanceOverCurrentFieldOrBlock();
> > > >
> > > >                  }
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > I tested it and it works well for me, I did not find any problems
> > with
> > it.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > 2.  Added style support for Canvas element, event though there is no
> > styles
> > > > to apply yet.
> > > >
> > > > It is usefull for someone who inherits from Canvas class to develop
> > another
> > > > element.
> > > >
> > > >  If applyStyle(Canvas) does not exist
> > > >
> > > > there is no way to apply style to the  element that inherited from
> > Canvas
> > > > element.
> > > >
> > > >
> > > >
> > > > Added virtual
> > > >
> > > >      bool applyStyle(Canvas).
> > > >
> > > >
> > > >
> > > > and in added call to apply style if the Object is of type Canvas:
> > > >
> > > > StyleManager::_applyStyleToObject(osg::Object* obj, const
> > std::string&
> > > > style) {
> > > >
> > > > ...
> > > >
> > > >
> > > >
> > > > else if(!std::string("Canvas").compare(c))
> > > >
> > > > return _coerceAndApply<Canvas>(obj,style,c);
> > > >
> > > >
> > > >
> > > > Works as expected.
> > > >
> > > >
> > > >
> > > > Sergey Leontyev
> > > >
> > > > _______________________________________________
> > > > osg-submissions mailing list
> > > > [email protected]
> > > >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegr
> > aph.org
> > > >
> > > >
> > > _______________________________________________
> > > osg-submissions mailing list
> > > [email protected]
> > >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegr
> > aph.org
> > >
> >
> > _______________________________________________
> > osg-submissions mailing list
> > [email protected]
> > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegr
> > aph.org
> > _______________________________________________
> > osg-submissions mailing list
> > [email protected]
> >
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
> >
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to