Normally I try to write applications on the DataWindow or Appeon but every
now and then I get a question that makes me sit back and say, "Huh?"
In this case the question concerns the PostOpen event. I've seen that event
named different things: ue_post_open, postOpen, post_open, ue_postOpen, etc.
It has, as far as I can see, always had post and open in the name of the
event. Further, just about every framework that I've ever seen has had that
event in the base window.
The question that I was asked was, "Why is that event there?"
The programmer wanted to know why there was code in the post open and why was
it not just put at the end of the open event? At first I was really confused
by the question. It was like he was asking me why do we have arrays? I just
couldn't imagine not knowing the answer.
Then it occurred to me that I learned the answer to that question from a ... (more)
This article describes how to create a grid presentation window that allows
sorting by clicking on the column header.
To begin we need to create a grid DataWindow. I'm selecting just a few
columns from the employee table. Here is my sql for the DataWindow in Figure
Once we have created it I get the DataWindow painter shown in Figure 2.
There are several changes that we need to make. Let's change the status
column so it's no longer a set of radio buttons. This is a read-only screen
so let's remove the status and add a computed field.
To do this let's remove the Status column ... (more)
This article provides a means of automating the sorting of DataWindows... not
just grid DataWindows as discussed in last month's article, but all
DataWindows, regardless of display format.
Bear in mind that we are writing programmer tools. When writing for
programmers we want to give the programmer the maximum number of options
while minimizing the programmer effort. In other words, default as much as
possible but allow the programmer to move beyond the defaults.
We have several action items to implement:
Do the housekeeping to get an application going Create a window for sorting.... (more)
Security is a must for most corporate applications. This article will give
you a starting point to designing and implementing your own. We will do it
with a table that is added to the example database and implement it in
ancestor code. The idea is that you should only have to add rows to a table
to implement your security.
The security table will provide a means to turn on and off controls and menu
items as our inherited objects are constructed.
Login_name varchar(20) PK
Application varchar(20) PK
Item_type varchar(10) PK
Item_name varchar(20) PK
Priviledge ... (more)
Have you ever used a datastore that ran without a problem while you were
developing your application, but once you've compiled it stopped running? Let
me tell you that's a difficult bug to fix.
I remember it so well. I kept going back and forth. How in the world could
the DataWindow work at design time yet not in the executable? I remember that
I checked the return value of the datastore. I finally noticed that the
datastore returned a -1. That's such a strange thing.
The datastore returns the number of rows that were returned or a -1. The help
files used to say that a -1 was in ... (more)