Apr. 1st, 2007

alexpgp: (Default)
The neat thing about programming with C++Builder is the ability to create applications out of components that, in a programming sense, already "know" how to do things. For example, a directory list box object knows how to display directory names hierarchically, and double-clicking on a directory name will shift the focus of the component to that directory and will display any subdirectories.

Aside from basic functionality, other actions typically associated with "events" (clicking, moving the cursor into or out of, and so on) have to be defined. A good example is a button object, which can - among other things - be clicked. However, what actually happens when that occurs... well, that's where the "programming" comes in. And the same is true when it comes to "dropping" things that've been "dragged" over an object.

I was fortunate enough to find a web article that provided a general explanation of how to go about doing this, which included a high-level plan (1. Tell Windows that your application will accept dropped files. 2. Catch and handle the WM_DROPFILES message. 3. Process the dropped files.), leaving the well-known "implementation details" to me.

Somehow, I managed to figure out how to copy files, and the application works.

The app runs with no seat belts, in that the code doesn't do much checking of function return codes (though I do have a couple of try...catch loops in there in case of exceptions), and though it would be nice to be able to change some configuration information without firing up C++Builder again, for now, good enough is good enough.

* * *
Natalie came by last night for dinner, during which we discussed various combinations and permutations associated with the fact that (a) her roomie is moving out soon, and (b) Galina wants to put this house on the market (or get it rented again), which will put me in the market for a place to stay. We still have a little wiggle room as far as deciding anything is concerned in this regard, but I'm already flinching about Yet Another Move™ (though why that should bother an old veteran like me doesn't really scan).

Galina (and, indirectly, Lily) convinced Natalie to leave Lily with us last night (Lily ran under the bed and up through a hole in the box spring), and we promised to bring her back today. In fact, Galina and I took Lily back to Natalie's today about noon, and we all went to a place called Auntie Chang's Dumpling House, at the intersection of Westheimer and South Shepherd. The food was reasonable, and the company was excellent. Natalie had to rush back to muster some of her WoW friends and go kick around some virtual bad guys online, but I'm sure we'll have an opportunity to connect soon.

* * *
Gardening ideas must've come together in my unconscious, because today, it occurred to me how I could go about constructing two "self-watering" containers for the tomato plants bought about ten days ago. The basic idea consists of slicing apart one of several Omaha Steak styrofoam coolers we've accumulated, and then using the thick "boards" to create false bottoms for containers having a square cross-section. The styrofoam is easy to work with, so inserting a hole for the watering tube and another hole for the wick was pretty easy.

Of course, there remains the question of whether the contraptions will work over the long term.

Speaking of tomato plants, I found basically the same size plants at the flea market in Pearland today, for $2.00. While I didn't buy any more tomato plants, I did buy some mint, some rosemary (I think), and something that looks like basil with a strong hint of mint, each for $1.00.

Cheers...

Profile

alexpgp: (Default)
alexpgp

January 2018

S M T W T F S
  1 2 3456
7 8910111213
14 15 16 17181920
21222324252627
28293031   

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 4th, 2025 06:50 am
Powered by Dreamwidth Studios