![]() |
|
Published 2007-02-23 Printer-friendly version
Advertisement
|
Articles Wanted Write for Clarion Magazine Clarion Magazine is looking for writers! If you have written some code of interest to Clarion developers, or have experience or expertise in a Clarion-related area, consider writing an article. You don't need prior writing experience, just a willingness to learn and share your knowledge with others. |
The long-awaited alpha release of Clarion 7 has now gone out to selected third party developers for compatibility testing. As Bob Z has blogged, the Clarion 7 alpha program is being rolled out in four stages. The first stage comprises the new IDE, which includes the source editor, formatters, compiler, class browser, solution files (the C7 version of projects, but with far more capability), support for XP styles, and no doubt some other stuff I've overlooked. Although you can't open an App with this release of C7 you can certainly compile code from your C6 apps, with a little bit of work.
The alpha arrived in a 29 meg zip file containing a 30 meg C7 installer, a 200K Clarion 6 visual styles installer, and a readme file. The installer is powered by SetupBuilder, a truly wonderful product written in Clarion by LinderSoft. With the advent of Vista and its requirement for code-signed installers I predict SetupBuilder will become absolutely essential for any Clarion developer shipping software. SetupBuilder makes installing under Vista as painless as it can be. But that's a subject for another article...
The C7 install has been tested on Vista, I'm told, but as of yet I've only installed it on an XP machine. I expect to try it on Vista next week.
Figure 1 shows the start of the install process.

As with most programs these days, C7 installs by default under the Program Files directory.

