Category Archives: Clarion News

Changes to Template built-in symbols in C9

As part of the ongoing work and evolution of the Win32 AppGen, and based on numerous requests the following template symbols are now built-in (as opposed to defined at the template level):

%Parameters – single, dependent from %Procedure
The full list of a procedure’s formal parameters separated by commas and enclosed in parentheses unless empty

%ProcedureParameterName – multi,  dependent from %Procedure
The list of names of all formal parameters as entered in %Parameters symbols; if missing then the name of that parameter as in %Prototype symbol is returned; if that is missing too, an AppGen generated name is returned

%ProcedureParameterOrigName – single, dependent from %ProcedureParameterName
The name of the parameter as entered in the %Prototype symbol

%ProcedureParameterType – single, dependent from %ProcedureParameterName
The type of the parameter as entered in the %Prototype symbol (without the CONST keyword and square brackets for array types)

%ProcedureParameterDefault – single, dependent from %ProcedureParameterName
The default value of parameters as entered in the %Prototype symbol

%ProcedureParameterOmitted – single, dependent from %ProcedureParameterName
Returns %True if the parameter is declared as omittable in the %Prototype symbol

%ProcedureParameterByReference  – single, dependent from %ProcedureParameterName
Returns %True if the parameter’s type is declared with leading * in the %Prototype symbol

%ProcedureParameterConstant – single, dependent from %ProcedureParameterName
Returns %True if the parameter’s type is declared with the CONST keyword in the %Prototype symbol

And a new built-in symbol has been introduced into C9:

 %ProcedureParameterDIMs – single, dependent from %ProcedureParameterName
Returns the number of dimensions if the parameter’s type is declared as an array in the %Prototype symbol (1 for [] , 2 for [,] , etc.)

The updated Application Generator reads TXA files produced by earlier Clarion versions. TXA files produced by the C9 AppGen can’t be read by previous versions.

These changes will be useful to all who write templates, but will benefit everyone and the visual change you’ll all immediately see is

ProtoParam-C9

ProtoParam-C8

 

In C8 the Parameters entry field is located inside the Procedure’s Actions dialog, whereas in C9 they are now moved to the Procedure Properties main dialog.

Clarion-H5

The options to provide access to your Clarion program on non-PC devices now range from using RDP products, creating pure Web apps, or with @Thin or ClarioNet. And we’re going to be offering some more options for Clarion9 and Clarion.Net.

web-mobi

Today I’m writing about a new product (internally named H5 Builder). H5 is a blend of the best features of Internet Connect (IC) and Web Builder (WB), joined with the jQuery family and HTML5/CSS. Both IC and WB were products ahead of their time. As an example IC was using an async data packet methodology to refresh client side pages before technologies like Ajax were on the drawing board. With the addition of a global template both IC and WB allowed Clarion apps to run over the internet without (hardly) any work at all from the developer.  Drop in the template, remake the app, and deploy. However, they both had the same limitations; difficult (or impossible) to work with the web UI presentation to fit within existing web sites, and they required IIS experience.  They also weren’t positioned properly.  Developers who tried to use either product to create a “web site”, or create a web app that needed to scale to 100’s-1000’s of simultaneous users found neither could meet their requirements.

Flash forward to today and H5.  The intended use for H5 is not to create a “web site”, nor to create a highly scalable web app.  Instead H5 is positioned to make it dirt simple to make your app available as a private web app for a given business/enterprise via a web browser, whether that’s on a PC or on a smartphone/tablet. And it’s built upon today’s standards for the web; HTML5, CSS3, and JavaScript. These standards are open, secure, and efficient, and they allow developers and web designers to create apps that look modern, can fit into existing sites (sharing CSS styles) and can run on modern devices like phones and tablets.

H5 apps use the jQuery library, either jQuery UI or jQuery Mobile (UI), and JSON for updating client side data without a full page refresh.  They run under the AppBroker SE, so you just install the service and deploy — no IIS knowledge required.

The use of the jQuery family of technologies will be shared with Clarion.Net.  So becoming proficient with one group of technology will lead to being able to create web apps, mobile apps, native apps and hybrid apps.

New C8 update is on its way

A new update is going out today for Clarion 8 so keep a watch on your email for download instructions. There are improvements, fixes and changes across the board; from the IDE itself, template updates, driver fixes, and more, including code to resolve selection of really long (mostly identical) printer names.

News (short version)

