![]() |
|
Published 2007-02-28 Printer-friendly version
In Part 1 I gave an overview (a very brief overview) of the new Clarion IDE; in this second part I'll focus on the differences you can expect in the Clarion applications you produce, as well as touch on one or two IDE issues.
C7 Alpha Phase 1 doesn't include the AppGen (that's slated for Phase 4) but that doesn't mean you can't use AppGen with C7. The trick is to generate C7 code with C6, then use C7 to handle the compile.
The Alpha release comes with a small install program which lets you apply the C7 visual styles code to your C6 applications. The installer adds or modifies the following files:
| File |
Changes |
\libsrc\cwint.clw |
new file, adds various INTERFACEs
and EQUATE definitions for menu styles |
\libsrc\menustyle.inc |
New MenuStyleManager class to manage
menu appearance |
\template\abchain.tpl |
ABC global options |
\template\abprocs.tpw |
ABC app frame changes |
\template\abwindow.tpw |
ABC window prompt changes |
\template\cw.tpl |
Legacy global options |
\template\frame.tpw |
Legacy app frame changes |
\template\standard.tpw |
Legacy window prompt changes |
All of the C7-only code is contained in conditional compile statements so it will only be included by the compiler if you're actually using C7. That leaves C6 apps essentially unchanged.
The process is simple:
PRJs are simply text files containing the project data. This information is contained inside APP files, and normally the only time you use a PRJ is if you have a hand coded application. So essentially you're treating your C6 like a hand coded C7 app, except that you're still generating your code in C6. Obviously this means that if you add a new module to your application, or otherwise change the project data, you'll need to re-export before compiling in C7. It also means that if you already have a hand coded app you can compile it in C7 as well (although it will be that much harder for you to duplicate the new UI features as you'll have to hand code them).
Of course this process will be moot once the AppGen arrives, but it's still a technique to keep in mind. For instance, if you're trying to track down a GPF or other bug you could create a PRJ and modify your generated source until you find the error, then fix the error in the app and regenerate.
To test out the C7 compiler and the new UI features I loaded up the graph example (svgexam.app) from the Clarion examples directory. Figure 1 shows the App Settings tab (in C6, of course, with the C7-compatible extensions) in the Global Properties sheet.

Clicking on the Extended UI button displays the Extended UI options in Figure 2.

There are a number of options available, and these can also be set at runtime as they're all implemented with the property syntax. The Color type setting applies to XP-style menus with the color gradient, and there are a number of options.
MDI tabs, as you'll see below, are a tab equivalent to the open window list. Every time you open an MDI window you'll see a new tab on the frame, and you can choose several styles, including Default, B&W, Colored, Squared, and Boxed. I've set the tab style to Default for both MDI and regular sheets. The same tab options are available for all sheets, and the last setting specifies the default for the app. You can override these on the individual sheet controls.
The only other thing you might need to do with an app is make sure the main menubar has a field equate. The graph example already does, but I also tried the School example and it needed a menubar field equate.
I saved my changes and generated all the source code. I then ran C7 and opened the PRJ file. C7 automatically created a same-named solution file, all in the svgexam directory.
I hit the Make/Run button and C7 compiled the app in roughly half the time it took C6. SV is saying that code generation time is also dramatically improved, so take your coffee breaks now while you still can.
Figure 3 shows the C7-compiled app with the new styles, including the MDI tab. Note also the new default Clarion icon.

Figure 4 shows the XP-style menu detail (and some colored tabs in the background, just for fun).

For comparison, Figure 5 shows the original C6 app.

As you can see the C6 app doesn't have any styles, with the very odd exception of the vertical scroll bar. That's particularly strange because I also see it on a C6 app which as far as I know has no manifest. In any case, the C7 version of the same app appears (to my untrained eye) fully themed/styled/coiffed/whatever.
I took some flak from other alpha testers who thought the screenshot in Figure 4 wasn't an adequate demonstration of how nice a C7 app can look. And they're right. But it is a decent example of the new UI features as they appear out of the box.
Some of the alpha testers have successfully converted fairly large, multi-DLL applications to C7 without difficulty, so it doesn't appear that there are any significant runtime issues associated with the migration to C7. That makes sense as the RTL changes mainly involve the addition of the new extended UI features.
Figures 6 and 7 show another before/after comparison. The alpha tester who supplied these images points out that C7 fixed a problem with icon sizing in the menus.


One of the much-touted features of the C7 IDE is its ability to work with previous versions of Clarion. In Alpha Phase 1 this means support for various Clarion compilers. I have both 5.5 and 6.3 installed on my development machine and the install program detected both versions and added them to the IDE (you can also add Clarion versions manually).
To compile code using an earlier compiler I select the version from the project options Compiling tab (Figure 8).

