From: Philip Mateescu Date: 2002-04-30T04:02:13+09:00 Subject: Re: [ANNOUNCE] Practical Ruby 0.1.0 Would you please care to announce it also on the scintilla mailing list. Thank you, philip ----- Original Message ----- From: "Baptiste Lepilleur" To: "ruby-talk ML" Sent: Sunday, 28 April, 2002 10:46 PM Subject: [ANNOUNCE] Practical Ruby 0.1.0 > Hi all, > > I'm glad to announce the first release of Practical Ruby > (http://gaiacrtn.free.fr/), an IDE for Ruby on the Windows platform. It is a > 'proof of concept' release. I got that crazy idea last Monday and finally > implemented enough to know that it can be done: > > Practical Ruby aims to be a fast evolving IDE for Ruby development. To > provide fast evolution, most of Practical Ruby is (will be) itself written > in Ruby. > > The source editor is build around Scintilla Edit Control > (http://www.scintilla.org/), a very flexible source edit control. While the > GUI core is written using MFC, most of the tasks are delegated to Ruby > scripts. The Scintilla Edit Control has been made accessible from Ruby, with > an interface making the control much easier to use than in C++. Commands > (menu entry selection, toolbar button and keyboard shortcut) processing is > also delegated to Ruby. > > Feedback are welcome! I would really like somebody to propose a > architecture for the command pattern in MainFrame.rb using ruby features (I > started learning ruby less than a week ago, I'm sure there is a better way > of implementing that with ruby's features). > > Just to give you an idea why ruby help faster development, I'll let a > bit of code talks for itself. Here is the code that handle the 'smart > indent' (basic at the current time): > > > class EditControl < ScintillaBridge > def eventCharAdded( ch ) > smartIndent() if ch == "\r" || ch == "\n" > end > > def smartIndent() > if currentLineNumber() > 0 && lineLength( currentLineNumber() ) > <= 2 # 2 <= '\r\n' > previousLine = getLine( currentLineNumber() -1 ) > indent = /^\s*/.match( previousLine )[0] > replaceSel( indent ) > end > end > end > > Enjoy, > Baptiste Lepilleur. > > --- > Baptiste Lepilleur > http://gaiacrtn.free.fr/ >