Okay, here you go.
I got handed a batch of panelboard schedules yesterday that ought to keep me occupied for a while. Anyway, our panelboard schedules consist of lots of blocks with lots of attributes. What's worse, some of the work I'll need to do is edits of existing schedules. That was an annoyance that I needed to resolve and I came up with a way to do it. I thought it would make an interesting challenge so I'll explain what it does here:
Much like the DDEDIT command in AutoCAD works on single line text, this routine should allow the user to select a single attribute in a block and edit accordingly. In other words, a small dialog box with the existing value that, when ENTER is pressed or OK is clicked, changes the value to suit and prompts the user for the next selection... just like DDEDIT.
For a better explanation, type DDEDIT in AutoCAD and edit a line of DTEXT.
Just like that.
Now, the reason why I think this would be a decent challenge is because
1. It can be very useful
2. It was much easier than I thought it would be
3. It should cover a few techniques that an up and coming LISP'er might find very useful
And for those of you who think that I'm presenting this as a challenge so I can get free code, go suck an egg. Like I said, I already wrote it. And, if anyone rises to the challenge, I'll gladly post my solution, crappy formatting, silly comments, faults, and all.
I'm not gonna post what I wrote just yet, because I don't want to taint your thought processes. I will say, however, that I used the following techniques:
Build a temp DCL (a technique I totally ripped off from a post of Mark Thomas')
Retrieve the value of an individual attribute
Replace the value of the selected attribute
The most basic of error handling
A simple loop
So, what ya got?
And, as an added bonus, I'll even post the command-line version I used previously in all it's craptacular beauty!