First Look: Clarion 7 Alpha, Part 2

by Dave Harms

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.

Porting to C7

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
\libsrc\menustyle.clw
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:

  1. Generate the source for your C6 app
  2. Use the File|Export Project File command to export a .PRJ file from your C6 app.
  3. Open the PRJ in Clarion 7. Clarion creates a new solution file.
  4. Build and run

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.

The Graph example

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.

Figure 1. The global App Settings tab

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

Figure 2. Extended UI options

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 3. C7-compiled app with extended UI enabled

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

Figure 4. C7 XP-style menus

For comparison, Figure 5 shows the original C6 app.

Figure 5. The C6 version

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.

Figure 6. Menus in C6
Figure 7. Menus in C7

Compiling with multiple versions of Clarion

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).

Figure 8. Project options, Compiling tab

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.

That's not all, folks

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.

Stay tuned.

 


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).

Printer-friendly version

Reader Comments

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?

Thanks
Loren Gregg LaBaw

 

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.

As noted in the article, this is a temporary situation only. It's there simply to allow alpha testers to fully test their apps against the C7 RTL.

Dave

 

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?

Thanks
Loren Gregg LaBaw

 

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?

Dave

 

Posted on Wednesday, February 28, 2007 by douglas johnson

David,

> Open the PRJ in Clarion 7.
> Clarion creates a new solution file

Does this indicate C7 has adopted a solution concept similar to  Visual Studio - ie a solution contains many projects?
If so, does C7 essentially contain a solution compile manager?


 

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.

Dave

 

Posted on Wednesday, February 28, 2007 by Dave Harms

Douglas,

Correct, in fact the C7 project system is built on top of MS Build.

 

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?

Robert

 

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...

So I hope C7 gives you the option to globally allow a 3D look by default without having to fiddle around!

 

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.

Dave

 

Posted on Thursday, March 01, 2007 by Dave Harms

Geoff, no idea but I'll bring it up.

Dave

 

Posted on Thursday, March 01, 2007 by Arnor Baldvinsson

Geoff,

This is the XP Theme style.  You can use it or you can use the old classic style.  This same applies to C6 apps that use XP Theme from PowerOffice, see for example http://www.vordur.com/images/Screenshot-Owners-Form_big.png

Arnor

 

Posted on Thursday, March 01, 2007 by Gưnter Siegismund

Hello Dave,

we are working with Clarion 6.1 Build 9034.
Our software is heavily built on the function EVALUATE in Clarion.
In the above version of Clarion I can bind a procedure with for example two parameters and the users of our software can use this function with one or two parameters.
Both is valid.
In future version of Clarion this has changed.
Now it is only possible to use a bound function with exact the same number of parameters as programmed.
Can you tell me, whether this has changed in Clarion 7?
If necessary I can send you a little app file to demonstrate this.

Regards

Gưnter Siegismund

 

Posted on Thursday, March 01, 2007 by Dave Harms

Gưnter, see your email.

Dave

 

Posted on Friday, March 02, 2007 by Dave Harms

Gưnter - email sent again.

 

Posted on Friday, March 02, 2007 by Kevin Jackson

Hi,

A really quick question I hope, are disabled icons on buttons rendered any better than under C6 (which is I know is SWB, but it's not very attractive).

Best Regards,

Kevin.

 

Posted on Friday, March 02, 2007 by Dave Harms

Kevin, looks the same in C7.

Dave

 

Posted on Saturday, March 03, 2007 by Stephen Ryan

Gưnter

the evaluate problem in clarion 6.1 was corrected becuase some technical person decided that evaluate had to work properly as documented.

you will need to process the instructions before they are executed in bulk where ever you have stored them.

we developed a solution for this, create a recursive token parser and build up your statement by the open and close brackets, when you have a word create a new object for each word, count your brackets, you will have to do a replace parameters, its not hard.

steve ryan

  

 

Posted on Sunday, March 04, 2007 by Gưnter Siegismund

Hello Steve,

Thank you for your comment.
I fear, this has to be the way to go.
Any chance to see your solution?

Cheers
Gưnter.

 

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."

Thanks Arnor, I am pleased.

Also Dave: I really like the new format for the displaying of comments!

Cheers

Geoff R

 

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,

I believe Bob Z has stated that C7 will keep up with the #dev releases. IOW they haven't forked the #dev code into their own version.

It appears that the current alpha is based on 2.1 but I don't know that for a fact.

Dave

 

Posted on Wednesday, March 07, 2007 by Ben Williams

Dave,

Reading the features on SharpDevelop 2.1 it looks like only .net framework 1.1 is supported is this true?

We haven't used .net framework 1.1 for awhile and with vista using .net framework 3.0 how long before they change frameworks?

Does this mean Clarion.Net will be .net framework 1.1?
Also we use FxCop now for checking all .net development and this is supported in SharpDevelop 2.1 will Clarion.Net applications be able to use this tool? (I know this is a SoftVelocity question but I thought you could get a quicker answer than me.)

Thanks,
Ben

 

Posted on Wednesday, March 07, 2007 by Dave Harms

Ben,

I think you may have misread the #dev docs. 2.1 requires .NET 2.0 but supports 1.1. About a year ago SV moved their code base to .NET 2.0 as well.

Dave

 

Posted on Friday, March 09, 2007 by Stephen Ryan

To : Gunter

Re: Evaluate.

Our solution is for a commercial product so its simple sensitive. In fact its simple nature is its secret.

how ever it will be incorporated into the Expert Template Report designer Wizard which by the way will be free under clarion 6.3.

Now this is a huge product but you can use the solution as a template script so all your scripts could be processed using this technology.

We are releasing the script checking technology as an addin to the script wizard so you can us it with that.

i may have time to create a DLL of it later next week.

i will place it on our site.

i will post it in the new groups.

token parsing like this is best done in c as clarions memory management does not return freed memory to the OS.

in fact a lot of clarion code might run a little slower under DOT NET but be better managed in terms of memory. So our token parser might also be very well performed onced ported to DOT NET clarion or Csharp.

Steve Ryan

 

Posted on Saturday, March 10, 2007 by Stephen Ryan

To : Gunter

send me an email and i will email you our solution when i have reworked an open example.

steve

my email

stephenryan@paradise.net.nz

To add a comment to this article you must log in.