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
The login name of the user
The name of the application
Might be window or menu or a type of control in a window like a command
button. We will only co... (more)
Every programmer knows about the IF command. It's pretty much a fundamental
part of the syntax of every computer language that has ever existed. I don't
need to explain how it works.
The DataWindow can't use the IF command though. It does, however, support an
IF(expression, TRUE, FALSE)
In its simplest form this means that if the expression evaluates to TRUE,
then whatever statement you supply for the TRUE part is executed. If not then
the FALSE part is.
Let's begin with a simple example. Let's create a DataWindow that will show
employee information. Here is the SQ... (more)
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 t... (more)
In my last article we explored what I call Advanced DataWindow Sorting. We
covered everything that we need for the DataWindow. In this article we are
going to polish what we did last month and make it look professional.
The main area of concern is our sort selector window as seen in Figure 1. It
does the job. It's just amateurish and doesn't provide the full flexibility
that we really need.
You may recall that the text of the sortable column is specified in the tag
property of the column in the DataWindow. (huh?)
We open the sort selector window with a parameter, something like t... (more)
Normally I write columns about the DataWindow or Appeon. This month though I
ran into an interesting little logic problem and when I solved it I realized
it was really a nice piece of code so, even though it is not in my normal
genre I thought I'd share it.
I was tasked with allowing the user to pick a combination of days of the week
with these specifications.
The user may select no more than three days prior to today. The user may
select no more than three days in the future. The user may not have both
prior and future dates in the same group If there are not three days in the ... (more)