Open Kylix 3: EZ Linux Delphi?

There was sorrow and there was terror; even Informant Magazine’s editor didn’t

... have a “strong feeling” about Kylix ... and you will see little coverage of Kylix in these pages until I’m convinced to the contrary....

(page 5, Delphi Informant Magazine, 12/01) — pretty strong words for the only Delphi magazine. ... Of course that was then; now there are none, poor cranky Informant having passed from this vale of tears at 8/04 apparently.

Kylix Preferred Linux Versions

But after months of travail, I installed Kylix 3 Open edition and produced my vast 10,000-line OwenShow project — just like OwenView, but (slower) graphics interface, and runs in Linux (as well as the dodgier parts of Windows XP). ... I have suffered intensely, but after numerous Linuxes and two versions of Kylix — well, I finally discovered the ideal combination is Kylix 3 + the obsolete (and sometimes bankrupt) Mandrake 8.2 Linux. ... Of course this was after I finally got around to reading Borland’s advice. ... For a season, Red Hat 8 worked much better than MD8.2 — but maybe that was Kylix 2 ... or who knows? ... MD8.2 definitely crashed in hideous ways — repeated shutdown failures, requiring complete Linux reinstallations — and RH8 didn’t do that. ... But K3 + RH8 had their own crotchets: couldn’t save or open files in the IDE for instance, which does slow things down. ... Ah each one like a snowflake, so unique and strange! ... But in K3 + M8.2, everything seems to work the way it’s supposed to. ... Am I actually writing this? ... I own $100 of Mandrake warrants (in French!) + they owe me $40 for an undelivered distribution, so perhaps in a way, better late than never, my stored-up karma is finally paid-back. ... And then, Mandrake 9.2 also worked with Kylix 3 — so I could install it with useable resolution on a 2003-or-so emachine where, of course, Mandrake 8.2 just has fits. ... And thus the doddering Kylix staggers on for a few more years....

... But Kylix Output — the Programs it Creates — Work in Lots of Linices!

Please understand, the output of Kylix, the programs we create — or at least my OwenShow, at any rate — runs OK in all the different Linuxes I’ve tried so far (knock on wood); it’s the Kylix thing itself that’s so picky.

CrossKylix and the Fate of Kylix

Continuing this fascinating topic of Kylix compilation across the weary years, over at http://crosskylix.untergrund.net/ there is a marvelous gadget that lets me compile Kylix programs in Windows XP. ... And this is how the sainted OwenShow will go from here on out, however far, because, sadly, everything is so much more predictable and orderly that way — including the resulting Linux executable! ... CrossKylix did try to install itself into a copy of Delphi 5 — which would not have been helpful — but I persuaded my Delphi 7 to install it instead, and it seems to work very well and actually adds new features to the resulting Linux executable: the ability to run in recent Linuxes that are, apparently, upset about a Kylix mismarking of an code section, + the ability to run from the command-line without having to be informed about Kylix’s libraries — which OwenShow has had to do up to now with a crude batch file. ... And the CrossKylix site looked fairly active, even in these decadent times....

... But for every door that opens — another closes. ... I can almost hear poor Kylix, cowering in the corner, pitifully trying to keep up appearances, clutching near the antiquated Linuxes that will still have her — and where I will still have to debug! ... Oh Sad Symbol of Lamentable Linux Disappointed Desktop Dreams and Hopes, whither now my hopeless friend!? ... So bright and shiny and chic when you began so long ago, and now so lost and lonely; your days pass yet again and again, CrossKylix XP-compilation yet another blow to your already long-lost hopes....

Monday, December 1, 2008 3:38 pm. And then the world turned, and CrossKylix itself became tired and bitter! ... The guy says he won’t play no more; Borland wasn’t nice to him, and so he won’t support any new Borland compiler / IDEs, and in any case as we all know Linux / Kylix / etc. is gone with the dust in the wind and the mist in the morning. ... This is actually OK with my pitiful hopes and dreams, since I never advanced beyond Borland version 7 anyway (the last “co-Kylix” version), and maybe never will. ... And it turns-out the Linux desktop was just smoke for so many reasons, most notably its inability to connect. ... Que será será, eh?...

Sorted Project View?

One of the charming little oversights that appeared in Delphi 7 or 6 and Kylix is the unsorted Project Manager (“View / Project Manager”). If you don’t use Delphi, you cannot imagine how extremely annoying it is, while flinging code about, to have to stop and figure-out the location of some module by looking at every single entry in the Project Manager. ... Western civilization has adopted a primitive strategy to overcome this kind of problem, and up to Delphi 6 or 7, so had Delphi: the Project Manager was alphabetized. But then I guess all those Unix programmers couldn’t stand it, and Delphi 7 wasn’t sorted. ... Finally Monday, August 18, 2003, I discovered that sorting the list in the .DPR file sorts the Project Manager! I mean of course it’s manual, and you have to make sure the .DPR syntax is copacetic (i.e. last item semicolon, others comma) but still a huge improvement. ... Too bad Borland couldn’t tell us; but they’re probably still busy pretending it isn’t broken....

