Category Archives: Clarion 7

Code Completion in the Embed Editor

There was much gnashing of teeth over the fact that the plain Embed Editor didn’t implement Code Completion – well now the next 7.1.x update implements Code Completion in the Embed Editor. We are also looking at adding the support for Code Folding, which as of today isn’t supported in the Embed Editor, and Clarion devs have asked that we also provide code folding for Control Statements such as IF, CASE, LOOP, etc. and we’re looking into this too.

In case you haven’t found this yet, you can define your own “folding regions” anywhere you like with this syntax:

!region SomeDescriptiveText
…….source code
!endregion

Check the Help file index for this topic: “Regions – Source Code” or just give it a try with the above syntax.

Product downloads and access to Internal builds

We’ve received some requests via email that have prompted us to start a new project this week; a secured website membership component. We have two goals to accomplish; first we’ll provide the ability to log in to our website and download products that you own, retrieve serial numbers for same, and get the newest updates to the Help files, and second you’ll be able to log in and have access to pre-release internal builds. We’ll make internal builds available for both Clarion 7 (Win32) and Clarion# (.Net). We have started the work on an implementation of a website membership project to be built on top of ASP.NET’s SQLmembership Provider with the UI built with AJAX. We’ll be using it to control the access to the product downloads and to the internal builds, and we’ll also be shipping the secured website membership component as source code with Clarion.Net (and of course we’ll be using it with the .Net App generator).

Access to internal builds will be open to anyone with a current subscription. Once the project is launched we’ll initially try to make internal builds available on a bi-weekly basis (weekly builds are also a possibility). You’ll have access to the change log, and if you see a fix or a feature become available that’s important to you – you’ll have the option to download the corresponding internal build. And by the way, if there happens to be a change to the RTL or compiler that would require your 3rd party tools be rebuilt (this is a fairly rare occurrence), it’ll be duly noted in the change log.

We’ll also be increasing the frequency of publishing maintenance releases (this too was requested in several emails), and we expect to make a new 7.1.x release available at the end of this week.

7.1 Pre-release on its way to you

Small adjustment to the release plan; we targeted the 7.1 release for today 12/18, but yesterday we fixed two bugs in the window library and the QA team requires 2 full days to redo the regression test suite. We realize there are a lot of folks very eager to get their hands on the new release, and rather then make you wait until late Monday or possibly Tuesday, we’re making 7.1 available today to all subscription holders as a “pre-release”. If no regressions are found the pre-release will in fact become the official release.

Another good reason for letting the release out today; all 3rd party blackbox products must be rebuilt with the 7.1 compiler, so this pre-release will give those vendors a headstart on doing so.

In another post I received a comment about this item in the release notes; “CHANGE: FILEs declared within a Procedure are now Private data to that Procedure”, and I promised to provide some further details about that change.

The linker has been improved in 7.1, whereas in every prior release going back to earliest Clarion compiler/linker, reporting of “duplicate symbol” by the linker was dependent upon the order of files in the link list. Meaning that the absence of “duplicate symbol” errors did not necessarily mean that all was OK. When this problem was exposed and fixed, it immediately uncovered two previously “hidden” problems in some of the libsrc code we ship, and exposed some problems in 3rd party products used in our regression testing, and we do expect that a few of you will find your own “hidden” problems when you rebuild with 7.1.

How about an example of the type of problem the 7.1 linker will now catch? OK.  Assume that there are 2 very different procedures but with the exact same public name in 2 different Member modules. Nothing can be done by the linker to allow them both, but the old linker could miss that error dependent upon the order of source files and presence of resource files in the link list. The solution for this type of error is easy, one of the procedures can be renamed, or the PRIVATE attribute could be added to their prototypes. In general, it’s better to use the PRIVATE attribute for all procedures and data objects local to a member module, unless they are exported or used in other modules.  If you do run into an unexpected duplicate symbol error, don’t panic, its easy to fix and will make for a better product.

We’ve taken your suggestions and your feature requests and delivered on them with 7.1; from the ultra-small things like changing toolbar icons, to the big things like the new functionality in the property grid, the new window previewer, automatic App saving and recovery functionality, Windows 7 manifest support in the linker/templates, a new Report Writer, ….. well its a very long list of improvements which I won’t repeat right now.

7.1 is a fantastic update; more reliable, more stable, and more fully-featured then any other Clarion release, and we’re sure you’ll love it.

Release update

