A.M. Hoornweg
Members-
Content Count
473 -
Joined
-
Last visited
-
Days Won
9
Everything posted by A.M. Hoornweg
-
That's the second mode in which my application works. A toolbar at the top and free floating windows that can be moved between screens. Only... The users don't want to use it that way.
-
"Tabbed MDI" hides views from sight. In my application, editing data in one view influences calculated values and graphical output in other views and the user really needs to have these views in sight simultaneously. That's the whole point, to have multiple views in sight and to let the user rather than the GUI paradigm decide which ones he wants to see.
-
The whole thing with MDI is that it is not only suitable to offer a user multiple documents at the same time, but also multiple views at the same time. I haven't seen a good GUI alternative for that. Anything with tabs, bars, pagecontrols etc basically serves to only hide views from sight which is quite the opposite of what I need.
-
I've never noticed. All my mdi client forms have either a panel or a tscrollbox in the background.
-
MDI itself works fine on Windows 10 for me.
-
Boolean evaluation
A.M. Hoornweg replied to Ole Ekerhovd's topic in Algorithms, Data Structures and Class Design
In the Windows API, sure. -
Skipping the UTF-8 BOM with TMemIniFile in Delphi 2007
A.M. Hoornweg replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
But a program (such as an editor) needs to know if the file is UTF8 in the first place. Without a BOM, it must guess. -
Boolean evaluation
A.M. Hoornweg replied to Ole Ekerhovd's topic in Algorithms, Data Structures and Class Design
Not only that, but the code "if Somebool=True" has a little known pitfall. Every Delphi program interfaces with libraries written in C or C++ (such as the Windows API, all sorts of drivers etc) and in the C language, a bool is basically an INT. I have had a few cases where a function was supposed to return a boolean and in reality it returned some integer where 0 signalled FALSE. The code (if Somebool Then...) treats 0 as false and all other values as TRUE. That always works as intended. The code "If Somebool=True THEN ..." only treats 1 as TRUE and everything else as FALSE. CASE statements are affected, too. So the following code fails: var SomeBool:boolean; begin SomeBool:=Boolean(2); //Simulate a DLL returning a "wonky" boolean if (SomeBool=True) then ShowMessage('True'); CASE SomeBool of True: ShowMessage('True'); False:ShowMessage('False'); END; If Somebool then ShowMessage('Still it is true...'); end; -
Stop IDE from writing unit names all by itself ?
A.M. Hoornweg posted a topic in Delphi IDE and APIs
Hello all, I'm in the process of evaluating if it's feasible to port a very large project from Delphi XE to RIO. Now I'm stumbling upon the situation that the RIO IDE automatically inserts unit names (such as "system.actions") into forms I'm editing. That's a colossal p.i.t.a. since I need to be able to edit and compile these forms in Delphi XE as well. I thought I could simply wrap these new unit names inside an {$ifdef compilerversion...}, but Rio will still append the unit names at the end of the unit list and then complains about the duplicate unit names. How can I prevent that from happening? -
The default calling convention in Delphi is "register" (the compiler tries to pass parameters in registers if possible to speed things up). The "Stdcall" convention is used throughout by the 32-bit Windows API (which consists of DLL's). So, for consistency's sake, it makes sense to adopt that calling convention for your own 32-bit DLL's as well. "Stdcall" tells the compiler that the caller of the function will pass all parameters on the stack in a right-to-left sequence and that the function itself is responsible for cleaning up the stack before returning. As Remy Lebeau pointed out, in 64-bit Windows there's only one calling convention. So you could do something like this: //in the DLL: Procedure MyProc; {$ifdef win32} Stdcall;{$endif} Export; begin .. end; ... exports 'MyProc'; //In the exe: Procedure MyProc; {$ifdef win32} Stdcall;{$endif} external 'mydll.dll';
-
Set a PC environment based on a Country name..
A.M. Hoornweg replied to Ian Branch's topic in General Help
Alternatively, if you already have a lot of code executing SQL statements as strings, just create a new tFormatsettings with the correct formats for date, time and decimalseparator for your database. Many Delphi string routines such as Format(), DateTimeToStr() etcetera have an optional Parameter of type tFormatsettings which will then apply this format. -
I've been using HxD for at least 5 years, highly recommended.
- 31 replies
-
- hex editor
- disk editor
-
(and 3 more)
Tagged with:
-
Skipping the UTF-8 BOM with TMemIniFile in Delphi 2007
A.M. Hoornweg replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Could you give us a short explanation how to compile a UTF8 RC file containing unicode strings ? -
Skipping the UTF-8 BOM with TMemIniFile in Delphi 2007
A.M. Hoornweg replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
I prefer that, too. The matter is just if we should write a BOM or not. In regular Windows INI files it won't work. In tMemIniFile it will. In XML it's optional. In Linux it is frowned upon because everything is supposed to be UTF8. In Windows every text is some flavor of ANSI unless it has a BOM. -
Skipping the UTF-8 BOM with TMemIniFile in Delphi 2007
A.M. Hoornweg replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
That's only safe if your character set is limited to Ascii. Once it contains any character > #127, it is unclear which character it is, because how's the application to know the code page the file is using? My code / annotations contain lots of umlauts and maths symbols. -
It actually makes (some) sense. This latter setting enables Windows to ignore the high-dpi compatibility setting in the program's manifest so you can test out which setting works best for the application. Also, you can specify if the setting is valid for all users or just for you.
-
In the current Windows 10 version, there's a new feature that lets you override the scaling behaviour of individual executables. Right-click the executable in the explorer-> Compatibility -> Change High-DPI settings.
-
Hello all, I am sorely missing a way to document sourcecode alongside the sourcecode. I believe that what I'm looking for doesn't even exist. Or? I find formats like Xmldoc totally obnoxious because it interrupts the source code and the text is never in the place where I need to consult it. My wide screen has plenty of horizontal space alongside the code. So why can't I use that empty space to explain what my code is doing and why I wrote it that way, maybe even with nice text formatting, hyperlinks and images?
-
Install recent Delphi versions on Windows XP
A.M. Hoornweg replied to dummzeuch's topic in Delphi IDE and APIs
@alberto do you mean the Delphi IDE, or just apps compiled with 10.3.3 ? -
Anything sensible for source code documentation?
A.M. Hoornweg replied to A.M. Hoornweg's topic in General Help
@David HeffernanNice to hear we're in related businesess! I had no way of knowing. Okay, so you're doing the documentation in external documents which you cross reference from the source. I'm doing that too, but it's for lack of a better solution, because major changes/reformatting of the docs requires locating where the docs are referenced in the source and updating that, too. It'd be sooo practical to have source and docs synchronized in the IDE somehow. In full-screen mode I have 50% free space between the right gutter of the source code and the project explorer, it would be great to have a documentation tool fit in there that uses anchors/links in the source code. Off topic: I find that the screen real estate of today's monitors is used inefficiently by most IDE's. Ribbons at the top and logs at the bottom all reduce my view of the document I'm editing. Recently I had to debug a large and poorly documented piece of source in Visual Studio so I decided to rotate the screen 90 degrees. That was... kind of overwhelming and very gratifying. If my screens weren't so large I'd keep it that way. -
Anything sensible for source code documentation?
A.M. Hoornweg replied to A.M. Hoornweg's topic in General Help
David, sorry but that's not helpful. This is not some "library" and there is no "consumer". The code I'm talking about is internal and scientific. It does stuff like calculating the 3-d trajectory of curved oil wells, calculates dynamic pressure losses caused by drilling fluid being pumped downhole through a complex drillstring and then up again through the annular space between the drillstring and the wellbore (the flow can behave laminar in some segments, turbulent in others) etc. and tons of other things. There is no way to make such code self-explanatory, it requires knowledge of physics, fluid dynamics, geometry and engineering. So I want to document this code in great detail to explain what's going on inside, with hyperlinks to scientific literature, Wikipedia etc. Because when I retire in ten years, the code must be maintained and enhanced with new fluid dynamic models by my successor and he'd better know what he's doing. Since the comments are going to be as large as the code itself, a side-by side solution would be ideal for me. Using Xmldoc or Javadoc/pasdoc only interrupts the flow of things, making it more difficult to read. -
Is your development machine a VM? Does it have the VMWare tools installed? I find that it makes a *vast* speed difference in a VM when I disable unneccessary graphical goodies in Windows 10. Go to control panel -> System-> Advanced system settings -> Tab "Advanced" -> Button "Performance Settings" -> Tab "Visual Effects" and click radiobutton "Adjust for best performance". Then re-enable only essential stuff like "smooth edges of screen fonts" and "show windows while dragging".
-
Why can't I install this monospaced font in Delphi ?
A.M. Hoornweg posted a topic in Delphi IDE and APIs
Hello all, I would like to test a certain new monospaced font in Delphi but none of my Delphi versions displays it in the font drop-down list. Is there anything I can do to use it anyway? -
Thinfinity VirtualUI - cloud-based conversion
A.M. Hoornweg replied to Mark Williams's topic in General Help
I have just tried some of their live demos. They do not work in my Opera browser but they do work with Edge. So depending on your browser, your mileage may vary. -
Thinfinity VirtualUI - cloud-based conversion
A.M. Hoornweg replied to Mark Williams's topic in General Help
An OCX *is* a DLL.