Thursday, June 29, 2006

Load on call

Clarion 16 Bit version use to support very good feature - Called Load on call.
Meaning - Libraries (DLLS) were not loaded along with EXE - But as the procedures are being called the OS used to load the Libraries smartly. This was saving initial load time of application (Time taken before the first line of user code got executed)
Unfortunately in 32 Bit version, this compiler directive is not supported anymore.

This becomes important when the application is multi-dll and grows like 100+ DLLs
i have seen the loading of the DLLS as Clarion EXE tries to load every DLL connected some how or the other at startup and taking like 10 second or more in some instance

not only time it also contributes to the footprint the application needs to run it

C6 has a new feture that can be used to achieve this - its little limited but hey its better than nothing, isnt it?
---------------------------------------------------------------------------------

CALL( file, procedure [, flags ] )

CALL Calls a procedure that has not been prototyped in the application's MAP structure from a Windows standard .DLL.

file - A string constant, variable, or expression containing the name (including extension) of the .DLL to open. This may include a full path.

procedure - A string constant, variable, or expression containing the name of the procedure to call (which may not receive parameters or return a value). This can also be the ordinal number indicating the procedure's position within the .DLL.

flags - An UNSIGNED integer constant, variable, or expression containing bitmap flag settings.

The CALL procedure calls a procedure from a Windows-standard .DLL. The procedure does not need to be prototyped in the application's MAP structure. If it is not already loaded by Windows, the .DLL file is loaded into memory. The .DLL file is automatically unloaded from memory when the procedure terminates unless the lowest flags bit is set to one (1). A .DLL file left loaded may be explicitly unloaded with the UNLOAD procedure.

CALL returns zero (0) for a successful procedure call. If unsuccessful, it can return one of the following mapped error values, or any other valid Windows level error code:
-1 Procedure name cannot be resolved in a specified .DLL
2 File not found
3 Path not found
5 Attempted to load a task, not a .DLL
6 Library requires separate data segments for each task
10 Wrong Windows version
11 Invalid .EXE file (DOS file or error in program header)
12 OS/2 application
13 DOS 4.0 application
14 Unknown .EXE type
15 Attempt to load an .EXE created for an earlier version of Windows. This error will not occur if Windows is run in Real mode.
16 Attempt to load a second instance of an .EXE file containing multiple,writeable data segments.
17 EMS memory error on the second loading of a .DLL
18 Attempt to load a protected-mode-only application while Windows is running in Real mode
Return Data Type: SIGNED

Example:
X# = CALL('CUSTOM.DLL','1') !Call first procedure in CUSTOM.DLL
IF X# THEN STOP(X#). !Check for successful execution

You can create a simple function and use that to call what ever you want

