Home | Features | Documentation | Sales | Support | SmartWare 4 | Search | About Us | Contact Us
 
 
  Event Driven Code
  Faircom Engine
  ODBC Driver
  Windows Report Editor
  Binary Fields
  SQL Query Editor
  Forms and Controls
  COM and Integration
  Event Driven Programs
  Pocket PC Enabled
  Datasheets
  Debugging Tools
  Typed Variables
  The New SPL Editor
 


 
Event Driven Programming

Event Driven Programming differs from the older sequential programming of old. Now a control or object like a button is double clicked and some code is executed. Programs are place into the work place expecting the end user to be in control.  Visual SmartWare has kept it greatest feature, the Command Reference, and add events to the coding environment.

What is an Event

 

Normally an event requires some user action or system action. Examples could include:

 

Double Click View Load
Single Click View UnLoad
Mouse Over Before Update
Mouse Up After Update
Mouse Down Before Change
Mouse Move After Change
Key Down Before Enter
Key Up After Enter
Get Focus Current Record
Lost Focus  

 

Events are monitored by SmartWare, when these events fire the code associate with the event is executed.  Code sample:

 

Function Button1_DoubleClick()

file load form-view "05.vwf"

End Function

 

 

Object Oriented Programming

With the release of VisualSmartWare, there is an introduction to object oriented programming.  Those familar with COM and other development platform will recognize the use of the Dot Operator.  Example:

ActiveDocument.SaveAs("test.txt")

The object is ActiveDocument and it is being affected by the SaveAs function. The period between the two is the Dot Operator.  A property of an object will also use the Dot operator.

Example:

button1.visible = "TRUE"

Events of a control do not use the dot operator but use the underscore to designate it as an event. Events occur to object or controls placed on the form or to the form itself.

Example:

 

Button1_DoubleClk()

 

These conventions are now a part of the SmartWare environment.

 

File Formats

 

File formats are:

 

Local 4

This format has some limitations in the features it can support.  It is the format of legacy versions.  All previous formats can be converted to a Local 4 format.  The Local 4 format can be further converted to either Local 5 or Client / Server 5.  Local 4 has the advantage of light overhead. The tradeoff of this overhead is a loss of features of the new engine, such as data integery, recovery features, and binary fields .

 

Local 5

This format can support all features found in the SmartWare platform except of course those unique to client/server transactions.  The use of binary fields require either Local 5 or Client / Server 5 formats.  Local 5 formats can be converted down to a Local 4 if necessary.

 

Client / Server 5

This format supports all the features available to Local 4 or Local 5.  In addition the server formats has transactional rollforward and rollback, TCP/IP connective

 

 


Command Reference
 

Smartware has a long history of using a powerful yet simple Command Reference. The Command Reference is simply the options of the menu the developer and end user sees and uses all the time.  For example the command string File -- Load -- Stand-View is valid code. This use of the menu options as SPL code is referred to as the Command Reference.

The Command Reference model is what makes SmartWare so easy to use and develop with.  SmartWare has not moved away from the Command Reference in any way.  The addition of forms has brought with it event driven programming.  The Command Reference is still valid with event driven programming.

example

 

Function Button1_DoubleClick()

file load form-view "05.vwf"

End Function

The above code would load a form called 05 when the Button1 control is double clicked.

Combine the Best of Both Worlds

Smartware believes it has created the proper mix of Command Reference and Event Driven programming.   By bring the two concepts together it will change the methods and mentality of the programmer.  No longer is code running from top to bottom - so to speak, but is responding to events triggered by input, users or conditions being satisfied.  In keeping the Command Reference in tact the, developers can use a command sequence which is identical to the user environment.

 

 

 
 
 
Home | About Us | Contact Us | Copyright