... Well wait, hold the phone — I get it! I just added numbers of units to a project so it’s like 40 units — and now it’s sorted! ... Of course the Borlanders never noticed! I mean, who does anything these days that involves less than 40 units, for goodness’ sake!? I mean what kind of innocent child am I!?!?

Delphi 7 + Vista!

And once you’ve figured-out how to run Kylix on tattered, antique Linices, you can move on to running Delphi 7 in Vista! ... Dr. Bob explains it all at http:// www.drbob42.com/ examines/ examin84.htm — and I just did it! ... The site explains how to stick old-style help into Vista + you must mutilate permissions on Delphi7\Bin and Delphi7\Projects. ... I think you get to those permissions screens he shows via right-clicking the directory in explorer, “properties”, “security” — although some user account control hoky-pokery is probably required. ... I used my crude and dangerous “fixcacls” route on the offending directories — which also requires UAC abuse of course. ... But anyways, ad astra!...

OwenShow: The Release!

Yup, you too can enjoy this fascinating and idiosyncratic directory/file browser! ... Delphi and Kylix and Windows for that matter may all be obsolete, but OwenShow has a new home in a $300 Walmart XP system, which probably means the installations have gone bonker as my pitiful batch files weave their weary way through the drives and network. ... Here is a link right here (7 or eight megabytes). ... Now with CrossKylix Linux compilation! ... + slow but beautiful context-sensitive HTML help! ... produced with the astonishing OwenHelp tools. ... And be sure to check-out JX the OwenShow (Windows) execution-history companion, q.v.!

... Along with a zip for Linux, the Windows OwenShow link above comes with its own nifty totally-superfluous genuine Windows installation program; if you find that annoying and puerile, this is about 3 megabytes of oswin.exe, which’ll just explode into the thing wherever you want it — probably preferable for Vista — or even xp — installations, i.e. some subdirectory like “c:\os” far from the maddening / puerile “program files” sticky thing....

And now finally after years of suffering and toil here is a genuine Linux tar file owenshow.tgz(5 meg?) for those devoted Linuxoids who don’t speak zip. ... Download it to your home directory, and (on a command-line) do something like

    cd ~
    #goto your home directory.

    tar -zxvf owenshow.tgz
    #untar the thing.
    cd owenshow
    #goto the owenshow directory.
    ./owenshow
    #flawlessly execute
    #Owenshow The Program.

and like it says, away you go! ... The excitement never stops....

Doesn’t Work In Vista! — Oh come on, Works Perfectly

Tuesday, February 20, 2007 10:33 am. ... And now, by special request — runs in Vista! The exciting new transparent windows operating system from our friends at Microsoft! ... For at least two minutes!...

Tuesday, June 19, 2007 3:53 pm. Well then the world turned and so many amusing things happened, including my $300 emachine vista system, and I think I can reveal to the surging OwenShow throngs that OwenShow, The Program, has achieved the august honor of officially not working in Vista!...

... Really, if you stay away from Vista directories and just stick the thing somewhere in your own subdirectory with oswin or something, it seems to work about as good as anything in Vista. ... But I cannot accept that this in any way diminishes the Laboratories’ significant achievement! ... With its standard Windows™ installation program, OwenShow will install, and will not work in Vista, and I want to thank all the little people at OwenLabs who have helped me to arrive at this career-crowning event....

Reprievement!

... But I’m afraid with a heavy heart I must, nevertheless, reject this towering honor. ... I cannot with good conscience accept this magnificent award when so many millions around the world are — well I don’t know I’m sure they’re suffering somehow, and it’s just terrible, and so I whacked the poor OwenShow ossetup.exe et al and it installed and worked (!) at least once in my wretched Vista test bed here, and I’m sure it will work perfectly with whatever you’ve got. ... Actually poor ol’ OwenView worked pretty good in Vista too! ... And so speedy! ... And then sadly it turned-out (Tuesday, November 27, 2007) my ingenuity only extended to installing once in Vista. ... Which has been fixed — but really, you’re better off, in XP or Vista, just making your own directory like “\Owenshow”, and going in there and exploding oswin....

Vista catches-up with OwenShow!?

Monday, December 1, 2008 2:48 pm. And in late news, it appears that with considerable effort you can emulate OwenShow’s EZ-use “checkbox” interface in Vista Explorer! ... I.e., instead of holding down control and clicking ever-so-carefully and then losing eveything if you look at your mouse cross-eyed, you can just click check boxes on files before copying etc. them! I got it from Windows Vista Magazine, but it’s like Explorer / alt / Tools (you have to press/release alt first to see the menu bar which includes Tools) / Folder Options / View, look around in there and check “Use check boxes to select items”. Then, if you hover over your file in Explorer, a ghostly checkbox will appear and let you check it! And it worked! ... But sadly not in XP. ... Positive proof, anyway, that the Vista Software Magicians stole their ideas from OwenShow! ... I’m gonna sue! ... Oh wait I forgot to patent checkboxes....

