-
Content Count
2976 -
Joined
-
Last visited
-
Days Won
106
Everything posted by dummzeuch
-
I have no idea what might cause this, but since support is unable to resolve this, I would expect them to issue a new license just in case there is something wrong with the old one on Embarcadero's side. Since there are two different computers involved on your side it is likely to be a problem on their side. Hm, thinking about it: Has anything changed regarding your internet access? Is it possible that Embarcadero's servers can no longer be contacted? Could you maybe try to move your laptop to a friend and try his internet access to make sure? An option for support to help you could also be to convert your license to a Network Named User license. That would require you to run your own license server, but could prevent anything like this happening again.
-
Is a standard comment before each procedure implementation useful?
dummzeuch replied to dummzeuch's topic in GExperts
That's actually one change I made over Easter: The Formatter does no longer insert a blank line between a comment and the procedure it describes. Are there any other experts in GExperts that do this? -
Create a diff of all changed files (TortoiseSVN can do that, see TortoiesSVN -> Create Patch) and send it to me via private message or upload it as an attachment to a feature request on sourceforge.
-
Might be a nice addition. Care to submit a patch?
-
The base Exception class introduces various constructors. If you use ressources strings, there are two options: raise Exception.CreateFmt(MY_RES_STRING, [parameters, go, here]); raise Exception.CreateResFmt(@MY_RES_STRING, [parameters, go, here]); The second form is the one used everywhere in the RTL/VCL. It actually accepts a PResStringRec parameter. Up to now I also used that form in some of my internal libraries. But when I enabled the "Typed @ operator" compiler option today to get the compiler to find some errors in my code, it turned out that this form doesn't compile any more (in Delphi 2007, haven't tried anything else). Given that the first form works fine, why would I want to use the second form anyway?
-
I have never seen that problem, but I rarely use 10.3 and I don't use DevExpress at all. The call stack suggests that it happens in the drawing code somewhere, but apart from that I have no idea where to look.
-
Which doesn't help, since he is using Lazarus, not Delphi: On the other hand, the source code for the LCL is also available, but it's much more convoluted than the VCL, because it's supposed to be cross platform.
-
Automatically make your PC wake up at a given time
dummzeuch posted a topic in Tips / Blogs / Tutorials / Videos
Due the the COVID19 pandemic I am currently working from home, using Putty + ssh + Remote Desktop to log into and work on my office PC. For this to work, the office PC must be turned on and booted. So far I have let it running 24h which is really a waste of energy but since sometimes nobody is in the office at all, that was the most fool proof way. Today I have had some time at my hands waiting for an Ubuntu server to finish installing, so I thought about alternatives. ... read on in my blog post. -
Automatically make your PC wake up at a given time
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Apparently not. At least I have not seen any spontaneous awakenings 😉 of our office computers. There are three check boxes on the "Power Management" tab of the network controller properties (on my computer): * Allow the computer to turn off this device to save power * Allow this device to wake the computer * Only allow a magic packet to wake the computer On my computer, all of them are set. On a colleagues' computer the last one was not set. My colleague said that he didn't touch this (but on the other hand I don't remember doing that either on my computer), so I don't know what the default is. I can only assume that it depends on some circumstances during the installation. Maybe different hardware, or maybe whether the computer belongs to a domain or not (mine doesn't, the colleague's does). -
Automatically make your PC wake up at a given time
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Aparently many modern computers are already configured to wake on any LAN activity, not just the WOL magic package. So e.g. trying to RemoteDesktop into a computer might be sufficient to wake it up. I tested this with two of our computers, both of which had a special setting to restrict WOL to the "magic package", which seems to be off by default. But I am not sure from which state this will work. WOL didn't work at the one time I actually shut down the computer rather than hibernating it. Another one didn't wake up from sleep. The only state for which this has always worked for me was hibernate. -
Is Record method solution or a bad hack for pointer fields?
dummzeuch replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
No, that's perfectly valid. But why don't you decleare RecPointer as ^TIniRec and save yourself the typecasting? Or are there pointers to different types? If the latter, why do you use records instead of classes? Actually I don't think this should compile: TComparedData = record PointerRecType: TRecType; // this identifies RecPointer as TINIRec RecPointer: Pointer; // Pointer to TINIRec ... function IsSectionHeaderLine: boolean; end; function TComparedData.IsSectionHeaderLine: boolean; begin Result := false; if RecPointer <> nil then Result := TINIRec(RecPointer^).IsSectionHeader; // <-- this should not compile as RecPointer is an untyped pointer and therefore RecPointer^ is undefined. end; -
Automatically make your PC wake up at a given time
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
No, that one is sent by the computer which runs the ssh server. -
Automatically make your PC wake up at a given time
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
It does, but unfortunately only on a daily basis which would mean that it starts on weekends (and doesn't shut down so it runs all weekend). WOL is probably the easiest option for me (now that I know that it works) since I log on to an ssh server first thing anyway, so I can simply call a script that wakes up my PC. I could even automate via .profile it but that would mean that PC starts every time I log on even if I don't need it. -
Automatically make your PC wake up at a given time
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Only one for ssh (but not the default port). Everything is tunnelled through an ssh connection. -
Automatically make your PC wake up at a given time
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
I can't look at my office PC now (it's in the office, I am not and I can't connect to it because it's hibernated 😉 ), but on my home PC there is indeed such a setting: EDIT: Wonders of remote access: Yes, you are right, it's supported. I just ssh'd into the LAN installed etherwake and woke up my PC using the wakeonlan command. Apparently the option just doesn't show up in the BIOS. Thank you very much for this hint! -
Skipping the UTF-8 BOM with TMemIniFile in Delphi 2007
dummzeuch posted a topic in Tips / Blogs / Tutorials / Videos
Recently I came across a problem with INI files: Some editors (including recent versions of Windows Notepad) add a byte order mark (BOM) to the files they save. In particular the BOM for UTF-8 kept appearing in INI files which then were read incorrectly by the Delphi 2007 implementation of TMemIniFile (I guess the same applies to all pre Unicode versions of Delphi). In particular this was a problem with programs that used TJvAppIniStorage for streaming application settings to disk. (TJvAppIniStorage internally uses TMemIniFile.) So I tried to fix this ... read on in my blog post -
"M.A1R.SigBrightness_2020-03-25" The filename is invalid.
dummzeuch posted a topic in RTL and Delphi Object Pascal
I just got a very odd error message from a TJvSaveDialog: M.A1R.SigBrightness_2020-03-25 The filename is not valid. As you can see in the screenshot, there are already several files with the same name scheme in that directory: The dialog seems to come from the Windows Dialog itself, at least the call stack doesn't show any JVCL or RTL code after the call to Execute. I admit that the file name is a bit unconventional, but it should still be valid. If I save the file as e.g. 'bla.dat' I can later on simply rename it to the name I originally intended. Also, if the file already exists and I simply select it, I get an overwrite prompt and then can save the file. To be sure that there are'nt any invisible characters there, I type the whole thing. The error occurs anyway. I also tried different directories, on the server and on a local drive, even in the root of drive d:. No difference. WTF is going on here? -
"M.A1R.SigBrightness_2020-03-25" The filename is invalid.
dummzeuch replied to dummzeuch's topic in RTL and Delphi Object Pascal
OK, found it: The problem was not the file name but the filter (Save as type): If I change it to *.* it works. Seems that Windows for whatever reason doesn't like the filter to contain a * at the end of the extension (in my case "*.SigBrightness*". If I switch to the filter "*.SigBrightness" (without the trailing *), Windows appends ".SigBrightness" to the file name, which I can then manually remove and save the file with the intended name. Now, how do I get Windows to show the selection I want but still let me save the file? -
pre-generic dictionary class
dummzeuch posted a topic in Algorithms, Data Structures and Class Design
I think that some functionality in GExperts (and some of my other tools) could profit from switching from sorted TStringLists to a dictionary. Unfortunately I can't just use TDictionary<string, [whatever]> because I want to continue supporting Delphi versions that didn't have generics (in particular Delphi 2007). Does anybody know of a free dictionary implementation that stores pointers indexed by strings? I know of THashedStringList but it has too many gotchas to simply use it (e.g. the hashes get recalculated every time a new item was inserted and IndexOf is called, which is exactly what I would need to do). Yes, I could write one myself, but why reinvent the wheel if there already is one? -
BDE install cannot continue because Rad Studio 10.3 could not be found on the system
dummzeuch posted a topic in Delphi IDE and APIs
I just downloaded the 30868_bde_installer_for_rad_studio_delphi_c_builder_10.3_rio.ZIP from Embarcadero and tried to install the BDE on a computer that I want to run some programs that still depend on the BDE. And I got the following error: --------------------------- No Rad Studio 10.3 found --------------------------- BDE install can not continue because Rad Studio 10.3 could not be found on the system. Please install Rad Studio 10.3 and try this install again. --------------------------- OK --------------------------- WTF? Does anybody know how I can install the BDE on a computer that does not have (and will never have) Rad Studio installed? Is there a separate installer for that? (And please refrain from telling me that we should get rid of the BDE already. We're getting there but we're not there yet.) twm -
Skipping the UTF-8 BOM with TMemIniFile in Delphi 2007
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
If you only ever handle files created with Windows programs, that's probably fine. Unfortunately I also get files from other systems, where the BOM might be useful. -
Uses Clause Manager: EXISTING Identifier not found
dummzeuch replied to PeterPanettone's topic in GExperts
The parser still has bugs. It could be as simple as that. If you can produce a small excerpt of the unit that produces this behavior I will have a look. -
IT'S A PROBLEM IN THE BUILD PROCESS THAT ONLY AFFECTS THOSE WHO USE IT. I DON'T CARE IF YOU CALL IT A BUG, FOR ME IT'S AN ANNOYANCE AND THERE IS A SIMPLE WORKAROUND THAT TAKES ALL OF 30 SECONDS TO APPLY. FIXING THIS SO CALLED BUG WOULD TAKE ME AT LEAST HALF AN HOUR. AND THAT'S MY TIME, NOT YOURS. (OK, I will stop using caps now.) I won't take the time to fix this, it doesn't affect me. If you want it fixed, fix it yourself.
-
No, I won't. It's just an annoyance and can be worked around easily. But if you think it is worth your time: Go ahead.
-
Uses Clause Manager - Showing the filepath of the selected unit in the StatusBar
dummzeuch replied to PeterPanettone's topic in GExperts
I was just about to say that Alt+I is already taken by some other function, because I distinctly remember not setting it for some reason, but apparently it isn't and my memory is wrong. So: Done in revision #3063