the blog
Back to -Blog

IronRuby IDE - The Visual Form Designer

A short guide to the alpha release
by Huw Collingbourne
Sunday 2 March 2008.

We recently released the first public alpha of our IDE For IronRuby. The Ruby In Steel Personal Edition for IronRuby is a FREE IDE. It is free now and it will remain free after the final release of IronRuby itself.

Here is a brief guide to a few of the essential visual design environment in the alpha release of this IDE. For an overview of other features and limitations of the alpha version you should also read the information on the download page and our quick guide to the IronRuby Form designer.

- Start A Project

Select File, New, Project and select either IronRuby Windows Application or IronRuby Console Application. Note: Other listed project types are not relevant in this release of the software.

- Form Designer

When you create a Windows Application, you have access to the Form Designer. Now you can drag controls from the Toolbox onto a form and use the visual alignment guides to help you position them.

You may also use the Layout toolbar to align selected controls in the various ways.

- Properties and Events

The Properties panel can be used to set properties for a selected control.

You may also create event-handling methods using the Events panel (but refer to the ‘Problems’ section at the end of this article for information on an important limitation in the current pre-alpha release of IronRuby).

- Code Behind

Behind the scenes, Ruby In Steel For IronRuby saves your visual form design as Ruby code and it creates a form definition file, here called Form1.designer.rb which is placed into the Solution Explorer in much the same way as standard .NET languages such as C# create ‘code behind’ form definitions.

- Code and Run

When you are happy with your design, go into the editor and write some code.

Finally, press CTRL+F5 to run the application.


PROBLEMS...

This release is Alpha and has many limitations and deficiencies which will be addressed in the course of future developments. Here are some things to note:

- In some cases, the form design code may load into the incorrect editor which has the side-effect of disabling the visual designer. If this happens, close the file (e.g. Form1.rb), then in the Solution Explorer, right-click the file and select View Designer.

- Not all properties set in the properties panel generate correct Ruby code (for example, the TextAlign property is not supported). If you encounter such a problem, you may manually delete code that attempts to set these properties in the ‘code behind’ file (e.g. Form1.designer.rb). As a general rule, though, we suggest that you use the properties panel cautiously in this alpha release.

- IronRuby does not yet fully implement delegation. This means that when you have multiple instances of a specific control (e.g. two Buttons), the same event-handling method (e.g. button1_Click) is called for all instances of that type of control. One way around this may be to handle different events for each instance of a control ( e.g. button1_Click and button2_MouseClick). An alternative workaround is explained in the article: IronRuby Developments - the Visual Designer).

Bookmark and Share   Keywords:  development  IronRuby  visual design
© SapphireSteel Software 2014