Can’t Execute from OwenShow

I realized late in the day — Wednesday, February 11, 2009 12:08 pm — that I can’t execute privileged programs from OwenShow in Vista® without turning-off the repulsive UAC ... because OwenShow just tries to run the stupid things using the mechanisms provided in the previous scammy Windows operating system, and of course Vista didn’t provide any upgrade — i.e., maybe pop-up their user annoyance stupid dialog when OwenShow tries to run such a program. ... This means I can’t run a setup program from OwenShow in Vista with UAC enabled. Which, once you understand this typical minor problem that occurs with a brilliantly-designed modern operating system which will be superseded by Windows 7 any minute now, isn’t that annoying; at least compared to other drivel such as consistent update-failure....

Other Voices: Borland’s “Code Central”

... I have also managed to post my intellectual love child in the Borland “code central” repository — well actually it might be somewhere around http://cc.codegear.com, and then again the days of Kylix and OwenShow dwindle and the codegear site is iffy from day to day. ... Anyway once/if you get somewhere in the vicinity, there’s an index of authors’ last names; click on the “O” and then try and find me, James Owen, in the list, whereupon you will be flawlessly guided to a page with a short summary and some way or other to download it. ... And hard as it is to believe when I just went there [actually some time ago now], there’re 11 — eleven! count them! — downloads!

Whoa. ... Tuesday, November 26, 2002 3:38 pm: I uploaded a new and improved version, in which many annoying things are fixed. ... And we’re now at 47 downloads! (exactly 600! at Friday, March 26, 2004 7:20 pm). There must be machines or something doing this, since I never ever hear from these people and my yahoo email address is in there. ... Ah well what would I do with the pesterings of ceaseless celebrity anyways? ...

And then after 100s of downloads, a single fan arose. He avowed that he had never been moved to complain about a program before, but OwenShow was so awful he just had to speak out. ... Ah! The price of fame! ... But then, December 2 2003, another voice arose — who liked the program! ... I thought I saw a pig fly by....

(When I went to codegear at Wednesday, March 21, 2007 1:26 pm it seemed to claim there had been 1017 downloads over the fleeting years!)

... More OwenShow Thoughts ...

Here are some poignant sentiments from the OwenShow README.TXT....

OWENSHOW: A LINUX / XP Directory Browser Wed 11/28/2007 11:49 am

OWENSHOW is copyright (c) 2002-2007 James Gregor Owen. See send of main.pas and the help owenshow.htm, for BSD-style license.

WHAT IS OWENSHOW?

The files help*.htm are as good an excuse as any (helpfrm.htm will display a lovely contents frame). The short story: over the years I’ve found a directory browser with primitive file-management and fairly elaborate batch-file-invoking capabilities extremely useful. I may be alone in this predilection, but as I ventured into Linux and XP, I still wanted one. This is it.

It is written in Kylix/Delphi, and the source is normally included.

OWENSHOW WILL INFALLIBLY DESTROY THE DAY, THE NIGHT, THE SPACE-TIME CONTINUUM YOU INHABIT -- AND WHEN IT DOES, IT IS YOUR FAULT. I HAVE WRITTEN. Buena ventura.

SO DESPITE WARNINGS, YOU STILL WANT TO RUN OWENSHOW

OwenShow is distributed in oshow.zip, which contains lxwn_???.zip, where ??? is a three-letter version, and this text as readme.txt. lxwn_???.zip in turn should contain

os_???.zip: the windows version; ??? is the three-letter version. os_lx.zip: the linux version.

WINDOWS 98, XP, VISTA: Unzip os_???.zip. This should produce “ossetup.exe” and “OS_???.A” which should be the complete release history of the product. Run ossetup.exe, which is a normal windows setup program. OS_SRC.ZIP containing the source to the program should appear in the installation directory. And then you can double-click the desktop icon that the installation might’ve created. On the other hand, at http://home.att.net/~owen_labs/rant7.htm#owenshow, you can download oswin.exe, which’ll just explode OwenShow in your chosen directory.

LINUX: At http://home.att.net/~owen_labs/rant7.htm#owenshow you can download owenshow.tgz, and then

cd ~
#goto your home directory.
tar -zxvf owenshow.tgz
#untar the thing.
cd owenshow
#goto the owenshow directory.
./owenshow
#flawlessly execute
#Owenshow The Program.

Or, you can unzip os_lx.zip (which is inside the standard distribution oshow.zip) in your desired directory, probably something like ~/owenshow. The source OS_SRC.ZIP should be extracted along with an executable. Then run the procedure “./owenshow”, which’ll do something about libraries and run OS. (Also see the Linux script xos, which I use to run Linux from an actual desktop icon.)

