|
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!... |
|
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....
|
The Dark Night of OwenShowOr, 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- ... 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
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 BugWell, 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:
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 UglyTo continue our probably endless exporation of Kylix Formclose.... What Not-to-do in Your Kylix Formclose
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 SelvesBlinding 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 AmericansYou 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:
— “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 |
|
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 ... 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:
... 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
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.) |
|
|
Computer Science: EZ Delphi AssignIn 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
|
Kill95 UtilityThe 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”): Process ExplorerA 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.... |