Tuesday, October 09, 2007

DDO Tree Technology – DAF Methodology

Terms:
DDO Tree: A combination of instantiated data dictionary objects tied together.
DAF Methodology: How the ddo tree handles find, clear, save, delete and validation.

Here’s a sample (simple) ddo tree as found in a sales order data entry program or other module…



“Knowing how the ddo tree handles user requests is at least important to know as how to model a data dictionary class”

Communication between the ddo tree and the objects in play is a two way street!

In this example of data entry, the Server of the main panel is Salehead and it controls the find/clear/save/delete and validation of itself and all it’s parent ddo objects.

In a lesson in polymorphism, the “Customer” ddo recognizes it is a parent object of the server in play, and enforces different rules (find required on record for instance) than it normally would if it was the server itself.

Further, the SaleHead ddo takes responsibility for accepting the find/clear/save/delete messages sent via the user. When the cursor/focus is in the customer name window, for instance, the request_find message actually goes directly to the SaleHead ddo, not the Customer ddo. The SaleHead realizes that the message is directed at a parent ddo and forwards the message up thru the connection to the Customer ddo to handle.

Test!
Take your data entry module with parents and put a hook message inside the server and the parent “request_find” method and see which pops up first!

In the same way that this communicates upwards, it also communicates downwards so that when a delete message comes to the server, it travels downwards, deleting all children of the server and then itself. The beauty of the methodology is that no parent records can be deleted by the user unless programmatically allowed by the software engineer.

Test!
Take any data entry module, place the focus in a parent object cell or window, and press delete. What get’s deleted? Not the parent!

So, augmentation of ALL find/clear/save/delete requests can be done at the server level! Here’s how to code so the customer of an order cannot be changed:


Object Customer_DD is a Customer_DataDictionary
End_Object

Object SaleHead_DD is a SaleHead_DataDictionary
Set ddo_server to Customer_DD
Procedure Request_Find Integer iMode Integer iFile Integer iIndex
If ((iFile = Customer.File_Number) and (Current_Record(Self))) Procedure_Return
Forward Send Request_Find iMode iFile iIndex
End_Procedure
Procedure FindByRowID Integer iFile RowID riRowID
If ((iFile = Customer.File_Number) and (Current_Record(Self))) Procedure_Return
Forward Send FindByRowID iFile riRowID
End_Procedure

End_Object


Test!
This is one correct way to code a sales order so the parent cannot be changed of an existing sales order!


So, what have we learned? DAF Methodology.
It’s a study of communication between data entry objects which delegate user messages to the server, and how that server communicates the messages to it’s parent and child tables.

Wednesday, October 03, 2007

Visual DataFlex DDO Tree Technology Reference

A Reference Guide of DDO Technology
– Visual DataFlex–

Outline Mode:
- Introduction
- Terms
- What is a DDO?
- What is a DD Class?
- What is a DDO Tree?

Introduction:
Based on DAF Methodology, the DDO Technology in Visual DataFlex is a study of instantiation, delegation, and polymorphism.

Terms:
Instantiation: The act of creating an object based on a class and class hierarchy.
Delegation: Visual DataFlex features natural full delegation of methods by default, where the method travels first to the object, then to it’s superclass, and on throughout the full class hierarchy until the method is resolved. A method runs to completion without augmentation or definition on the object level but such augmentation, forwarding, or canceling is supported on both the class and object level.
Polymorphism: The act of an object to produce different behavior depending on it’s context.

What is a DDO?
“data dictionary objects” are instantiated in each data entry (or other type) module for the purpose of:
- Providing a “server” for find/clear/save/delete and validation operations for a data table.
- Providing data aware controls with attributes such as capslock, valid values, default values, range definition, selection list definition, etc.
- Communicating with other DDO’s in tandem to do all of the above with coordination.
- Definition of “constraint data filters” where your data can be a subset of the whole.

Sample Object Code:
// doc: instantiation of customer_datadictionary class placed inside panel of data entry form.