RUNNING OWENSHOW: When/if you finally run OS, it will offer to create a dummy empty directory tree; jejunely answer “yes”. Then you can right-click on the root directory on the left pane, scan your entire drive, and hope for the best. Start with “scan 2 levels”, which is *much* faster than scanning everything. Then you can select individual subdirs to scan fully; in Linux, type “home” to find that, and scan it all.

You EXIT OS by clicking that little X in the upper right-hand corner. Or ALT-F4 might work.

Oh and yes the little progress bar is pretty-much arbitrary. It’s not necessarily finished when it’s full.

And may the Deity have mercy on your computer....

j.g. owen * * * * * * * * * * * * * * * * * * *
web: http://home.att.net/~owen_labs/
email: owen_bda4@yahoo.com
* * * * * * * * * * * * * * * * * * * * * * * *

Is There Any Help?

And because Eric Raymond says we should, here is all the documentation there is for OwenShow by itself (it’s included in the distribution), oshelp.zip, which should contain the incredibly sensitive HTML renderings of my OwenShow hopes and dreams, so you can read it ahead of time and see what kind of brutal catastrophe you’re looking-at. ... Then again, why not gaze upon it right here! — it’s 300k or so, so it might take a while o’er the innernet....

Incredible Linux Convenience Features

I’m doubtless going round the bend in my old age, but OwenShow has acquired user-friendly features intended to make it useful for my techy-delvings in Linux and elsewhere.

An “edir” file list feature is now built-in: it basically creates a file in the current directory with a list of files in it, like the Notepad screenshot. I find it difficult to function without this capability, and for years I’ve used a pile of batch files and programs in MSDOS/Windows to do it — I encountered it originally as a feature of the MSDOS PCWrite editor, but for all I know he got it from emacs, which I gather has something like that — oh here it is “File / Open Directory”; it says “Dired (directory)” and you enter a directory name and there we go! ... Of course there’s no help, but google tells me — well, lookit, it’s actually a file manager! ... But I already got one or two of those. ... Then again, maybe I’ve got the wrong emacs feature, there are so many; personally, I use “joe” in the “jstar” incarnation for its WordStar control characters. ... Anyway, the idea of the OwenShow “edir” feature is so I can add notes to the file and have some vague idea of what I thought I was doing....

A “clips” feature lets me insert various useful material into documents and source, including a date/time stamp, programming comment blocks, and my sacred “TODO” block. ... You understand, what you can clip is entirely up to the os.ini file; you can put anything you want in there using, to be sure, my cryptic syntax....

... I guess some Linux software somewhere might have this stuff but nothing’s documented! ... Heck, I was trying to figure-out the very basic and central “chmod” command a few days ago — my big pipe was down so I couldn’t google — and the O’Reilly book Linux in a Nutshell, 3rd Edition, has a few pages which don’t tell you how to use the command! ... I had to guess from a few examples and try them out to see what happened. ... So I’m not fond of squirreling-out program features in Linux; now OwenShow does these convenient things for me....

And now, Genuine Linux Permissions!

Yes, OwenShow can depict the full panoply of Linux permissions! Optionally, it’ll show wonderful numeric attributes instead of the Borland “pretend” letter versions — which, I’d have to say, are still more useful. ... But without operator intervention of any kind, the middle panel’ll show you a “ls -All” version of permissions and groups for the selected file! ... And — gasp! — as shown, the odd link destination might wind-up in a carefully thought-out user-friendly corner of the screen (i.e. where it might fit). ... Oh Brave New World with OwenShow features such as these in it!

Hey Kids — it’s OwenShow Font Fun™!

OwenShow has included for a while the amazing Font Fun™, with which it has run on numerous Linux distributions with plausible — well, legible — fonts: Mandrake 8.2, Red Hat 9, Suse 9.1, Mandrake 10.1 (twice!), Fedora Core 3, Debian 3.1 — the list goes on! ... Often I use the fontfun feature in the etc menu and tweak the fonts, but ongoing and relentless improvement have made the feature almost usable, and OwenShow frequently “comes-up” first-time without totally wonked fonts. ... A wildly exuberant triumph was OwenShow in Ubuntu 5.04 Live CD, shown here in a Gimp screen shot (rendered, to be sure, in fuzzovision). ... (I copied the OwenShow directory from an existing Mandrake installation — which works with your up-to-date “live” CDs with their magic RAM trickery “overlaying” the read-only CD file system.)

Stolen Linux Windows

Speaking of Knoppix, recent Linuxes have gotten in the habit of opening OwenShow sub-forms behind the main window — the work of the exciting new “focus stealing prevention” feature. To stop it (I quote from OwenShow help):

  • FEDORA CORE 3 KDE: start menu, (KDE) control center, desktop, windows behavior, advanced tab, adjust “Focus stealing prevention level” from “low” to “none”.
  • MANDRAKE 10.1: there it’s hidden at “start menu / System / Configuration / Configure your desktop / LookNFeel / Windows Behavior / Advanced”.