CallDLLThread FUNCTION (P_DLLNAME,P_PROCEDURE) ! Declare Procedure
LOC:ERRORCODE BYTE !
CODE ! Begin processed code
LOC:ERRORCODE = CALL(P_DLLNAME,P_PROCEDURE&'@F',1)
DO ALERTUSER
ALERTUSER ROUTINE
CASE LOC:ERRORCODE
OF -1
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME,E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 2
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME,E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 3
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME,E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 5
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME,E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 6
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME,E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 10
MESSAGE(P_DLLNAME& 'window indicates wrong window version',E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 11
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME,E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 12
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME,E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 13
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME,E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 14
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME,E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 15
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME,E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 16
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME,E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 17
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME,E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 18
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME,E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
OF 0
RETURN(TRUE)
ELSE
MESSAGE(P_PROCEDURE&' window name is not resolved in library'&P_DLLNAME&' Error : '&ERROR(),E_PowerLAB,ICON:ASTERISK,BUTTON:OK)
RETURN(FALSE)
END

Monday, June 26, 2006

Clarion 7 * Clarion.Net * IDE video

Clarion 7 * Clarion.Net * IDE video
Video Presentation by Robert Zaunere
You can follow the link below to see a video presentation that I originated for the Aussie DevCon. Unfortunately I was late completing it for DevCon, but thanks to Tony York, the conference organizer, this presentation did make it onto the post-conference CD. The video is the first in a series that cover Clarion 7 and Clarion.Net, and of course the new IDE . This first video is an overview — I don’t go digging around in source code, and I don’t go into detailed demos of the IDE. But the slides cover the main features of the new IDE components.

Clarion developers who expected to Clarion 7 to only deliver on their new IDE expectations should be pleasantly surprised – Clarion 7 also has a lot of new UI features, during the video I demo some of the new UI features in a comparison of v6 and v7 applications.
Keep tuned to this site because we’re working on videos that describe in-depth the functionality of each of the new IDE components. And for you developers who are craving for Clarion.Net, we have a lot of new videos that will be forthcoming.
The video was recorded in 1024×768 resolution, but was output at 800×600 in Flash format (in two different sizes) to try to maintain reasonable bandwidth requirements. Even so, the videos are a pretty good size, so expect a delay after you click the link before the video starts.
View video presentation – (Medium-Low bandwidth recommended)
View video presentation - (Broadband or better recommended)

Optionally, you can also just download a PDF of the PowerPoint slides which are a part of the video presentation, you won’t have the audio and you’ll miss the C7 demo, but the screen shots show very clearly.
Addendum to original post:For those users who can’t seem to get the flash movie to play due to bandwidth or other issues, here is a link to download the smaller video via FTP:ftp://216.55.163.21/vid/C7-vid1-mlq.zip
After you unzip it just load the HTML page and that will start the movie.

Clarion 6.3.9053 released

Clarion 6.3.9053 released
The latest release of Clarion 6.3 is now shipping.
There are a few important fixes and some small new features which you can view here
posted on Wednesday, June 07, 2006 4:40 PM by Robert Zaunere
The Enterprise Edition is the power tool in SoftVelocity’s Clarion line. The Rapid Application Development (RAD) tool includes a number of unique features that helps Clarion users maintain a reputation as the fastest, most efficient developers in the industry.

Optimize code with CASE

Use CASE…END statement whenever checking for conditional statements wherever applicable. It is not only easy to use but it sometimes takes half the execution time then IF…ELSE..END statement which ultimately speeds up the execution time of our application.

Below is the preference

CASE…END
IF…ELSE…END
INRANGE

Tuesday, June 20, 2006

Have you ever thought to give scheduling functionalities in your application. if you dont wnat to do too much work - these fellows have done pretty amazing work for you. i was looking for something to use in my need, and i could not believe my eye when i have looked this. It has almost everything and more:

Company: Capesoft
Product: HotDates - dont get wrong ideas guyes

Included in HotDates:
  • Colorize your data using selectable Legend styles for effective data display
  • De-activate items in the legend (using the checkboxes in the list)
  • Change priority of items viewed (using the runtime priority buttons)
  • Output your calendar straight to a color printer
  • Update your information directly from the calendars (using Drag and Drop, Cut/Copy/Paste and traditional Insert/Update/Delete buttons)
  • Drag and Drop and Cut/Copy/Paste between calendars
  • Date-Range selection for easy data entry
  • Set First day of week (in the template or at runtime)
  • Easy global translation of Day and month names
  • Control Templates Included: Year Calendar (1-12 months), MonthViewer, WeeklyPlanner (1 to 100 Days), Day Scheduler and DatePicker.
  • Easily drill down or up between calendars
  • Free Email support
  • No DLLs or blackboxes Full source code included

you may visit them on www.capesoft.com - for under 300 bucks it is not bad deal

What is Clarion

I have included this on my other blog - "on-technology", but since i have decided to start seperate blog for Clarion - i think it is good idea to include this here too as my first post.

Clarion is the foundation of the SoftVelocity product line and anchors the company's reputation for fast, efficient database application development. In addition to the Clarion 4GL language, the Clarion product also includes both a C++ and Modula-2 compiler. All of the languages share a common optimizer, and they can be mixed within a single application. Independent software developers and corporate developers have similar needs: to increase productivity to meet demands for new database applications. Clarion is a data-centric Rapid Application Development Environment with an emphasis on code generation and reusable metadata to quickly create "corporate quality" applications to manage business data.Through the use of code generation based on metadata Clarion helps developers ensure standards, reduce coding time, eliminate errors, and bring projects to completion in record time. It allows the entire development team to share and enforce a consistent set of coding standards. It also allows new developers to quickly and easily adopt the organization's specific styles and continue work on inherited code without a lengthy learning curve.

So in nutshell...

Clarion is a data-centric Advanced Rapid Application Development (ARAD) tool featuring roundtrip code generation that preserves all of your own hand-written code while allowing you to re-generate your application as often as needed. It provides reusable metadata to quickly create "corporate quality" applications to manage business data. The code generator (AppGen) relies on "templates" to define the application; both UI and business logic. Clarion provides a comprehensive template set crafted by master programmers, hardened by years of use in the the real world. Any programmer can also create their own templates, in effect flawlessly cloning their expertise to all subsequent projects.The release of Clarion version 6 broadens the support for data access, and smoothly integrates additional support for XML, ADO and SQL. Clarion 6 adds new support for client-side Triggers, Business Rules collections, Report Generators that can output reports to PDF, HTML, XML and TEXT , native support for RichText, and the mapping of relational data to XML elements.
please visit http://www.softvelocity.com for more information - you will not regret you did