The day before Thanksgiving I posted about the upcoming release of 7.1 (and the next update for Clarion.Net), and I wrote that we expected to make it within 2 weeks.  In that same post I mentioned we’d be closed for a long (for us) 4 day break over the holiday.  Well it seems some people took that 2 weeks literally to mean 14 consecutive days, and not the next 2 working weeks. Ahem, even our developers take a day off now and then… 🙂

We are in final closedown for the 7.1 release, we planned to have it ready by this Friday (and that would be within the 2 working weeks!), but there is a chance it’ll have to go out on the following week. Why?  Well there were a few “hot topics” brought to our attention last week and we decided to tackle 2 of them. So if you don’t get a notification of the 7.1 release this Friday, just relax over the weekend and look forward to getting 7.1 early next week. The same applies for the Clarion.Net release!

Here is what we’ve been working on these last 2 weeks, and indeed some of these items did consume a bit of extra time (the first 2 items were the “hot topics” I was referring to)

WORKAROUND: The OS could position some Menu items outside the screen boundary if there were sufficient number of items to cause a multi-column overflow
FEATURE: You can now set if the Copy Referenced Dlls to Output Directory defaults to On or Off via the Tools/Options/Clarion/General tab
FEATURE: The PRIVATE attribute is now allowed for TYPE declarations

CHANGE:  Better error message when an included project cannot be found during a make
CHANGE:  When you associate the C7 IDE with .app files, the .app files now get an appropriate icon displayed in Windows
CHANGE: FILEs declared within a Procedure are now Private data to that Procedure
CHANGE: Menu style now takes into account dimensions of particular item defined in MENU/MENUBAR declaration or set at run time (in latter case PROP:NoWidth and/or PROP:NoHeight must be set to FALSE)
CHANGE: Post a warning if window/report parser changed some control definition because a variable used as a attribute’s parameter does not exist anymore
CHANGE: Warning if PRIVATE and PROTECTED are used incorrectly
CHANGE: private queue types in abfile.clw are now marked private to take advantage of the updated clw compiler and reduce the number of duplicate symbols possible
CHANGE: renamed internal class used in the Query control QEIPManager to QueryQEIPManager because it was duplicated with the public method with the same name.

FIX:  %ApplicationExternalLibrary was returning the wrong value if you edited the project properties of an app, but did not set the model (ie left it at the default value of dll)
FIX:  An exception would be thrown by the data pad if you copied a field and then tried to paste it into an empty local data list
FIX:  Not all compilers were registered if you created a new C6 version
FIX:  The Data pad could throw an exception if you tried to add a Queue to local data
FIX: Aboop.tpw: Incorrect declaration of a variable for the return value was generated if the procedure return type in the prototype was ? or *?
FIX: Avoid auto-#RELEASE on emitting unconditional source lines
FIX: Setting of PROP:NoHeight and PROP:NoWidth properties for menu items worked not as documented.
FIX: Source Editor – Search/Replace would fail for various conditions
FIX: The ISAM file imports would not work if you had a file with a . in the name.

PTSS 32051: Suppress Windows internal repainting of the button upon changing its text
PTSS 33701: Clarioncl would some times fail to register templates if multiple /tr switches where supplied on the command line
PTSS 33804: Lookup table must be updated first before record validation
PTSS 34190: GROUP and OPTION controls cannot be selected themselves but they provide defaults for selected text and background colors to nested controls
PTSS 34226: Current build configuration was not being passed so the %ApplicationDebug symbol was not setup correctly
PTSS 34563: Show warning if WINDOW with TOOLBOX/DOCK/DOCKED attributes has the MDI attribute too
PTSS 34600: Changing of variable name in the Data Pad was not reflected in changes to attributes of WINDOW/REPORT controls using that variable as a parameter
PTSS 34605: The window previewer would not work with ENTRY controls that had @P or @K pictures
PTSS 34631: Designers might not be available in plain embed editor
PTSS 34643: Implementation of drawing of themed borders for RTF controls

32 bit ODBC in the 64-bit Operating System

Note: This blog was written by Robert Ricketts, who is a Senior Support Representative at SoftVelocity. If you have any questions, you can post them here or even email us at support AT softvelocity DOT com

Now, on to the article! 🙂

There has been quite a bit of confusion about using the 32 ODBC Administrator and 32 Bit ODBC drivers in 64 bit Operating Systems so I thought I would put together some information to help when using 32 bit ODBC drivers, such as the TopSpeed ODBC driver.

For 64 bit Operating Systems, there is a 64 bit and a 32 bit ODBC Source
Administrator.  Both actually have the same name (odbcad32.exe).