I forget where it was in Knoppix, and I gather vaguely from chit-chat on the web you can’t fix it in Gnome (?). ... And when I took the screen shot there, every single Gimp window opened behind the others — with, to be sure, a “Focus stealing prevention level” of “extreme”....

— Tuesday, August 7, 2007 4:09 pm

The Dark Night of OwenShow

Or, perhaps, Death in OwenShow. ... Or maybe I overreact? ... Maybe I’m so annoyed because I didn’t notice this minor failing — for how many years? ... Perhaps the programmers-just-want-to-have-fun Owen project strategy has its drawbacks? ... Whatever, it seems that in my precious obsolete Linux Kylix EZ-programming environment, clicking a cancel button on anything but the main form does nothing! ... Tuesday, October 25, 2005. Then I revisited the issue — and the test program I’d concocted to demonstrate the flaw healed itself! ... So now the truth is, I don’t know why in the Linux version of OwenShow the cancel button on this particular form doesn’t work; and I probably never will. ... Oops wait a moment q.v.

... Anyway, I “fixed” it by disappearing the cancel button in the Linux version. ... But ...

The Signal Solution?

... Wait whoa hold the phone! ... I devised a weird and wonderful (but, sadly, utterly wrong q.v.) fix for the Krazy Kylix Kancel Key Krisis: I spawn a totally separate Kylix program whose sole job is presenting a single cancel button and, when that button is clicked, creating a file in the OwenShow directory — which the OwenShow process checks-for. ... First I tried launching and killing the cancel-key every time I needed it, but because each invocation involves showing the Borland free-software GNU annoyance-screen, that was entirely too annoying. ... Meditating on the “kill” call, I remembered they have these exotic signal thingeys in Unix, and so now I

  1. Start the cancel button program “kxsig” at OwenShow startup. This has the charming effect of lengthening the time the GNU annoyance-screen warning appears, which is good in a way because it used to just appear for half a second so you might be worried it actually said something useful.

  2. I start kxsig with a single argument, the name of an “instructions” file. This file tells it things like “be visible” or not, where to locate itself on the screen, and the name of the file to use to flag a cancel click.

  3. kxsig does a “signal(SIGUSR1,SignalProc)”, signifying that it wants to handle incoming SIGUSR1s (instead of the default behavior: quitting). Then, whenever OwenShow sends it a SIGUSR1 — “kill(kxsig_pid,SIGUSR1)” — it reacts by reading the instruction file, and then deleting it (it also does this at startup). So OwenShow prepares this file appropriately whenever it needs a working cancel button, + at startup....

And Bob’s your uncle! ... It actually worked! ... And let me point out — this is rocket science! ... A kind of bailing wire rocket science, but that’s the best kind, no? ... And just for the icing on the cake, my precious brilliant fix was entirely wrong....

Oops; the Right Solution: Kylix Close Bug

Well, aren’t we busy busy!? ... I now know why the cancel button doesn’t work. It’s still a Kylix bug, but a fixable one:

  1. In Linux/Kylix, closing a form stops all form-related activities, including update/repaint and button clicks — on the closing form, and apparently on any other form; at least when my copy-file form hung-up, the main form wasn’t repainting. (I could force repainting by explicitly calling the appropriate update method.)
  2. While I’m at it, the “action” variable in the Linux/Kylix formclose method is totally without effect — a corollary of the first bug.

Please note that this is not true of Windows/Delphi; there the “action” variable can abort formclose, and buttons and repainting work normally until the form actually disappears....

... Embarrassingly, I must’ve known about this months ago, so my previous elaborate efforts were totally unnecessary — although, to be sure, so brilliant! ... Anyway, in the final struggle, all I had to do was move the statement “modalresult := mrOK” from the beginning of a subroutine to the end! (Assigning any non-zero value to the modalresult property is one way to close a Delphi/Kylix form.)

What a tangled web! ... But that shiftless Kylix tricked me!...

Kylix Formclose: The Bad, The Ugly

To continue our probably endless exporation of Kylix Formclose....

What Not-to-do in Your Kylix Formclose

  1. Don’t assign anything to modalresult.
  2. Don’t call anything that does that; or maybe don’t call anything that might somehow result in formclose — any formclose — getting called.
  3. Anything.

I just added that last one for fun, but it’s probably a good plan. See layout.pas and the STUPID_KYLIX conditional in the OwenShow release as I embellish this riveting theme.

— Thursday, September 21, 2006 6:37 pm

Our Directories, Our Selves

Blinding Insight time: OwenShow isn’t just a cranky geekhead annoyance! ... No, no, not at all! It has the potential to illuminate the only organizing principle that modern computers share: the directory tree structure, the alpha and omega of modern computerized data. ...

