David Hart

Subscribe to David Hart: eMailAlertsEmail Alerts
Get David Hart: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Top Stories by David Hart

Once upon a time there was a source code editor called "Brief." Okay, so it was DOS-based and had an ugly interface. However, it had one feature I truly loved, a "code snippet" manager. You could have your favorite block of code inserted into your source with a few keystrokes. Eventually, I stopped writing Clipper code and started using PowerBuilder, which didn't have this built-in feature...until now. The "Clip Window," toggled on and off via a new icon on the PB8 PowerBar, allows you to store your favorite "clips" of code and drag-and-drop them into your scripts. The name Clip Window refers to the clip being imported and exported via the Windows clipboard. To store a piece of code, simply highlight it in your script, then drag-and-drop it onto the Clip Window pane. You'll get a new line entry with a blinking cursor. Type a name into the edit and you're done! You sh... (more)

Dynamic Report Module Basics

Now that the holidays are over, it's back to work, back to school...and back to the basics. In my December column, "PowerBuilder and ODBC 101" (PBDJ, Vol. 9, issue 12), we discussed hooking up to a database via ODBC. This month, let's look at the most important item to hook up to a database, a DataWindow. Our apps are all about viewing data, and the DataWindow is the nucleus of all "data viewing" in PowerBuilder apps. (Source code for this article can be downloaded from www.sys-con.com/pbdj/sourcec.cfm.) Since most DataWindows function as "reports," we'll use that as our model. L... (more)

PowerBuilder and ODBC 101

Your boss pays you a visit and brings you the pathname of a 30MB Adaptive Server Anywhere (ASA) database with a 6MB log file. "Just got this from the New York office; they created it in ASA. Can we look at it?" Your boss isn't technically oriented, and you are a PowerBuilder guru, right? Gulp! Now you'll have to use the PB Database Painter, Profile Painter, and the Microsoft Open DataBase Connectivity (ODBC) Administrator to "hook it up and look at it." Strangely enough, many seasoned programmers, those types who can recite external function prototypes from memory, get cold and c... (more)

'Bag O' Tricks'

With Halloween just around the corner, I thought I'd give you some of the "tricks and treats" that I've collected over the years for PowerBuilder, InfoMaker, and Sybase ASE. Horrors! You've just finished a slick bit of coding in your user object, but it's 6:00 p.m., time to head out the door; the Raider game just started, no time for a full backup right now! Then your boss asks you to copy the "latest version" of the PB Development Libraries for Project X that Horatio worked on over the weekend. That's right, Horatio, the one who writes the crummiest code on the planet. Gads! No... (more)

Context-Sensitive Help

"The tag property takes a string value." That's what PB Help tells us about the tag property. Not much considering all or at least most PB objects have a "tag" property. What's its mission in life? Anything we want it to be. You could use the object's tag property to set MicroHelp in an MDI frame with the code in a GetFocus event, for example: w_frame.SetMicroHelp(This.Tag) However, the time-honored use has been for context-sensitive help. By putting a distinct "keyword" for that object in the tag property, you can grab this text and pass it to the ShowHelp function. Just what eve... (more)