Welcome!

Richard (Rik) Brooks

Subscribe to Richard (Rik) Brooks: eMailAlertsEmail Alerts
Get Richard (Rik) Brooks via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Top Stories by Richard (Rik) Brooks

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)

DataWindow Magic: Master_Detail Object

One of the most useful custom objects that I've ever written is my master_detail object. It holds a prominent place in my toolkit. This article will take you through the steps of how to write one and in the process de-mystify the object. First we want something that looks like Figure 1. Selecting a row in the top DataWindow will display the details in the bottom. I'm sure that you've seen this kind of DataWindow and you've probably written many of them. The key here is not to tell you how to write this but how to simplify every one that you will write in the future. For our exam... (more)

Using the Tag Property – Part 1

Have you ever seen a form that has its own microhelp that changes when a field gets focus? I'm sure you have. You might see a window and at the bottom of the window is a line that says, "OPTIONAL - Enter the employee birth date," when a field is entered. We are going to create a simple automated solution that will allow you to carry the microhelp along in the DataWindow. Take a look at Figure 1. It's a freeform DataWindow with a SQL data source. I chose the Employee table from the sample database that comes with PowerBuilder. I didn't do anything special to it. My goal here is to ... (more)

Professional DataWindow Sorting

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)

Automating Formats and Edit Styles

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)