I tested the multi-version support by compiling some C6 apps in C7, using the C6 compiler, and it worked like a charm.
There's a nice new feature in the C7 project system which is obscured by the Clarion Version drop down. It's a checkbox for Copy Core Dlls to Target. If you check this, the IDE copies all the core Clarion DLLs used by your app to the directory where your EXE is generated. That means you don't have to have every version of Clarion on your system on the path, and it greatly reduces the likelihood of DLL clashes.
It's taken me a lot longer than I expected to get this article done. It's not that I ran into bugs - there are surprisingly few. It's just that every time I started to write about some aspect of the new IDE I found another interesting avenue to explore. I haven't even begun to touch on the IDE's configurability, the AddIn Manager, the Component Inspector, multi-language support, search/replace, the RegEx toolkit, bookmarks, editor options, the structure (window,report) formatters, the property view, and a bunch of other stuff.
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).
|
Posted on Wednesday, February 28, 2007 by Loren Gregg LaBaw Just a quick question. In the C7.A1 you have, is it possible to use the C6 appgen from the C7 IDE?
Posted on Wednesday, February 28, 2007 by Dave Harms No, the C6 IDE is completely separate. But it's very easy to make a change in C6, generate, and switch to C7 and hit the compile button.
Posted on Wednesday, February 28, 2007 by Rakesh Khatri Does C7 resolve ClearType font display issue? Posted on Wednesday, February 28, 2007 by Loren Gregg LaBaw Just a quick question. In the C7.A1 you have, is it possible to use the C6 appgen from the C7 IDE?
Posted on Wednesday, February 28, 2007 by Dave Harms I'm not familiar with the ClearType issue, but I've enabled ClearType on my display. What do I need to do to test?
Posted on Wednesday, February 28, 2007 by douglas johnson David,
Posted on Wednesday, February 28, 2007 by Rakesh Khatri Dave - On any Entry Control/Field - change the default font to TAHOMA. For comparision purpose, kept one field with default font. Compile, Run and see if data display correctly. Posted on Wednesday, February 28, 2007 by Dave Harms Rakesh - the bug is present in the C7 RTL. I've filed a bug report with an example.
Posted on Wednesday, February 28, 2007 by Dave Harms Douglas,
Posted on Wednesday, February 28, 2007 by Robert Johnson I seem to remember once that we would be able to open projects in say 5.5 and 6 at the same time.. Is that still going to be a possiblilty?
Posted on Wednesday, February 28, 2007 by Geoff Robinson Comparing the C7 entry form in Figure 3 to the C6 version in Figure 5, am I the only person who thinks that the C7 version is a really backwards step? The C6 version is bevelled (or "beveled" to those of you in north America) or 3D whereas the new C7 version is flat 2D and takes me back almost 20 years to the look of Windows 2. I know these things are just fashion (the width of ties and trouser legs go in and out in cyclic fashion) but really the flat look doesn't do it for me...
Posted on Thursday, March 01, 2007 by Dave Harms Robert, you can run multiple copies of the IDE so yes, AFAIK you will be able to have different apps in different versions up at the same time. You can do it with PRJs now. But you only have one project open at a time in any one instance of the IDE.
Posted on Thursday, March 01, 2007 by Dave Harms Geoff, no idea but I'll bring it up.
Posted on Thursday, March 01, 2007 by Arnor Baldvinsson Geoff,
Posted on Thursday, March 01, 2007 by Gưnter Siegismund Hello Dave,
Posted on Thursday, March 01, 2007 by Dave Harms Gưnter, see your email.
Posted on Friday, March 02, 2007 by Dave Harms Gưnter - email sent again. Posted on Friday, March 02, 2007 by Kevin Jackson Hi,
Posted on Friday, March 02, 2007 by Dave Harms Kevin, looks the same in C7.
Posted on Saturday, March 03, 2007 by Stephen Ryan Gưnter
Posted on Sunday, March 04, 2007 by Gưnter Siegismund Hello Steve,
Posted on Monday, March 05, 2007 by Geoff Robinson "This is the XP Theme style. You can use it or you can use the old classic style."
Posted on Tuesday, March 06, 2007 by Dave Harms Thanks, Geoff! Posted on Tuesday, March 06, 2007 by Ben Williams What version of the SharpDevelop IDE was used for C7? Posted on Wednesday, March 07, 2007 by Dave Harms Ben,
Posted on Wednesday, March 07, 2007 by Ben Williams Dave,
Posted on Wednesday, March 07, 2007 by Dave Harms Ben,
Posted on Friday, March 09, 2007 by Stephen Ryan To : Gunter
Posted on Saturday, March 10, 2007 by Stephen Ryan To : Gunter
|
To add a comment to this article you must log in.
Copyright © 1999-2008 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
(reg $189, save $30)
(includes all back issues since '99)
Renewals from $109
Two years: $249
(reg $289, save $40)
Renewals from $199