You can launch the Admin applet from the command line (or a Shortcut) so you get the 32-bit version of the ODBC configuration tool. The command line is as follows:

%WINDIR%SysWOW64odbcad32.exe

Microsoft stores the 32 bit odbcad32.exe in the syswow64 directory and the 64 bit odbcad32.exe in the system32 directory.

N.B. If you just run odbcad32.exe, Windows will actually run the 64-bit version because the default system path has system32 ahead of syswow64.

From: http://support.microsoft.com/kb/942976

System DSNs are stored in the following registry subkey:
HKEY_LOCAL_MACHINESoftwareODBCODBC.INI

Registry redirection is enabled for this registry subkey. Therefore, system
DSNs for 32-bit drivers and for 64-bit drivers are separated. The 64-bit ODBC Administrator tool does not display the system DSNs that are created by the 32-bit ODBC Administrator tool or that use 32-bit drivers and visa versa.

User DSNs are stored in the following registry subkey:
HKEY_CURRENT_USERSoftwareODBCODBC.INI

Registry redirection is not enabled for this registry subkey. Therefore, both
ODBC Administrator tools display all user DSNs.

Regarding the DotNet Framework

In order to use the TPS ODBC driver from .NET you will need to use the .NET Framework Provider for ODBC.

If you see no reference to the .Net Framework Provider for ODBC, this is
available as a free download from:

http://www.microsoft.com/downloads

Search for “ODBC .Net Data Provider” to download and install the .Net Framework Provider for ODBC.

Clarion 7 – Window Previewer

Just wanted to point out one of the nice benefits you’ll have (soon) when working with the new Window Previewer.  We’ve mentioned before that the new previewer is actually a live running program.  Your window structure is generated into a tiny program, compiled and executed.  This of course means that you get an exact representation of the window.  The preview of the window uses your current setting within the Designer for “Use Visual Styles”. In other words if you toggle “Use Visual Styles” to ON, then you get a themed window displayed, and if you toggle it OFF, then no manifest is linked in, and hence no visual styled controls are used.  That’s very convenient, but even more so when you consider that you can open multiple “previews” of your window (simultaneously).   That means you can instantly compare windows side-by-side with theme applied and without.  Not only that, but as I imagine has occurred to you already, it also means you can make changes to the window layout, and instantly preview the changes side-by-side, to determine which layout works best for you. Here’s a screen shot showing exactly that (and yes the COM object is live during the preview):

preview with and w/out themed controls
preview with and w/out themed controls

Additionally, during Preview mode your window displays user-defined data based upon the type of control. The actual data that is displayed is defined by the content of the .winprev files.


r.zaunere

What’s new in Clarion 7.1?

As we are working hard to closing the next and greatest release of Clarion, I wanted to share with you my presentation at the 2009 Aussie DevCon and present to you a quick summary of features to look forward to in the days to come.

IDE

New Windows 7 manifest support, built into the application’s template support.

Expanded support and customization for the Command Line Interface Utility (ClarionCL). You can now build and run applications and convert dictionaries from outside the IDE.

The “Most Recent” list is now preserved even if the IDE crashes and if you have multiple copies of the IDE open, the Most Recent list will show the most recent from all copies of the IDE

You can specify dictionary (DCT) files are automatically imported and exported to text format. The Tools/Options/General/Binary File auto-export/import dialog allows you to configure this.

New Subversion support:
Subversion options can be accessed via the context (popup) menu for solution items

Subversion options can be accessed via the context menu for Clarion for Windows projects

Subversion features of the IDE will use the text representation of a dictionary rather than the actual dictionary (DCT) if the dictionary is registered to auto import/export.

Application Generator

Window and Report tab controls have been replaced by Buttons. Additional ellipsis buttons added to call the Window or Report Editor to view source.

If you press either the Window or Report buttons on the main application tree, you now return to the application tree when you have finished using the formatter.

New Save and Exit button added to Application Tree. This distinguishes the Save and Closing of the Application Generator from other dialogs.

New Application Option to control the size of the recovery file before an AutoSave occurs.

New and improved Window Preview option built into the Structure Designer, with advanced data configuration options!

You can now set the tab style that the Window Previewer will use via the Tools > Options > Clarion > Window Previewer panel.

New and improved Expression Editor interface!

You can now open multiple solutions that access the same dictionary in multiple instances of the IDE.

Class Browser

New option in Class Browser Settings that allows to show/hide entities from included files. Class Browser Settings is a dropdown button on the Class Browser toolbar, and the new option is located at the bottom of the dropdown menu. Objects from included files are hidden by default.

