-
Content Count
2976 -
Joined
-
Last visited
-
Days Won
106
Everything posted by dummzeuch
-
The correct url is https://svn.code.sf.net/p/gexperts/code/trunk . And there is howto on cmpiling it here: https://blog.dummzeuch.de/gexperts-documentation/compiling-gexperts/ I guess you got the zip file from sourceforge's "generate snapshot" function. I have never used it, no idea if and how it works. I just now discovered that there is such a button. I got a snapshot of revisoin 3141 and it looks OK. Which files are missing? Maybe I forgot to commit something.
-
I got one (actually I got several), but you might be right about the billing address being the receiver for those emails.
-
10.4 Sydney pre-release sales offer
dummzeuch replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
That would be typical: Just when my (Corona restricted) vacation is over and I don't have time to play with it. -
Don’t you just hate it when computers try to be clever but get it wrong? OK, it’s not really the computer itself but the programmer who tried to be clever. The problem usually is that he overlooked a corner case that you then hit where his sophisticated strategy fails and leaves you with something – lets say less desirable. Today I wasted several hours trying to find out what was wrong with my hack to create a TSpeedButton which can take the input focus (which standard TSpeedButtons can’t), by using a TBitBtn instead. I blogged about this before. There was a certain button width which caused the button to display only a square part of the caption. At closer inspection it turned out to not be a fixed width but kind of a width to height ratio that caused the problem. Here are several buttons with different widths and heights that show this behaviour: read on in my blog post.
-
When computers try to be clever
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
I probably knew that too, many years ago, but have since forgotten, or at least didn't think of it when I saw this bug. -
When computers try to be clever
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Quite hard, all least if I tried to do that for the whole GExperts. It not only uses many calls of the OTAPI but also hacks into the known native forms and components structure. It might be possible for some of the experts, if they can be separated from the rest. Given the size, long history and large number of developers who left their mark in the code, there are too many interdependencies to make that an easy task. I tried to clean up a bit, but on the other hand I'm probably also the one who introduced new dependencies over the - wow, more than 10 - years I have been involved in the project. -
Extend the system PATH
dummzeuch replied to miab's topic in Algorithms, Data Structures and Class Design
I'm assuming with "Delphi Windows application" you mean the IDE: Create a batch file that adds to the path, and then starts the IDE (and exits so the console window closes). If you don't want a batch file (many people complain about the "ugly console window"): Write a program that creates a new environment variable block and pass that when executing the IDE. -
Function with just underscore _() seems to be valid
dummzeuch replied to Mike Torrettinni's topic in General Help
We have Delphi, we don't need no fchking brainf*ck or whitespace. x=3 -
BTW: Yesterday I finally found and fixed a problem in GExperts which caused an access violation on IDE shutdown (an OTAPI interface reference that wasn't released after use). But it was caught and logged by an exception handler, so nobody using a release version of GExperts should have seen it. The fix was exactly one line of code, but it took me hours to track it down. The fun with working on IDE plugins: You can reproduce the problem, you see the call stack, you can even single step to the last line of your own code before it happens, but then you only get lots of assembler code of the IDE and other plugins which tells you nothing about what happens.
-
There are many of those stories. I heard about a Novell (remember them?) server which had been used for years but the company had forgotten where it was located. It was eventually found after a decade of uptime, still working fine. I think that's simply an urban legend, but it might also have been a marketing story.
-
Experience/opinions on FastMM5
dummzeuch replied to Leif Uneus's topic in RTL and Delphi Object Pascal
That's a common misconception: You will have to make the source code available to everybody you give the binary. So, of it's a commercial application, that means you must give your customers the source code of your application as well as the source code of every library you used. On top of that you cannot restrict how they use that source code, as long as they adhere to the GPL. But you don't need to make the source code publicly available. -
Another thing I just found out is that the Grep expert uses a regular expression for the exclude dirs option. It first escapes meta characters (e.g. '.', '*', '\' etc.), replaces ';' with '|' and then uses the result as a case insensitive regular expression to match the full directory name and the full file name. Every directory or file that matches the regex is excluded from the search. The help says this: Exclude Dirs: A semicolon separated list of directories to exclude from the search (the exclusion is done via a substring match on the full directory and file name) I always assumed that this filter is only applied to the name of subdirectories and that it does a full match, e.g. 'src' matches the 'src' subdirectory only, not just any directory name that contains the string 'src', e.g. 'deleted-src'. And I never expected it to match a file name like 'somesrc.pas'. Searching the directory 'd:\src\SomeProject' with an exclude dirs filter of 'src' will actually find nothing at all because all names will start with 'd:\src' which always matches the filter! Did you know that? Is this a bug or a feature?
-
done
-
OK, since nobody bothered to reply, I assume that it won't matter if I change that feature to do what most people will assume it does: Only search sub-directories that do not match those given in the exclude dirs list.
-
I think that might be GExperts, in particular when using the GExperts code formatter. I have tried to find and fix this issue without any luck for many years.
-
I updated to 1909 from Windows 8.1 in December 2019. There were two issues that I remember, but these do not concern any recent Delphi versions: Updating to Windows 10 broke Delphi 6 and 2007 again Installing dotNet 2.0 on Windows 10 (The second was not an update issue but installing Delphi 2007 on a fresh Windows 10 installation.) This is why I blog about those issues. I keep forgetting them if I don't.
-
Basically C++ Builder in later versions is RAD Studio with a reduced feature set, so in theory it should work. Some experts are restricted to Delphi code (which as far as I know can also be compiled with C++ Builder). Since I don't program in C++ with RAD Studio, I don't know whether there are any problems. I haven't gotten any feedback from C++ programmers on that either. But it is easy to remove GExperts from RAD Studio if it causes any problems: Delete the GExperts entry from Computer\HKEY_CURRENT_USER\Software\Embarcadero\BDS\20.0\Experts and it is gone. So, it is fairly safe to just try it.
-
When I see code like this I always wonder why the functions aren't called isBusy and isIdle rather than Busy and Idle. Prefixing them with "is" makes it clear that they will return a Boolean value.
-
More features for the IFDEF expert in GExperts
dummzeuch posted a topic in Tips / Blogs / Tutorials / Videos
The IFDEF editor expert was added to GExperts in 2016 and improved again in the same year, to support symbols defined in include files. Unfortunately sometimes an include file itself sometimes includes other files (e.g. jclNN.inc in the JEDI Code Library includes jedi.inc) which will usually add additional symbols which are then available for conditional compilation. But the IFDEF expert only listed symbols from the original include file. This has irked me for a long time, ... (read on in the blog post) -
Google Chrome is blocking the download of my application — HELP!!!
dummzeuch replied to Steve Maughan's topic in General Help
If it's only about blocking Google, why not simply post the password on the site itself? -
How do you deal with deprecated symbols in backwards compatible code?
dummzeuch posted a topic in RTL and Delphi Object Pascal
TJSONObject.Size was deprecated and replaced by .Count in Delphi XE6, so up to Delphi XE5 you have to use .Size (because .Count doesn't exist) and from Delphi XE6 on you either live with the deprecated warnings (.Size is still available in Delphi 10.3) or replace the calls with .Count. But even if you accept those warnings, sooner or later you will have to address them because Embarcadero decided to finally remove the deprecated code. So, what if you want your code to compile on all versions that support JSON without warnings? E.g. in my u_dzGoogleTranslate unit there is the following code: if o.Size <> 3 then raise Exception.CreateFmt(_('Parsing error on JSON answer: Root object size is %d not 3.'), [o.Size]); where o is a TJSONObject. This compiles fine in all Delphi versions that have JSON support but starts throwing deprecated warnings from Delphi XE6 on. So, what are my options? I could IFDEF all those calls: {$IFDEF JSONOBJ_HAS_COUNT} if o.Count <> 3 then raise Exception.CreateFmt(_('Parsing error on JSON answer: Root object size is %d not 3.'), [o.Count]); {$ELSE} if o.Size <> 3 then raise Exception.CreateFmt(_('Parsing error on JSON answer: Root object size is %d not 3.'), [o.Size]); {$ENDIF} Which would be fine for one single line, but there are dozens of similar lines which renders the code unreadable. I could IFDEF complete functions instead but that would mean to fix any bug in all these functions. I could add a class helper for TJSONObject that adds the missing Count function for earlier versions (I think they all support class helpers, so that would be doable.) I could derive TdzJSONObject from TJSONObject and add the missing Count function but that would not work for RTL code that returns a TJSONObject. I could write an inlined wrapper function JSONObject_size that encapsulates that IFDEF. That would improve readability but but would still be ugly. I could drop support for Delphi XE5 or earlier, but I'd rather not. You never know when you're going to need that. Can you think of any other options? -
How do you deal with deprecated symbols in backwards compatible code?
dummzeuch replied to dummzeuch's topic in RTL and Delphi Object Pascal
OK, I should have provided some background: This library is a hobby project of mine, there are only a very limited number of people that use it: I myself at work my two coworkers (but only in Delphi 2007, XE2 and lately 10.2) I myself (again) in many of my open source projects that support various versions of Delphi (for GExperts that means Delphi 6 and later), but not all units from that library are important for this Even though this library has been open source (MPL) for at least 15 years, I have never heard of anybody else using it (Which I think is a shame, but hey, they just don't know what they are missing out. 😉 ) So, I don't want to drop compatibility if it can be kept without too much hassle, I'm asking for alternatives. Believe it or not: Maintaining backwards compatibility can be fun if it involves creative (mis-)uses of language features. I am programming in Delphi for fun, not just for the paycheck, otherwise I would have dropped Delphi for Visual Studio more than 10 years ago. -
Applied. Thanks again.
-
Do you name your Threads for debugging?
dummzeuch replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
I wrote my own TThread class descendant which sets the name to the class name. It also automatically sets the name "Main" for the main thread. (Don't the latest Delphi versions already do that?) -
Is a standard comment before each procedure implementation useful?
dummzeuch posted a topic in GExperts
While fixing some bugs in the code formatter I came across a functionality that I didn't know about: procedure bla; begin end; The formatter can insert a fixed comment above each procedure like this: { procedure } procdure bla; begin end; It does this only if the configuration option CommentFunction is set to True. It's False by default and there is no GUI way to set it, so I never noticed. I think the way it currently works is pretty pointless, especially since the comment is hard coded as '{ procedure }' and is inserted above each procedure, function constructor and destructor. Even if there is already a different comment: { This is a comment } procdure bla; begin end; becomes { This is a comment } { procedure } procdure bla; begin end; Nobody needs that. Would any other automatically created comment be more useful? I can't think of any, but maybe somebody else has an idea? Currently I'd rather remove that functionality. I don't think a code formatter should add comments, it should simply format the source code that is there.