Figure 3 shows the space requirements of 70 megs. I have a copy of SharpDevelop 2.0 on my system (C7 uses the C# IDE as a foundation) which only takes up about 20 megs.

I didn't time the actual installation but it went pretty quickly.


The Start Clarion 7 checkbox doesn't actually launch C7; instead it brings up the C7 Quick Start guide, which offers a few words of introduction and explains how to go about loading the IDE. The install program adds the following shortcuts to Start | Programs | Clarion (Alpha):

The Clarion Help file is still in a state of flux, as you would expect. It contains some information about C7 and Clarion.NET but there are very few screen shots of the new IDE, and many topics are only bookmarks so far. There is a whole new section for the Clarion.NET language reference including new compiler directives (NAMESPACE and USING), new simple data types (BOOL, CHAR, CLASTRING and CLADECIMAL), STRUCTs, ENUMs, DELEGATEs, TRY, CATCH, THROW, and a bunch of other stuff. More on that at a later date when Clarion.NET is available.
Unlike Clarion.NET, there isn't that much that's new for the Win32 Clarion language as of C7. A couple of old VBX properties are now deprecated (PROP:vbxfile, PROP:vbxname, and PROP:vbxEvent) and there are a few new properties to help support the new visual styles. Since the alpha does not include the AppGen, you make use of these new properties in C7 by generating your C6 code with the templates and source files applied by the C6 visual styles installer I mentioned above. From the help:
As an added feature to the initial release of Clarion 7, Clarion 6 has now included a special template interface designed to add powerful XP styles easily to your existing applications that you are planning to migrate to Clarion 7.
Projects in the initial release of Clarion 7 are first exported to an external project file from a Clarion 6 application, which is then imported and processed by the Clarion 7 IDE. Using this technique, the Extended UI interface is used to include special styles that Clarion 7 supports from inside your current Clarion 6 application. This includes XP Style Menus, MDI tab controls, and special enhancements for SHEET and TAB controls.
This Extended UI support will not affect your existing Clarion 6 applications. A special compiler flag detects that the code generated to support the styles you implement will only be incorporated into your Clarion 7 programs.
I'll go over the visual styles aspect of C7 in part two.
On my machine there was a delay of some seconds after I ran Clarion, and then the splash screen shown in Figure 7 appeared.

As Figure 7 demonstrates, Clarion 7 and Clarion.NET share exactly the same IDE, although Clarion.NET is not part of this release.
Figure 8 shows C7 as it appeared on my machine.

I maximized the IDE on a 1280x1024 monitor to get the IDE layout shown in Figure 9.

If you've used any of the mainstream IDEs such as Visual Studio then this layout won't seem too unfamiliar. Along the top you have the main menu and the toolbars. The central area is the working area where you'll see the source files, formatted windows and reports, and the like. On the left you have space for your project list and primary tools, and on the right space for more tools. Program output, bookmarks, search results and the like are kept along the bottom. As with other IDEs you can rearrange the panels to suit your needs, and there are several predefined layouts. If you mess up the layout badly you can always reset to the defaults.
Figure 10 shows the IDE with a window loaded in the structure designer (aka the window formatter).

It's a little hard to see in the downsized version of Figure 10, but on the left hand side you have a list of controls you can populate on the window, and on the right hand side you have a property editor.
Figure 11 shows the code view of the window in Figure 10.

Again, you can move the various pieces of the IDE around to suit your fancy. I don't know exactly how the Dictionary Editor and AppGen will fit into this scheme but I expect them to follow the same basic concept of a central workspace surrounded by supporting tools.
To give you a better idea of the breadth of the new IDE, here are screen shots of the drop down menus. Some items are grayed out simply because no appropriate file was loaded at the time.

Pretty basic stuff in the File menu. Note the ability to reload a file that may have been edited by another program.

The Edit menu has a nifty formatting submenu. I suggest you not use Sort Lines on the body of your source code. It is pretty nice for lists of simple variable declarations. On the other hand, if you do use it on your source code, you can always Undo. Yes, we finally have an editor with real, working, multi-level undo which seems to work flawlessly.
One thing I would like to see is a source code formatter that will indent misaligned code.

The View menu gives you access to the various toolboxes, although you can also reach these via the appropriate tabs and icons in the workspace. You can also use it to return to the start page.

The Project menu lets you run, debug, and manage projects. Clarion 7 uses solution files which allow for much more complex project setups than traditional project files.



C7's search capabilities far exceed anything in Clarion 6. I particularly like the ability to do Find All and bookmark all found items.

The new Clarion IDE is highly extensible, built as it is on the IDE licensed from SharpDevelop. And the SharpDevelop IDE is specifically designed to be extensible. This looks like fertile ground for third party developers.


The Help menu includes Microsoft's .NET API documentation and the Web submenu leads to web pages including SoftVelocity's blog site.
Not only has the IDE changed radically, so has Clarion's directory structure. The first directory level looks familiar, with bin, lib, libsrc, and template directories. But expand the whole directory tree, as in Figure 22, and you'll see something much different.

There are a number of XML configuration files buried in that directory tree, along with the various binary files that make up C7. As you can guess from the AddIns subdirectory the new IDE makes use of a number of pluggable products, none of which I've had a chance to explore yet. And there's plenty of room for more. C7 also uses XML for current configuration data; these files are stored under the Documents and Settings\Application Data\SoftVelocity\Clarion\7.0 directory and include such information as code folding settings for individual files, bookmarks, etc.
One thing you won't see in the directory tree in Figure 22 is the obj32 directory. That's because all compiled code is stored in a subdirectory under your application, much the same way as Visual Studio does it. This is a good move; although it means some duplication of standard object code, it also avoids recompiles whenever a compile setting for one app results in shared binaries which are incompatible with another app.
There's much more to cover, and in the next installment (which is also free access) I'll look in more detail at the new structure designer, which replaces the window and report formatters. In particular there are some very nice features there that will greatly ease the business of placing and moving controls. I'll also take a look at the process of converting a C6 application to run under C7 with visual styles.
David Harms is an independent software developer and the editor and publisher of Clarion Magazine. He is also co-author with Ross Santos of Developing Clarion for Windows Applications, published by SAMS (1995), and has written or co-written several Java books. David is a member of the American Society of Journalists and Authors (ASJA).
Copyright © 1999-2009 by CoveComm Inc. All Rights Reserved. Reproduction in any form without the express written consent of CoveComm Inc., except as described in the subscription agreement, is prohibited.
Clarion Magazine ISSN 1718-9942
One year: $159
(includes all back issues since '99)
Renewals from $109
Two years: $249
Renewals from $199