I was working on a much longer post when I was alerted that if I didn’t post something (anything) real soon, then some heads were going to explode 🙂 —
so here is the shortest version I could quickly come up with, and I’ll follow with several small-ish posts.

On the Win32 side:
Expect a new release of Clarion8 out this week – possibly later today if all goes according to plan. Clarion9 is getting close to where we’ll release it to
an initial group of alpha testers, that being a precursor to widespread beta and official release.

On the .Net side
Clarion.Net is being updated to .Net 4.x compatibility, while still maintaining support for earlier .Net versions. It seems most of our developers are strongly interested in more capabilities to share code between .Net and Win32, and we’re working on further improvements in that area (we already support a builtin system for exposing .Net assemblies to Win32). With the push towards mobile and tablets, we’re working on templates that can address that very real need.

As we all know MS has an established history of pushing a new technology as the next “big thing” and then sweeping it under the rug a few years later. We don’t know if Microsoft will back off its Windows 8 strategy in the near future, or a few years down the road (like Zune and Silverlight). But after following MS down the path of WebForms, WinForms and Compact Forms only to have them mostly killed by MS, we’re avidly avoiding the MS trail of dead technology.

So in closing I want to suggest that jQuery, jQuery UI and jQuery Mobile(touch-optimized version of the jQuery framework) for smartphones and tablets will allow you to create a single app that can run on all popular smartphone and tablet devices (and desktop platforms). jQuery supports iOs, Android, Windows Phone, BlackBerry, Symbian, Palm webOS and other devices. So how does that fit into Clarion.Net and Clarion Win32? Well I’ll have to explain that in a separate post.

SQLite and the new ABC SQLexecutor

Clarion 9 introduces a new driver for working with SQLite databases.  SQLite is one of the most widely deployed databases in use today. SQLite databases are widely used on both iOS and Android tablets and cell phones.  SQLite databases are useful in any situations where simplicity of administration and easy maintenance are more important than scalability.

The driver introduces a new prop; PROP:CreateDB. PROP:CreateDB is a command property that tells the SQL driver to create the SQLite physical database file that is specified in the OWNER attribute of the file. If the database file already exists, this command does nothing.  The existing database file will not be destroyed.

The CREATE statement converts Clarion data types to SQLite Data types using the following table:

Clarion Data Type SQLite Data Type
STRING CHAR
CSTRING VARCHAR
STRING(8);GROUP OVER(STRING);DATE;TIME DATETIME
DATE DATE
PDECIMAL NUMBER
DECIMAL NUMBER
BYTE TINYINT
SHORT SMALLINT
LONG INTEGER
SREAL FLOAT
REAL REAL
BLOB CLOB
BLOB,BINARY BLOB

However Clarion 9 introduces new ABC support so that you can easily deploy and execute SQL scripts. For example a create script like below;
CREATE TABLE Courses(
Number INTEGER,
Description CHAR(40),
CompleteDescription CLOB,
CONSTRAINT KeyNumber PRIMARY KEY (Number));
CREATE INDEX KeyDescription ON Courses(Description);

The new class executes SQL code as a series of commands separated by an end of statement marker which you specify.  Any errors encountered executing the script are reported using the passed error handler. In short, you provide an external file that contains your SQL script and its parsed and executed.  The SQL code isn’t limited to just Create and Alter database scenarios, you can execute any valid SQL code. And of course the new ABC SQL script support is applicable across any Driver and SQL backend.

Clarion 9 – Touch-enabled

Gartner is estimating that there will be 13 million enterprise tablet purchases next year, and 53 million by 2016. They predict that Windows 8 will grab 39 percent of the tablet market in 2016. You can be sure that you’ll have many users wanting to run your Clarion apps on their (Win8 Pro – x86 based) tablet.  And with the release of Clarion 9 you’ll be ready to deliver to them because the release of version 9 will add full touch support to the Clarion RTL.

Clarion 9 implements touch support into the ACCEPT loop with the addition of:

  • new event; EVENT:Pointer
  • new built-in function; POINTERDATA()
  • new SYSTEM property; PROP:PointerInterface

And any time a user swipes, taps, clicks, pinches, stretches or and zooms the screen with a finger,  when they release it an event (EVENT:Pointer) will fire.  The RTL retrieves the pointer info, ID, flags, and coordinates that were touched.  The PROP:PointerInterface allows you to specify your own optional handler of pointer events.

