We are going to create a bare-bones email object. Of course you can expand
that in the future if you like, but for now, let's just create the
functionality that we need.
I start by creating a custom class. In case you aren't familiar with the
process look at Figure 1.
Let's start with an instance variable.
N_cst_mailer Instance Variables
private mailMessage io_mail_message // The message to send
I made the instance variables private so let's write a couple of functions to
populate our mail Message. We'll start with the TO. Note that the
io_mail_message contains an array of objects called recipient. One of the
properties of that object is recipientType. We are looking for the
recipientType of mailTo! There are several other types that don't concern us.
// Returns the current TO address
int li_count, li_max
li_max = upperBound(io_mail_m... (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)
I'm considering changing my emphasis in my column. Since speaking with some
people at Sybase I am convinced that PowerBuilder is poised for a mighty
comeback. The fact is that still today PowerBuilder is by far the most
productive development tool available. It eclipses all the rest. An
experienced PowerBuilder programmer is demonstrably more productive and can
finish tasks faster than C# or even VB.NET.
So why is .NET used by more companies?
Mine would just be a guess and in fact, the answer is irrelevant. I'm here to
tell you that Sybase is making an obvious push to regain some... (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)
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)