The *nix masters know, but do not speak; the pitiful Macintosh elite mutilate them unknowing with the flick of a mouse (I got a mini, and did that within a day of first power-on), a stupid and dangerous power bequeathed to the Windows hordes — OwenShow doesn’t do that. ... But I actually did that a while ago, in Windows, in a CDR-burning program! ... Clicking endlessly through the tree, I came at last upon the directory I wanted to burn from (the program, like many, was too stupid to paste-in a path from the ever-helpful OwenShow) and, overcome by excitement I guess, I accidentally moved a subdirectory to another subdirectory with that ol’ errant flick of the mouse! ... If you haven’t done this yet, you don’t use Explorer or explorer-like file managers — or, more likely, you just haven’t noticed; I mean, everybody who uses these machines is constantly complaining about how they can’t find anything, hence the foofaraw over desktop search gadgets....

... And so you and all of the aforementioned classes have no idea — where is the data?! ... You know it’s in the computer somewhere probably, but the one simple actual-working real system that could help you find it — it is universally regarded as much too awful for normal human beings to contemplate, much less master....

The Americans

You can make that lazy pampered normal human beings; that is, us, the Americans. ... No, my children, we won’t delude ourselves; the Bengladeshis know their directories; they know where their data is; they don’t need the Google desktop finder — many of them can’t afford it! ... They can and must use cheap computers with less memory and smaller hard drives, and pay attention to where the data is — and where our data is, by the way. ...

... Now, due to my superior moral character and towering intellect, I understand directory structures, but unlike the guru masters, I speak — well at least I write and write and write. ... And I wrote OwenShow, so you can find your directories. ... No one can find your directories for you; you must go alone into this vast intricate maze — but at least with OwenShow you have a tool, a geeky friend, on the path. ... And the reward is great: mastery, power, knowledge. ... So go forth; Know Thy Directories!

... And then an inmate of a British magazine explained in his Snooty Advice column that everyone knows nested directory structures are the worst possible user interface known to mankind and many distant star systems:

“The tree outline view has been comprehensively discredited as an appropriate user interface control. Alan Cooper, the father of Visual Basic and the author of the seminal book, About Face — The Essentials of User Interface Design [blathers] nested hierarchies exist for the convenience of the programmer, not the user.”

— “Tree hugger” Ask Luis page 143 PCFormat 4/05

So there you have it; Use OwenShow — Be Discredited! ...

— Tuesday, August 7, 2007 4:26 pm


And here is a little story about OwenShow, in harmless ASCII text.

Delphi 7 CLX SaveDialog ’n’ Windows 98: “drive C: doesn’t exist”

Such fun! — and cunning obsolete geezer Delphi7/Kylix programmer that I am, I know how to fix it — after I just put in a save dialog for a pointless OwenShow feature where you get to save the graphics image of part of a directory tree to a BMP file (like the picture there). ... It filled me with delight — until I tried it on a Windows 98 machine where the dialog wouldn’t accept any destination and always produced the idiotic error message as above. ... This is the “CLX” Windows/Linux code; i.e. a “normal” Windows Delphi 7 program doesn’t have this problem; it only occurs with projects like OwenShow which are set-up with the CLX components so it can compile in both Windows and Linux.

... Anyway, the trick is to get the QDialog.pas source — which comes with the free Kylix version 3, with my pro Delphi 7, and probably with the free Delphi 7 although I’m not really sure — and mutilate it as per the “JGO” conditional because Windows. GetDriveType expects something like “c:\” i.e. three-letter root path, and apparently in Windows98 gets terminally cranky without it. ... This fixes the bug, ’though as far as I can tell the code doesn’t actually work — i.e. I can try to save “n:\bingo” and this code doesn’t do anything. ... (In my first pass, I just offed the entire “$IFDEF MSWINDOWS” block there, and that seemed to work fine also.)

... So then I copied only the DCU file QDialogs.dcu to my Windows OwenShow source directory. It’s unnecessary to do anything to the os.dpr project file — although for years I had conditionals and elaborate schemes that were, it turned-out, entirely unnecessary. ... Apparently, when Delphi/Kylix sees a “uses QDialogs” in the OwenShow source, it routinely first checks the local directory before wandering down the path for a library or something, and that’s what it does when my fixed QDialogs.dcu is in the same Windows directory as os.dpr. ... On the other hand, in Linux, Kylix must not find the Windows QDialogs.dcu: it probably can tell it’s a tainted Windows version of the object and must be disciplined, but whatever, it complains bitterly it can’t find QDialogs.pas.

... Moving on to another gotcha: do not set the TSaveDialog. UseNativeDialog attribute to false on a CLX Windows form, for two reasons:

  1. It’s broken in Windows. I.e., setting it to false produces the admirable and enticing Linux/QT version of the dialog, which unfortunately includes a “home” button which, when clicked, bolixes up the save dialog so you have to restart the program.

  2. More importantly, if you copy such a form to the Linux version of the program source, Kylix Delphi goes nuts because there is no such attribute in the Kylix version.

