-
Content Count
2750 -
Joined
-
Last visited
-
Days Won
162
Everything posted by Uwe Raabe
-
The error message is misleading. It doesn't mean that the module CodeSiteLoggingPkg_Design260.bpl cannot be found, but rather another module required by the design module cannot be found. Most likely that will be the corresponding runtime package. The tip given by David should fix that.
-
Exception in constructor of class taking ownership of an object instance
Uwe Raabe replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
That can fire back in some cases where the inherited constructor calls a virtual method that is overridden in TMyClass and relies on the existence of FSomeInstance. In that case it is required to assign it before calling inherited Create. This also holds true if FSomething is going to be created in TMyClass.Create. One has to inspect that carefully for each case. More than once I have been bitten by that when I introduced an override method. -
The Delphi IDE stores the currently open files when this is activated in the IDE option settings (auto save - project desktop). If you see files closed in a previous session that option is most likely disabled and the last saved project desktop (<projectname>.dsk) is loaded.
-
Exception in constructor of class taking ownership of an object instance
Uwe Raabe replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
If the TMyClass.Destroy is even called when an exception is raised inside TMyClass.Create, you could as well assign FSomeInstance before calling inherited Create. That should make sure that FSomething is freed inside TMyClass.Destroy in all cases. That would make the outer try-finally obsolete. Or are there situations where TMyClass.Destroy is not called? -
As a Delphi expert, do you ever need to refactor or improve your code?
Uwe Raabe replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
How can you be sure? -
Any Good tutorial on Parallel Programming Library?
Uwe Raabe replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Yes, but it comes with the Delphi installation and thus doesn't need to be maintained externally. I also have customers avoiding additional libraries. Each new one has to be justified to someone, which often turns out to be a tedious process. Not everyone has the power to decide on its own. -
Quoted from Webinar Replay: Simplify Data Change Tracking with InterBase
-
AFAIK, that has been true for Windows 95. According to the WinApi SetTimer function, which is internally used by a VCL TTimer, the minimum value for Interval is 10 ms:
-
Tool to fix up uses clause unit namespaces?
Uwe Raabe replied to Vincent Parrett's topic in General Help
Same here. That's why MMX development is actually stalled - unfortunately. Otherwise the beta version would have long been finished. -
Tool to fix up uses clause unit namespaces?
Uwe Raabe replied to Vincent Parrett's topic in General Help
Regarding compiler directives you can give the above sources a try. Although there might still be cases where it fails, they should do a better job than the official MMX version does. -
Tool to fix up uses clause unit namespaces?
Uwe Raabe replied to Vincent Parrett's topic in General Help
Yes, there is always room for improvement. -
Tool to fix up uses clause unit namespaces?
Uwe Raabe replied to Vincent Parrett's topic in General Help
The code used in MMX Code Explorer is almost identical to what I attached above. The command line application allows targeting multiple units in one go, while as you noticed MMX only works on the uses clause the cursor is positioned in the current unit. -
Tool to fix up uses clause unit namespaces?
Uwe Raabe replied to Vincent Parrett's topic in General Help
I have written a tool including that functionality some time ago. Although I didn't find the time to polish it up before going public, it basically does what it is supposed to. Expanding unit scope names is only part of the whole process, which consists of resolve all unit aliases expand unit scope names group units compress uses clause Taking your example above it will convert uses sysutils, stdctrls; into uses System.SysUtils, Vcl.StdCtrls; Feel free to adjust the sources to your needs. UsesCleanerSource.zip -
Messages for exceptions only for main thread?
Uwe Raabe replied to Cristian Peța's topic in RTL and Delphi Object Pascal
It is probably related to this code in System.Classes.ThreadProc: try Thread.Execute; except Thread.FFatalException := AcquireExceptionObject; end; You should be able to get any exception in the threads OnTerminate handler reading its FatalException property. See also http://docwiki.embarcadero.com/Libraries/Rio/en/System.Classes.TThread.FatalException -
Indeed! You would write it this way: begin ... begin // do something with ref and thing var ref := Some.Array[Index1].Reference; var thing := Function(Index1).Thing if ref.Value <> thing.Value then begin ... end; end; // ref and thing are not present ... end;
-
The filter "Reported by me" yields different results for everyone - obviously.
-
What are your compiler settings for debug builds?
Uwe Raabe replied to dummzeuch's topic in Delphi IDE and APIs
If it is explicitly coded there is of course no option to turn it off (except changing the code), but the ability to turn it off is the foundation of this poll. -
What are your compiler settings for debug builds?
Uwe Raabe replied to dummzeuch's topic in Delphi IDE and APIs
There is always the option to turn range checking off for a dedicated code part. -
Reading large UTF8 encoded file in chunks
Uwe Raabe replied to Clément's topic in RTL and Delphi Object Pascal
Did you give that TStreamReader approach a try? -
Reading large UTF8 encoded file in chunks
Uwe Raabe replied to Clément's topic in RTL and Delphi Object Pascal
Streams don't know about encoding. You might better do with a TStreamReader. In its FillBuffer method there is some code taking care of your concern (look for ExtraByteCount). -
AFAIK that is not available in the Professional version. The feature matrix seems to support that information:
-
Cannot perform this operation on a closed dataset
Uwe Raabe replied to bazzer747's topic in Databases
The message is thrown inside the CheckActive method of TDataSet. I also suggest some debugging session. I guess the reason lies at place you don't expect. -
The right most button in the toolbar has a drop down menu where you can configure the sort order.
-
If the query is a SELECT statement or something that also returns a record set you should use Open instead of Execute. Therefore you should add a Close before changing any parameters.
-
Whatever you implement, you should always measure the performance against the brute force update. If the server were a recent InterBase one, you could make it simple and fast with Change Views, but these are not available with other databases.