Object oCustomer_DD is a Customer_DataDictionary // instantiation of class.
Set DDO_Server to oSalesRep_DD // parent or “server” ddo
Set DDO_Server to oTerms_DD // parent or “server” ddo
Procedure OnConstrain // predefined method
Forward Send OnConstrain // continue delegation
Constrain Customer.Active EQ “Y”
Constrain Customer As (Customer.TotalOwed What is a DD Class?
A data dictionary class is a number of things: about 10 major functions with more omitted for space constraints in this article.

[1] A Data Dictionary Class defines the attributes for the data table to be communicated to the data aware controls tied into that database table. Attributes include “capslock”, “required entry in this column”, “auto-find upon exit”, “shadowed/non-enterable”, etc.

[2] The DD Class sets the (above noted) attributes differently depending on whether the ddo (instantiated object based on the class) is the direct server of operations, or a parent ddo of the operations server. This creates polymorphism on the object level and allows parent records to be found, required to be found, but not allow changes, for instance.

[3] The DD Class defines which other database table objects must be instantiated alongside with it to perform save and delete operations. For instance, the save of a sales order lineitem would require a dd object (ddo) for the product it was related to in order to reduce inventory or create a backorder. In another instance, the sales order header would require a ddo for the sales order lineitem to be present in order to delete the related order lineitems. Also, a DD Class may be configured to not allow deletes if child records exist.

[4] The DD Class allows columns to be associated with a “selection list” or lookup object. The chosen selection list will create a lookup button on the control chosen for that column and automatically popup and communicate two ways with the selection list.

[5] The DD Class allows the database programmer to define the object labels for each column and also to default the creation of controls for this column to a certain type such as a spinform or comboform, etc. (communication with the visual dataflex studio).

[6] The DD Class features augmentable save, find, clear, delete, and validate methods. The operations server (ddo) in a form or “view” will initiate a cascade of messages designed to perform an operation such as a save operation. When this save occurs, it cascades to all the connected data dictionary objects in the form or “view” which then delegates to the DD Class where you can augment the operation based on business rules you define and business rule exceptions which can be controlled via various means, usually with a property setting.

[7] The DD Class allows the setting of “valid values” validation tables which accompany a column in whatever control form it takes (regular form, comboform, or in a grid). The DD Class can define a list such as “activeinactive” for itself, or share a validation table with other DD Classes such as a list of US states or valid shipping terms.

[8] The DD Class allows for the definition of entry and exit methods for each column of the database table. Whether the column, in data entry, is represented in a comboform, or in a grid, the entry and exit methods follow it.

[9] The DD Class allows for auto-incrementing from a “system file” for ID fields, for instance or lineitem numbers.

[10] The DD Class communicates when instantiated, to validate the find/clear/save/delete cascade of messages along with whatever other ddo objects it is connected to.

What is a DDO Tree?
Data Dictionary Objects are run in tandem to find/clear/save/delete and validate these operations.
Let’s take a sales order entry application for example. The business rules given to you are;
· Customers who are not active may not purchase.
· Active customers may not go over their credit limit by more than 10%.
· Sales orders update the customer total owed.
· Lineitems update both the sales order total and reduce product from inventory.
· Product records update vendor purchase history.
· Sales orders update the salesrep volume sold.

Here’s a sales order entry application ddo tree (simplistic) example:
// doc: ddo tree for SO application
Object oTerms_DD is a Terms_DataDictionary
End_Object

Object oSalesRep_DD
End_Object

Object oCustomer_DD is a Customer_DataDictionary
Set DDO_Server to oSalesRep_DD
Set DDO_Server to oTerms_DD
Procedure OnConstrain
Forward Send OnConstrain
Constrain Customer.Active EQ “Y”
End_Procedure
Function Validate_Save Returns Integer
Integer iReturnVal
Forward Get Validate_Save to iReturnVal
If (Customer.Owed > (Customer.CreditLimit * 1.10)) Error 999 “Customer Over Credit Limit”
Function_Return iReturnVal
End_Function
End_Object

Object oVendor_DD is a Vendor_DataDictionary
End_Object

Object oProduct_DD is a Product_DataDictionary
Set DDO_Server to oVendor_DD
Procedure Update
Forward Send Update
Add (Product.Qty * Product.Price) to Vendor.Volume
End_Procedure
Procedure Backout
Forward Send Backout
Subtract (Product.Qty * Product.Price) from Vendor.Volume
End_Procedure
End_Object

Object oSaleHead is a SaleHead_DataDictionary
Set DDO_Server to oCustomerDD
Procedure Update
Forward Send Update
Add SaleHead.Total to Customer.Owed
Add SaleHead.Total to SalesRep.Volume
End_Procedure
Procedure Backout
Forward Send Backout
Subtract SaleHead.Total from Customer.Owed
Subtract SaleHead.Total from SalesRep.Volume
End_Procedure
End_Object

Object oLineItem_DD is a LineItem_DataDictionary
Set DDO_Server to oSaleHead_DD
Set DDO_Server to oProduct_DD
Procedure Update
Forward Send Update
Add LineItem.Total to SaleHead.Total
Subtract LineItem.Qty from Product.QtyOnHand
End_Procedure
Procedure Backout
Forward Send Backout
Subtract LineItem.Total from SaleHead.Total
Add LineItem.Qty to Product.QtyOnHand
End_Procedure
End_Object
// END CODE

With a pictorial version of what’s happening in the tree:


Thursday, September 27, 2007

RoloFlex Companion #1



The first RoloFlex Companion Product *for Professional Version Only will be Launched on November 15th.

Contributed by longstanding custom app developer Garret Mott of Auto-Mate Software.

Note: Garret has done a number of custom email managers, adding in features such as disclaimer, logo as an image, signature with custom field placement capability, attachments, well... it has a lot of features. Any developer looking for a custom email attachment to their product please contact http://www.automatesoftware.com/.

Note: This is intended as a launch of companion products, both for RoloFlex, and a platform for getting your Visual DataFlex product out in a new market. Please contact http://www.applausesoftware.com/ for more details and a prototype agreement.

Thanks! Good luck to the pooch - "Rolo".

Saturday, September 22, 2007

www.RoloFlex.Biz - New Home for RoloFlex


RoloFlex: now 2 flavors:
Personal and Professional
*The professional version simply has a valid VDF client license sold for commercial/business clients.
The new home is:
And a more professional interface is coded to accomodate the release.
Regards, Peter & Kimberly Donovan

Friday, September 21, 2007

A guide to discovering the Visual DataFlex Studio


A beginner’s guide to coding a custom database application in *Visual DataFlex
by Peter A Donovan/Applause Software/Boston.

*Visual DataFlex is a trademark of Data Access Worldwide of Miami.

Overview:
Here’s a conceptual step-by-step methodology for creating your first Visual DataFlex application.
Note:
Visual DataFlex is a “transparent back end” database application studio where the same exact code runs on your choice of backend.
This overview assumes you will start with the native DataFlex backend as a starting point.
Goal:
To encourage you to try the Visual DataFlex studio for a test drive using [freeware] the Personal DataFlex edition licensed for personal but not commercial use.
This is a full studio deploy with no restrictions other than mentioned above.
Compelling Reasons:
You can most likely produce a fundamentally solid application in ½ the time as your current studio.

First, let’s assume you have the studio downloaded from http://www.visualdataflex.com/ and you are running on a 30 day eval prior to getting a license.

If you fire up the Visual DataFlex Studio, you’ve got the “order entry” sample example workspace automatically loaded for you, and the current project is “Order.src”. From this point, you should hit [F5] and the “source code = src” will compile into an executable and run. Please check out the features of the running program. This, we will code ourselves in a new “SRC” project to see how it was done.

1. From the menu, choose File-New-Project-Windows Project, and you will get a dialog asking for the .EXE name. Please type “Test” and press ok.
2. For fun, just hit [F5] and compile an executable, which you will find is a perfect MDI [multiple dialog interface] container with no functionality BUT… the button bar, menu headers, and runtime are all done.
3. Back in the Studio, let’s create a data entry program or form if you will. Click File-New-View/Report-Data Entry View Wizard, and click Ok.
4. From the wizard, click “next” on the opening page.
5. For an object name, please enter “oSalesOrder” and accept the defaults for the next 2 windows and click “next”.
6. Next page: change the radio button please to select “create a header-detail entry view” and click “next”.
7. Now, the time has come to select the CHILD table for the data entry view, so highlight “OrderDtl” and click “next”.
8. For the “header” data table, we will select “Orderhea” and click “next”.
9. Now, we select the columns “fields” to show in the data entry HEADER section, and I recommend: Choose ALL the columns from the OrderHeader table EXCEPT the last one [last detail number] and click “next”.
10. Now, we select the columns “fields” to show in the child grid below the header, and I recommend: Choose ALL the columns [except for the FIRST : ordernumber] from the detail table and click “next”.
11. Next, you get to customize the labels for each of the forms if you like, but the default has already been programmed into the datadictionary, so simply change the radio button to “right” justify the labels, and click “next”, and “Finish”.
12. Press [F5] which auto-saves and compiles your SRC into a EXE and test!


You now have a running program [under the view menu] which actually saves sales orders and detail lines. Not the most appealing visually, but structurally sound.
You will find that there are entry methods associated with some database columns, and exit methods associated with some. You MUST find a parent table record in order to save, and you MUST fill in some required fields. There’s a snazzy lookup list [expandable] for each of the associated tables, and some columns automatically are instantiated as comboforms for you automatically. A couple of small modifications later and we are on the road to deploying this. [omitted].

This is just a sample of the power of Visual DataFlex, and a few words of explanation are required to answer questions that this may have raised.


* The datadictionary for each of the tables has been pre-coded for you in this sample example.
* The datadictionary for the parent tables adjusts automatically, knowing that it is used as a parent reference, to be “find required” in an excellent display of polymorphism. The same exact table behaves differently when it is the main table for data entry, i.e. no “find required”.
* The key fields/columns of each table cannot be changed: they are protected from change via a checkbox in the datadictionary.
* The labels for each column are configured in the datadictionary so they appear consistent throughout your application.
* The lookup lists, called selection lists are assigned to a table-column in the datadictionary so they automatically appear with a prompt button with no code.
* The Order Header TOTAL automatically adds and subtracts based on what you do with the lineitems: delete/save new/change.
* The Product on_hand total automatically adds and subtracts based on what you do with the lineitems: delete/save new/change.
* For a real LASTING impression of visual dataflex, please note the quantity onhand of a lineitem product, and then CHANGE the product in the lineitem without changing the quantity. * Then, choose the lookup, and you will see that the lineitem quantity has been moved back INTO inventory for the product you changed. Note: there are about 5 lines of code in the datadictionary that make this happen!
* Now, for real fun…, place the cursor in the header section on customer and choose DELETE from the button bar. Surprise, the customer is not deleted but the entire order and all of it’s lineitems are deleted. Repeat: place the cursor on the product code column of an existing lineitem and hit DELETE. The product is not deleted, but only the lineitem.

By this point, you may be ready to give the datadictionary a once-over!
From the Studio, select Tools-Database Builder. This utility creates the CLASS that each datadictionary object [in your entry form] is based on.
From the “Open Table” pulldown, select “Order Header” and browse thru the settings. It’s extremely impressive I think in the maturity of the product.

Ok, you want to give Visual DataFlex a shot, but where do you go for help?
The Visual DataFlex newsgroup: The url is: news://news.dataaccess.com/visual-dataflex
Please introduce yourself as a new developer and we will welcome you with advice and support.

Thanks for giving Visual DataFlex a trial, and look forward to seeing you on the newsgroup!

Sincerely,
Peter A Donovan
http://www.applausesoftware.com/ of Boston, USA

The Agile Manifesto

Quick Note:

This morning, I read one of the greatest blog articles by Joe Coley of the NEDC. In a newly opened blog, Joe's article just posted features the AGILE MANIFESTO which is an incredibly poignant statement about software development philosophy.

I recommend checking in on Joe's blog as a "must read"- http://itknowledgeexchange.techtarget.com/customapps/

Joe's photo and background can also be found at:
http://www.nedataflex.com/NEDCtest1.asp?pageid=22

PS: You can become a signatory of this manifesto if you agree with it's content.

Thursday, September 20, 2007

Publising an article about Visual DataFlex



Publicity for Visual DataFlex:

I am writing this article specifically geared for Visual DataFlex developers who would like to write an article publicizing your views or information about visual dataflex...

I personally have tried to publicize VDF thru article writing, and posting to different sources, and would recommend the following strategy to anyone who would like to do the same:

In looking for publicity for Visual DataFlex and other associated products, I use this resource to locate a suitable article site:

http://www.manhattanservice.com/

Manhattan Service is a SEO optimization help site, but specifically a inner link especially for articles:

which lists [at the bottom] a number of article sites which accept free articles.

Now, from experience, I recommend 2 sites from this list:



EZine

and

Buzzle


The compelling reasons I recommend these two sites are:

[1] Will my article be formatted nicely and not cluttered with advertisements on key words within my article?
[2] Will the page rank [power to make the article stand out on google] be high enough to effectively publicize my work?
[3] Are the site underwriting standards tough enough to eliminate spam articles so that my article will not be cluttered by junk articles, AND will it stand a chance of being distributed to other article sites?
[4] Will they review and approve my article in a reasonable time frame?

Sites to avoid:
ISnare - this site effectively only publicizes when you pay and your articles will just hang in limbo until you do.

Secondary Site:
Article Factory - this site has low underwiting standards and your post will disappear in time if not popular, however they feed other channels and my article on Visual DataFlex product review got over 600 views, 21 other sites picked up the article, and it is still up and running.

Note: If you have a blog, and feature articles about Visual DataFlex in the blog, I recommend you visit www.BlogUpper.Com [a child site of Manhattan Service] for assistance there.

If you have a topic to write about, and would like to further the cause of Visual DataFlex, please consider publishing an article or more thru these channels!

Sincerely,
Peter A Donovan

Monday, September 17, 2007

RoloFlex 12.4 Released Today



RoloFlex 12.4 Released:

RoloFlex 12.4 was released today as a small upgrade to RoloFlex 12.3 which features finishing work to isolate 2 small bugs and add 4 small features.

Features Added:
  • Print List Of RoloFlex Entries
  • Print Envelope
  • Active Toolbar with more choices and data aware highlighting courtesy Peter Brooks [Australia] based on work by Vincent Oorsprong [Netherlands].
  • Color (or colour if you prefer) added to notes courtesy Nat St. Pierre [Canada].

Bugs Fixed:

  • [export all and re-import all did not function properly in all cases]

  • [print lead card was not programmed]

In addition, RoloFlex has been featured in some web articles, and is starting to be offered by some free software download sites:

http://www.freewarehome.com/index.html?http%3A//www.freewarehome.com/Business_and_Productivity/Business_Specific/Sales_t.html

and featured alongside the release of Visual DataFlex personal edition:

http://www.dataaccess.com/enews/2007/Jan_18_2007.htm

Thanks to all who contributed to this revision,

Regards,
Peter and Kimberly Donovan

Monday, September 10, 2007

Rewrite: VDF or VB? VDF Advantages


Visual DataFlex Advantages

Ref: Should I rewrite my system in VB or VDF?

Visual DataFlex (VDF)

VDF’s main advantage is speed of development. On a system that deals with large quantities of data, VB will probably require twice the coding time.

One example of this is in error handling. In VB error handling must be coded by hand.

Another example of “out of the box advantages” is the find messages of VDF. Coding “find first or last” is completely supported and coded by VDF into augmentable methods available at both the object and datadictionary class levels.

Overview: VDF is designed for data awareness in a completely scripted environment while VB is not designed as a data aware out of the box solution.

Second, VDF is completely in harmony with your current code base and data.

A conversion of DOS DataFlex to VDF can take your tried and true code and move it mostly intact into an OOPS VDF system dependably without reinventing the wheel.

A conversion of DOS DataFlex to VDF also has the advantage of being run simultaneously with DOS. You can phase the system in gradually instead of being an all out conversion. You can even use the same data tables as DOS until the conversion is complete, and then switch over to client-server when VDF passes validation and takes over the complete role from DOS.

VDF is a great front end for many databases: DataFlex, Pervasive, MySQL, DB2, Oracle, and MS SQL Server for example. The same program code will work, no matter what database you choose (or switch to).

VDF has a 30-year history as a development language designed for working with data. VB has data capability as an add-on. The first 2 versions of VB weren’t even database aware!

VDF has a light footprint. Complex systems can run tolerably well on 5+ year old computers. VB.net requires “power-user” type computers for all users to get reasonable performance.

VDF is truly Object Oriented. This type of programming makes development faster, cleaner, & more easily changed down the road. VB is “Object Based” – a partway implementation of the OOPs concept. One part of OOPs is “Classes”. These allow flexible extension of the controls that are used to display data.

· For example, suppose you want to color all fields that are indexed (& therefore can be used for finding). Add the code for doing this into the class, recompile & now every instance of every field that is indexed will be colored. In VB, this change could take weeks – finding every control & adding the code to it.
· Another major advantage to this process is centralized coding. If, for instance, you wanted to change the color assigned to the indexed fields VDF can do this by changing one centralized spot, giving both great power to your code, and also making month-to-month maintenance chores a snap rather than a huge conversion job.

VDF has Data Dictionaries. DD’s are arguably the most powerful part of VDF. All business rules & much of the custom code go here.

· The advantage? As a very basic example, say you always want the Customer Name capitalized. Set this in the Customer DD. From then on, every view, dialog, etc. that uses the Customer DD will always capitalize the Customer Name.

· Two years later, you decide to allow lower case. Go to the DD, change it there & then recompile the application. Every place that uses the Customer Name (doesn’t matter if it’s 1 place or 100) will now allow lower case.

VDF’s Interconnected Data Dictionary Rule Base:

In a VDF application, the database table rules are coded [as above] with basic and advanced business rules. Example: The customer table has a globally applied rule that says the customer can’t go over their credit limit. When you combine the customer DD along with the sales order and lineitem DD, this is what you get:
Customer

Sales Order

Lineitem

Now, when saving a new lineitem, the save operation cascades upwards to the customer table and any attempt to save a lineitem that puts them over the credit limit is denied!

VDF has interface features that make it far easier for the user:

Lookups: These are popup lists that (at the click of a button or press of a key) are set up to make finding easy. For example, to look up an order, you might show Order #, Date, Customer, Ship To, Total & Status. The user can really see what they need to do their job efficiently.

Indexing: Put the cursor in the Order # field & you can move back & forth through the table in Order # order. Put it in Order Date & you can browse by Order Date, etc. – no programming required (except creating the indices).

The VDF interface is designed for data entry:

The standard VDF application is MDI (Multiple Document Interface). This allows the user to have 2, 3 or more views of data open at a time, but the whole application can be minimized at one click of a button. It also puts menus and toolbars at the top of the application so they don’t have to be added to each view.

If your users prefer to navigate from field to field with the Enter key (instead of Tab) – add one line of code, recompile & you’re done.

Every action that you can do with a mouse, you can also do with a key or key combination. This means faster & easier entry for skilled users, while allowing the use of the mouse by users who prefer it.

VDF has backward & forward compatibility. An application written in version 9.1 will compile & run in 12.0 (5 versions later) with little or no changes to the code.

VDF pioneered teaming Windows applications with Web applications. A VDF WebApp can easily work with the same data (including the data dictionaries!) that your Windows system uses.

-End Presentation-

Publications:
Your article, "Visual DataFlex Vs Visual Basic - Visual DataFlex Advantages" - has been accepted and added to the EzineArticles.com directory:
http://EzineArticles.com/?id=731962
You've also earned Expert Author status:http://EzineArticles.com/?expert=Peter_Donovan

Subclassing SL in Visual DataFlex

Hi, while others would think it strange to hear, I have just programmed my first global variable ever and am happy with my decision! As many know, Applause Software is a North American Mfg's rep for Soft Sys which is currently negotiating a VDF 12.1 release of it's proven VDF7 verticle market product named "MASS" (Membership Administration Software Solution). This work is for that project. Much of the code design involves making all instances of a GUI standardized and centralized in coding technique.

Ref: http://www.membershipadmin.com/
Ref: Peter Brooks @ SoftSys: Info@MembershipAdmin.Com

In keeping with my best oops foundation, I have never ever coded a global variable until now. I always used client area properties to communicate between views etc.

The premise:
How to program a selection list or popup dialog to say whether the user pressed OK or not.

Many decisions, especially in views and reportviews need to know if the user changed the value in the dbform or form. Usage of onchange needs to be programmed into each and every dbform or form if this is desired, getting the value prior to forward sending prompt and getting the value after forward sending prompt. Very messy that way.

So:
My global variable is necessary because:
It's programmed into the classes which will be precompiled prior to the client area existing.
Since it's a SL value, each and every dbmodal panel would have to be non-deferred-create if the panel carried the property.

Explanation of this:
Procedure Prompt
Boolean bOk
Set pbOk of (prompt_object(self)) to false // doesn't exist yet! // error!
Forward Send Prompt
Get pbOk of (prompt_object(self)) to bOk // dialog has been destroyed // error!
End_Procedure

The gv: // [global variable]

Boolean gbOK
Contained in the TOP of the custom classes use package.
This way, if the classes are used in another program, you don't have to code the gv again.
My classes for Soft Sys based on the dbModalPanel: (special subclass for selection lists).

//============================================//
Class cSoftSysDbModalPanel is a dbModalPanel
Procedure Construct_Object
Forward Send Construct_Object
// Define new Properties:
Property Boolean pbSelectionList Public False
// Create child objects:
// Set property values:
End_Procedure

Procedure End_Construct_Object
Forward Send End_Construct_Object
// Add your code that needs to be executed at the end of the object construction here:
// This overrides the individual object settings as existed in VDF7
If (not(pbSelectionList(Self))) Set Border_Style to Border_Dialog
Else Set Border_Style to Border_Thick
End_Procedure
// Create and augment procedures and functions
Procedure Popup
Move False to gbOk
Forward Send Popup
End_Procedure
Procedure Set Label String sMyLabel
// intercepts the setting of the label, and does a language [australian to usa] translation!
Integer iPos1 iPos2
If (sMyLabel > "") Begin
If (CurrentCountry(Self) = "United States") Begin
POS "Enrol" in sMyLabel to iPOS1
POS "Enroll" in sMyLabel to iPOS2
If (iPOS1 <> iPOS2) Replace "Enrol" in sMyLabel With "Enroll"
POS "enrol" in sMyLabel to iPOS1
POS "enroll" in sMyLabel to iPOS2
If (iPOS1 <> iPOS2) Replace "enrol" in sMyLabel With "Enroll"
End
Forward Set Label to sMyLabel
End
End_Procedure
// Automatic Save_Header for dbgrids etc. built into dbView-dbModalPanel.
Function DoSaveHeader Returns Boolean
Send Request_Save_No_Clear
If (Should_Save(Server(Self))) Function_Return True
If (IsNullRowID(CurrentRowID(Server(Self)))) Begin
Error DFErr_Operator "Please Enter Info In Top Part Of Entry Form"
End
If (Err) Function_Return True
Function_Return False
End_Function
// Note: See individual topic in previous post for this function!
End_Class
//============================================//
// Note: with search and replace, I replaced the class of all SL panels with this one:
Class cSoftSysDbModalPanelSL is a cSoftSysdbModalPanel
Procedure Construct_Object
Forward Send Construct_Object
// Define new Properties:
// Create child objects:
// Set property values:
Set pbSelectionList to True
End_Procedure
Procedure End_Construct_Object
Forward Send End_Construct_Object
// Add your code that needs to be executed at the end of the object construction here:
End_Procedure
// Create and augment procedures and functions
End_Class
//============================================//
// Note: with search and replace, I replaced all instances of dbLists with this class:
Class cSoftSysDbList is a dbList
Procedure Construct_Object
Forward Send Construct_Object
// Define new Properties:
// Create child objects:
// Set property values:
Send DoDefineShadowedColorUpgradeProperties
End_Procedure

Import_Class_Protocol cSoftSysShadowedColorUpgrade

Procedure End_Construct_Object
Forward Send End_Construct_Object
// Add your code that needs to be executed at the end of the object construction here:
// These setting OVERRIDE the object settings whatever they may be!
// Makes previously coded stuff all uniform now.
Set CurrentRowColor to clYellow
Set GridLine_Mode to Grid_Visible_Both
Set peAnchors to anAll
End_Procedure
Procedure Set Header_Label Integer iColumn String sText
// Another interception of setting the label for a language translation...
If System.Label_Surname gt "" Replace "Surname" in sText with (Trim(System.Label_Surname))
Else If (CurrentCountry(Self) = "United States") Replace "Surname" in sText with "Last Name:"
Forward Set Header_Label item iColumn to sText
End_Procedure
// Create and augment procedures and functions
Procedure Ok
If (Move_Value_Out_State(Self)) Move True to gbOk
Forward Send Ok
End_Procedure
End_Class
//============================================//

So now, in effect, what I am doing with the global variable is setting it to false on popup and setting it to true upon clicking the OK button of the SL or pressing enter to select a record in the SL.

Because it's a global variable, it can be coded into the classes which are precompiled prior to the client area (on the desktop) and referred to in class code prior to the oApplication being executed to open the workspace etc.

End Result in Code: // if you need to know whether the user is getting a variable from the SL:

Object oMyForm is a cSoftSysForm // non data aware such as in a report.
Procedure Prompt
Forward Send Prompt
If (gbOk) Begin
// do whatever you need to do with the value like setting a property to govern the constraints or output options.
End
End_Procedure

//===================================//
End Article!
PAD