So how do you go about adding Touch support to a Clarion app?  Clarion developers won’t need to manually add any code to support touch. The C9 Templates will generate all the code needed to respond to touch gestures, so existing Apps will just need a regenerate with C9 to become touch-enabled.

Of course there are some UI considerations when designing your application for an optimal tablet experience. To help with that we’ll also be shipping:

  • New template “theme” that creates windows that look and feel like the Windows 8 UI
  • Touch-friendly sized buttons, menubars, etc.
  • New set of “Win8 styled” icons/images

As an example of touch-friendly design here are screen shots 3 new touch-friendly Date pickers that are already completed.

There are also some touch behavior considerations that have to be worked out.
For example defining what should happen on a Browse when its:

  • Swiped
  • Tapped
  • Clicked
  • Pinched
  • Stretched
  • Zoomed

With the input from the Clarion developer community we’ll be working on defining Browse/List behaviors, and behaviors for other controls and Template types during the beta phase of C9. Its very likely that we’ll make the behaviors Global Template settings so that you have final control as to how your application responds to touch gestures.

C8 ready for Win8 and more

A new release of C8 is on its way out. This release has been through an extensive test cycle, both internally, and working with many key Clarion developers. Most apps will see an immediate performance boost in screen/control drawing, especially when opening very complex windows, as well as a much cleaner rendering of closely spaced and overlapped controls.

Windows 8 is due to release next week, and we’ve added new support to the RTL, compiler, debugger and Templates, so you’ll be able to detect Win 8, and properly manifest your apps for Win 8.  All in all there are 100+ fixes/changes/features in this release, and with the lengthy test cycle this release has been through we’re confident you’ll be able to make use of them right away.

An updated release for C8 is on its way

A new update is going out today for Clarion 8.  This is a pretty significant release in that it has some important speed improvements for drawing complex windows. For this release we worked closely with a couple dozen Clarion devs testing their real-world windows using internal builds.  This was a win-win situation for all of us — we received immediate feedback as we released iterative changes to the RTL, and the developers who participated were able to test their biggest and baddest windows with the new RTL.

In a previous post I wrote about the changes we made for flicker suppression, but that’s only part of the story.  In addition we spent a lot of cycles working on improving the speed of opening and repainting complex windows, the elimination of extra sets of caption buttons being drawn by the OS into the App Frame, and a number of other MDI related issues.  The bottom line is that you’ll see a nice improvement in your Apps perceived performance, with just a recompile and no other changes (and its an improvement that your end users will surely notice).  The improvements to the RTL actually came from retro-fitting code being developed for Clarion 9 back into the C8 codebase.

Speed and flicker control aren’t the only items addressed in this release. There are also fixes and changes across the board from the IDE itself, template changes, drivers and more.

Flicker – zapped

We know that some users had a real issue with controls repainting under Win7 and causing an annoying “flicker”.  The problem was a side effect of a workaround we introduced to compensate for a change MS did for Aero support which started in Vista, and to many seemed to worsen to a large degree in Win7.  We’ve been working on it as a part of a much larger body of work for the entire window handling code (menu, MDI, SDI, et al). We recently sent out internal builds to a few users whose apps were “flickering” and giving them fits, and I’m happy to say that they’ve reported back with excellent results – one user was reportedly spontaneously dancing around the office after seeing the results on his app (and no, I won’t say who he or she is) but you’ll see it for yourself (or rather not see it :)) in the next release.

Tracking down those pesky GPFs

Coming up in the next C8 release we’ll be providing you with some help for tracking down those pesky GPFs.  We’ll be shipping two variants of the RTL; one the regular RTL, and the other RTL variant with some code added to read embedded debug info, and to decode the names of functions in the call stack and associated line number information.  The decoder-enabled RTL is a drop-in replacement, so you can just copy it over the standard RTL and that’s it.

Let’s take a look at what it gives you, here is a simple program that creates a GPF

Program code to force a GPF

On line 9 we declared a LONG with 8 dimensions, but look at line 29,it’s not hard to accidentally introduce an error like this, and a lot harder to track it down when it only fails intermittently at a customer site.  This what we get if we run this program when compiled with debug info:

GPF with debug info decoded at runtime

As you can see our LOOP causes a GPF because it attempts to access a dimension that does not exist – but with the debug info decoded at runtime we immediately see exactly which line of code caused the problem, as well as seeing the entire call stack.  For those who like to stay away from long debug sessions (and who doesn’t) this will be very handy.  Your end-user can just press the “Log info” button and send you the log text file and then it’s ball in your court. 🙂