... I expose this earth-shaking QDialogs issue in such exquisite detail because the only reference I could find while googling for it was a work-around from Borland which unblushingly proclaimed

There is a small bug in the CLX TOpenDialog which is used in the registration wizard. This error only surfaces on Windows 98 or Windows ME machines. To get around this just type the path to the activation file in the edit box rather than clicking the ellipsis to open the TOpenDialog box.

without mentioning the minor detail that the bug would appear in every distributed CLX program you ever write. ... My feelings for Borland are sometimes highly ambiguous, but Kylix/Delphi has provided me with endless entertainment of a very specialized kind, and I think I wish them well in all their endeavors. ... I understand the CLX thing turned-out to be just another detour — although from what, they have yet to determine — but nevertheless —— my CLX file save dialogs will work in Windows 98!...

(Tuesday, November 8, 2005 6:12 pm. ... README.SRC in the OwenShow distribution has a suspiciously-different but almost identical recitation of this fascinating topic.)

Kylix Power Solutions, Coriolis, 2001

It’s sad; it’s actually a really good Kylix book. Highly recommended. ... Of course I bought it for $4.97 in the bargain bin because the bookstore was too stupid to put it in a Kylix section where I could find it. ... Just chock-full of info I had to wrest from the internet by force, like fork and exec. ... Covers on a literate level (i.e. not icky-poo) various Linux/Unix issues I could’ve figured-out if I wanted to read endless boring explanations for children in giant books — but presented here in an authoritative succinct fashion suitable for someone who’s used a computer for a few years. ... Gosh!...

The Eternal Typewriter

My father spent many presumably happy years (it seemed like decades at least) working on a hand-held typewriter that would revolutionize note-taking; it would be so small and convenient and ez-to-use that anyone could operate it and take notes at lectures, on airplanes, lounging lakeside. ... Sadly this convenience came with a price; notes would have to be rendered in a sort-of pseudo font; each letter would consist of a combination of finger movements/segments easily committed to memory — a Palm Pilot Graffiti™ before its time — but the mechanism would automatically move the paper along horizontally and vertically. ... That may be a picture of the remains of a prototype, or it may just be some random debris from the basement — because over the many years we fanatically resisted any attempt of his to expound upon the many astonishing conveniences and features of the device.

— Tuesday, November 8, 2005 6:49 pm

JX: The OwenShow Executor and Execution History Companion! And So Much More!

For years I’ve gotten by with a dangerous pile of batch files and MSDOS executables while I feverishly wandered my hard drives with OwenShow (and OwenView before it) executing important real-programmer missions. ... The batch files are still there — indeed you’ll find at least one in the exciting jx release — but now at last I have a wonderful compelling GUI from which to execute the strange and numerous commands I need to keep the computer attic afloat — and now you too can have this valuable tool with Delphi 5 source at no extra charge! ... Included with this special offer only are instructions on how to integrate the thing with OwenShow and your DOS box! ... Never before offered on this web site! ... (And be sure to see the JX story directly below for what this nonsense is actually supposed to do!)

Also Included Without Cost!

The idea is to stick JX and at least the first of these valuable utilities in the path, and watch your system explode and melt with excitingly vivid new colors and smells and smoke, crashes and general chaos....

again.exe: with Builder 5 source. Replaced hyperx, the revered command-line predecessor to JX which was used by JX to support redirection and a little keypress/“run again” function. ... Basically “again” is a simple wrapper for the “system” library call — as opposed to hyperx, which is a ridiculously-complicated wrapper for the same call....

... And just for the heck of it, included today only are a few utilities I’ve used for years in batch files numberless to man:

batch.exe: It came out of 1988, and still handy for the “yn” function if nothing else, i.e.

@echo off
batch yn Continue destroying the environment? (Y/N): N^^H
if errorlevel 1 goto done

Assembler (!) source included. ... And in these decadent latter days, 32-bit C — well actually looks like C++! — source also....

setxp.exe, setxp16.exe: W95/XP version of my venerable 16-bit setenv.exe (not included), which really hasn’t worked that well even in Windows 98 for a while. ... Setxp also duplicates / enhances some batch functions. It implements environment-variable functions with trickery, explained in the endless help produced by entering the program without arguments. With Builder 5 and 1988 Turbo C source.

The Zip

It’s just a zip file, it doesn’t need no stinking install — well, if you need an install JX is probably not the ideal program for you. And here it is ! ... Bon apetite....

JX and Windows’ Trash-the-command-history Feature

But I see I’ve failed to explain JX’s Windows/doskey outlook: it’s intended to remedy disappointments in the “doskey” feature of MSDOS as implemented in its 32-bit Windows successors — where “doskey” is a feature (still available in Vista!) which replays previous command-line incantations with the arrow keys.