Database Browser

New toolbar button and right-click support to specify picture token, heading and justification.

Data/Tables Pad

Ability added to copy field definitions from source code and paste them into either the Data / Tables Pad or the Dictionary Editor. When copying and pasting the details of a field that has an initial value from the Dictionary Editor or the Data / Tables Pad, the definition now includes the default value where possible.

Data/Tables Pad now has Expand All/Contract All buttons.

When a group or queue has focus in the dictionary editor or data pad, you can now add a field to the start of the group/queue, to the end of the group/queue or after the group/queue using either the context menu, the INSERT key, or the drop down list on the add button on the toolbar.

Dictionary Editor

TopSpeed Driver String Builder dialog now includes support for the TopSpeed Enhanced Encryption Support driver strings.

Support for alternate field and blob names for SQL drivers for specific SELECT, UPDATE, and INSERT clauses.

The driver string builder for ODBC based drivers now allows you to set the ZERODATE switch to any date value.

Dictionary Synchronizer

Improved support for handling Microsoft SQL Server 2008 data types.

You can now set the ODBC Catalog and Schema when importing/synchronizing tables from an ODBC data source.

Language Changes

New PROP:TextLeftMargin and PROP:TextRightMargin properties for ENTRY, SPIN, COMBO, TEXT, RTF controls and for drop-down list-boxes

PROP:LastChanceHook SYSTEM property.

SETEXITCODE and GETEXITCODE built-in functions to set/query program’s exit code (error level) without the necessity to immediately close the program.

New MSGMODE:FIXEDFONT flag in the last parameter of the MESSAGE function to show message text using the fixed-pitch font

Two new built-in functions FREEZE/UNFREEZE with the purpose of reducing flicker in some situations.

New conditional operator support added to the OMIT and COMPILE directives.

New PROPLIST equate (LISTZONE:GroupHeader) used to determine if the mouse is clicked or moved inside the list box header, but outside of the field part of the header. This change has been used to provide better highlighting of themed list box headers.

 

Template Language

New support for pre and post build events using the #PROJECT statement

New PASCAL attribute for the #RUNDLL statement. The WIN32 attribute is now deprecated and ignored.
More to come this week!

A Whale of a Time!

I woke up this morning and suddenly realized that in two weeks I will be flying back to Eden in New South Wales for the 2009 Aussie Devcon!

I can’t wait to get back there and feel honored to showing you what we’ve been cooking over the last few months.

If you haven’t booked your seat at the conference yet, please visit the Aussie DevCon web site and reserve your place, as the time is fast approaching.  Here is the link to get started:

http://clarion.net.au/

You’ve got to be there! The progress and maturity of both Clarion 7 and the Clarion.NET products have been significant and dramatic in many areas since last year’s Aussie DevCon. Last year, Clarion 7 was in beta, and the Application Generator was still in its early stages. Today, we are just around the corner for Clarion 7.1, and the Application Generator is better than it’s ever been, including our past versions. I will be using Clarion 7.1 exclusively during the training and conference, and we hope that all of you will have it by then as well.

The training this year is titled “Exceptional Development Techniques in Clarion 7 and Clarion.NET”

With the many months of working with Clarion 7, I will be covering many topics that have been of major interest to our developers. One of the topics will be an in-depth look at the C7 Project System and leveraging it for maximum productivity for your single and multi-application projects.

Of course, I will be highlighting Version 7.1, and all of the new features and changes in it. We will be exploring the heart of application development with an in depth look at the Dictionary Editor and Application Generator, and explore development techniques and solutions via the template and embeds that you may have missed.

I will also be giving you a first look at the new ReportWriter, and hopefully you will see why I am so excited about this new addition to Clarion 7 and Clarion.NET.

Many of you have an interest in the triumverat of add-on products for Clarion 7, the In-Memory, Dynamic File, and Internet Protocol drivers, and we will devote a section of training to using these products in your development solutions.

I could go on, but see the full training and conference schedule for yourself at the following link:

http://clarion.net.au/index.php?option=com_content&task=view&id=33&Itemid=35

My colleague, Pierre Tremblay, will also be a presenter at the conference and training. Pierre has been using Clarion for almost as many years as I have, and his experience with .NET development has given him a powerful perspective and vision in presenting the latest Clarion.NET IDE.

 

Here are some comments from Pierre, and what he has planned for the conference and training.

Aussie Devcon 2009 is a real excitement for me! I have the privilege of presenting Clarion.NET WinForm and WebForm related topics during the conference and training.

