CompuServe Thread

#AM 1.5.4X & TCL

6 messages in this thread
#7053From: Burt JohnsonJul 15, 1993 10:44 PM
I grabbed the 1.5.4X updater and installed it, apparently with no problem. I then opened the resource I had created under 1.5.4 and had it regenerate all the sources again (into a new directory so that it did not prevent createing the user files). I then built and ran that. It ran fine, just as before. However…. The handling of radio button groups looks like it was before? I don't see anything that sets the radio button IDs to 1,2,3,4 as I understood you to say that version would do. Also a global search on "SetGroupChoice" (w/ ignore case) comes up blank. Is there something else I have to do to make 1.5.4X code generation kick into gear? – Burt PS: "About" tells me 1.5.4X and Language shows "Think C with Class Library"
#7075From: Spec BowersJul 16, 1993 1:19 PM
Burt, Are your radio buttons in a window or in a dialog (modal or modeless). I think that our new code for radio groups is generated in modal dialogs. That's the major part we changed in 1.5.4X. We might not have done it yet elsewhere. Spec
#7082From: Burt JohnsonJul 16, 1993 7:46 PM
>> Are your radio buttons in a window or in a dialog (modal or modeless). I think that our new code for radio groups is generated in modal dialogs. That's the major part we changed in 1.5.4X. We might not have done it yet elsewhere. That explains it then. This is in a window. Your README said that you had only changed the modal dialogs, but I assumed from your earlier statement that you really had it changed elsewhere too (though I had neglected to mention that this was a window). – Burt Later: I went back and changed the window to a dialog and regenerated the code. After a couple of false starts, I now have the basic interface working as I wanted. Thanks for your help both in writing AppMaker and in helping me past this initial hump!
#7095From: Rich ParkerJul 17, 1993 12:06 PM
Burt, Handling radio buttons is quite simple, I think. If you refer to my book, you'll see that I'm assigning each of them an (arbitrary) ID by simply storing it in the "myRadioButton->ID" instance variable. From that point, the DoCommand method gets called when a radio button is clicked. You can do whatever you wish based upon the command. The long word passed into the DoCommand method, in the case of radio buttons, is the contents of its ID field. If you have a copy of the THINK C book, check the assignment of ID values in the IWorksheet method on page 303 (the identifiers are enumerated and shown on page 304), and the corresponding DoCommand method is shown, beginning on page 305. I think it's straightforward. This should work for windows as well as modal or nonmodal dialogs. -rich-
#7135From: Burt JohnsonJul 19, 1993 12:22 AM
Thanks. I saw the way you did it in your book, but that looked pretty cumbersome to me and I thought I had an "easier" way to do it — that ended up not working… 🙁 I changed to Spec's 1.5.4X version, and made the window into a dialog (which was fine for this case anyway — I had just gotten out of the habit of using dialogs a long time ago for C code). It now works as expected. Also, FWIW, your book would be a _lot_ more useful if it had a better index. I tend to use it as a reference book, showing examples of how to use TCL to solve specific problems. Your index has never yet had an entry that was any good for this purpose though. I end up having to read the TOC to get close, and then scan 20-50 pages to find what I am looking for. – Burt
#7153From: Rich ParkerJul 19, 1993 10:59 AM
Burt, Thanks for the comment on the index. I hadn't heard that before and it's good input. I appreciate suggestions for improvements. Generating an index is almost an art in itself. If I get an opportunity to revise the book, I'll be sure to "beef up" the index. Thanks, -rich-