... I could probably produce a Linux version of JX without much trouble — but it would be pointless: JX’s raison d’etre is capturing all my feverish command-line activities, particularly the long, complicated ones, and Linux already does that, with no stinking “feature”, out of the box so to speak. In at least the Linices I use, the Bash shell has a global command-line history, so you can exit a shell, start another, and it’s all still there. ... Even through power cycles!

But 32-bit Windows is too stupid for that. ... Even Windows 98. ... Unless I use the sainted OwenView, the previous 16-bit character-oriented hopelessly retro predecessor to OwenShow. ... The OwenView program runs inside a DOS shell, so when I “shell” out of OwenView — well, actually, I forgot what happens but apparently I do indeed run command.com which nevertheless remembers the commands I do in that shell even after I exit it, return to OwenView, and shell again! ... The trick must be OwenView’s 16-bitedness — it and the 16-bit command.com get along better I suppose; or then again, maybe the emulated 16-bit DOS saved memory by reusing command.com and, therefore, the command history. ... Whatever ... I had already noticed that even the W98 32-bit OwenShow couldn’t transfer environment variables to spawned W98 command.coms, and I guess this is just more of the same. ... So in the idyllic antediluvian era of naked DOS, we remembered command-line histories, even crossing shell spawns! At least we did in OwenView! ... Ah those innocent halcyon days!...

... So JX, in combination with the fairly-obvious X.BAT file (which JX creates if necessary), remedy this annoyance in a dubious and intricate way, so long as I remember to use “x” instead of “exit” when departing a shell — and I get my lengthy DOS commands back again! And in a beautiful GUI, instead of the spartan command-line! ... Ad astra!

— Tuesday, August 7, 2007 4:50 pm

Computer Science: EZ Delphi Assign

In C++, you can assign one object to another just like “a=b”, assuming a and b are instances of the same class. Fields in the class that are “plain old data” like integers get copied and go on to live an independent existence. ... If the class includes fields that are allocated pointers — i.e., instances of other classes that were allocated with “new”, or just plain old “malloc” data — the built-in simple (aka “shallow”) copy will only copy the pointers for these things, instead of making a new thing, and those pointers will not live an independent existence. C++ programmers must therefore concoct copy constructors to take care of such things; allocating another thing usually, and then copying it (aka “deep” copy)....

... The almost dead-language/environment Delphi, like some atavistic lizard-plant, doesn’t get nearly that far. It cannot conduct a simple copy of object instances, and the programmer is obliged to provide a special method to do that, usually named “assign”.

Tclass = class
  one, two, three:integer
  bingo:TStringList;
  {...}
  procedure assign(source:Tclass);
end;
{...}
procedure Tclass.assign(Tclass source);
begin
  one := source.one;
  two := source.two;
  three := source.three;
  bingo := TStringList.Create;
  bingo.assign(source.bingo);
end;

{...}
Tclass a, b;
a := Tclass.Create; b:= Tclass.Create;
{...}
a.assign(b); {that’s how it’s used}

As you can see this is terribly boring. And a maintenance problem: you have to remember to fix the assign method whenever you change any of the data in the class, even if it’s plain-old data. ... Hence the amazing thing what I discovered and what you should do is

Rclass_copyable = record
  one, two, three:integer;
end;

Tclass = class
  r:Rclass_copyable;
  bingo:TStringList;
  {...}
  procedure assign(source:Tclass);
end;
{...}
procedure Tclass.assign(Tclass source);
begin
  r := source.r; {copy all the
                 plain-old-data
                 at one blow!}
  bingo := TStringList.Create;
  bingo.assign(source.bingo);
end;

Voila! ... Because Delphi does know how to copy records. ... It’s still a maintenance problem for all the non-plain-old-data; but you can now add plain-old data to your class, through the utility record, with impunity! Without changing a line of code in assign!...

... So where is my speaking tour? My big book deal? My google audience?...

An example of this brilliant technique will be found in OwenShow’s publics.pas Texec.assign. ... And incidentally, as far I can tell Delphi’s Tpersistent isn’t any help....

— the guru-at-last
Thursday, October 4, 2007 3:12 pm

Kill95 Utility

The command-line alternative to the w9x control-alt-delete program-close function. I found this on the web and then hacked it a bit, so as usual you should assume it will annihilate everything you hold near and dear up to and including your second mortgage, but I find it real useful so here it is (right-click, “save-as”): ... Go “kill95 /?” on the command-line to see what fiendish destruction it’s capable of. Of course if you don’t know or want to know what a “command-line” is, it’s a complete waste of time....

Process Explorer

A really great free GUI tool is procexp from the genius Mark Russinovich over at sysinternals: kill programs, find evil file-handle hoarders, and so much more. ... Actually he has numerous other useful Windows system utilities for free over there....