Here are highlights of what we will discuss.

Regarding Clarion.NET and Winforms, we will talk about what is a WinForm application and look at the most popular controls used to build the user interface.  We will also talk about the Clarion.NET language and explore events, delegates, interfaces and look at examples using them. We tend to associate events with a user interface, but events in Clarion.NET are a different paradigm, and we will examine an example of that.

Speaking of user interfaces, we will also discover the benefits of using a UserControl in a WinForm application.

We will also discuss data binding. When you hear “data binding”, we often associate “data” with “database”, but you will see that data in data binding is different and much more generic.

We will look at the building blocks of ADO.NET. This includes a look at Datasets, DataTables and the role of the DataTableAdapter.

On the ASP.NET side of my presentation and training, we will first get in touch with AJAX. We will understand why most new projects involving ASP.NET those days involves AJAX. AJAX is so popular that it is now a built-in assembly in the 3.5 .NET  Framework.

We will explore ASP.NET master and content pages to see how we can develop a standard look and feel in our web applications.

We will also examine WebServices, how to create them and how to consume them.

Finally, there is a segment showing how to incorporate a 3rd party control library in the IDE. We will explore the steps to achieve that and we will also look at how we can create a QuickStart template that automatically includes the new library.

Our CEO, Robert Zaunere, will also be back for this year’s conference. Robert has some very exciting news and information to present at the conference. At the forefront is the first look at the Code Generation model for Clarion.NET. He will explain the architecture of the new templates, as well as demonstrate the application generation process. Another topic that he will be presenting is the new Clarion support for LINQ (Language-Integrated Queries).

***********************************

If that’s not enough, some of you might wonder why the conference was scheduled in October this year instead of the previous May. The answer is that the conference is being held right in the middle of Whale Watching season. Geoff Spillane has organized a very special Whale Watching Cruise for the morning of Friday 16th October. For those who attend both Training and Convention (the full 7 days) they will qualify for participation in the cruise for free. How cool is that?

***********************************

So hpefully now you know why Pierre and I are excited about Aussie DevCon 2009. Come and see what a great product Clarion 7 and Clarion.NET really is, and even greater are some of the developers that will be there. I am looking forward to meeting some of you for the first time, and for the warm reunion ahead for those of you that I met last year.

We hope to see all of you there!

New Properties for 7.1

Three new properties:

PROP:TextLeftMargin and PROP:TextRightMargin

The PROP:TextLeftMargin, PROP:TextRightMargin properties get or set the value of left and right margins for text in ENTRY, SPIN, COMBO, TEXT, RTF controls and in drop-down LIST controls.  The problem we had was that the old (pre-C7) fixed margin of 2 pixels wasn’t always correct for some of the newer fonts and font sizes.  The original C7 implementation calculated margin values based upon the control’s type, its font, and where the control is placed; in a WINDOW or REPORT, and some additional aspects.  However the new default margins could be incorrect in some specific situations like one which was described in the PTSS where large font sizes were not displayed correctly in a Entry control.  These two new properties allow you to justify margins in all cases, and they allow you to set different values for the left and right margins.

Syntax:

?control {PROP:TextLeftMargin} = n
?control {PROP:TextRightMargin} = n

Where, n is an integer constant or expression greater or equal to 0.  It sets the margin using the current units of the WINDOW or REPORT that owns the the control.
Negative values are treated as follows:
a value of -1 : the RTL uses the Windows default margin value which is dependent upon the control’s font
for all other negative values :  the RTL uses the C7 default margin value which is very close to Windows default value but takes into account some additional aspects such as the control type

PROP:LastChanceHook

This is a new write-only SYSTEM property which allows you to specify the hook function invoked if an exception has occurred. The hook function allows you to display
information about the exception and choose an action:

  • continue execution of the thread where exception occurred (if the exception isn’t fatal)
  • stop the thread (or entire process if the exception occurred in the main process thread) without invoking the RTL exception handler
  • execute the RTL exception handler

The RTL exception handler allows you to show information about the exception and asks for an action, possible actions:

  • stop the thread where exception occurred
  • stop the entire process
  • invoke the system debugger
  • generate a debug event if the program is already running under debugger

The implementation provides a far more intelligent way for handling program termination in case of some abnormal behavior then the existing ‘Do you want to GPF?” message.  It also allows you to set the exit code (error level) returned by the program to the OS upon program termination without the necessity to terminate the program immediately.

Summary; this allows end users to avoid having to terminate an entire program if some error occurred in one of its threads.