-
Content Count
97 -
Joined
-
Last visited
Posts posted by uligerhardt
-
-
-
Still can't load a project:
I have XE6 and 10.4 installed.
-
2 minutes ago, Alexander Sviridenkov said:Thanks for reporting, this error appears when clickng to Create without selected project. Now fixed.
Note that to select project you need to click on folder icon next to Project label
I have the error when clicking on the folder icon without clicking Create. But I'll just try the new version. 🙂
-
Hi! I just downloaded and unpacked the RAR. When I start graph.exe and click on the Project icon I immediately get this:
Any idea how to fix this?
-
5 hours ago, Van said:I've installed a new version of Delphi 11.3 on windows ll and I have the same problem with the form's right/bottom edges disappearing after you add a TTitlebar. The problem persists even after removing the Titlebar.
Any idea how to resolve this?
Never used TTitlebar but this sounds like there are related units left in the uses clause after removing the component. So maybe the problem hides in some initialization section?
-
Do you know Delphi and/or C++? How big is the app?
The first thing that should come to mind before considering a rewrite is "Never change a running system".
-
If you're prepared to write a wizard you might find something in this fragments from a very old wizard I no longer use:
procedure TMyWizMainForm.ShowInMessageView(const FileName, MessageStr: string; LineNumber, ColumnNumber: Integer); var MessageServices: IOTAMessageServices40; begin MessageServices := BorlandIDEServices as IOTAMessageServices40; MessageServices.ClearCompilerMessages; MessageServices.ClearToolMessages; MessageServices.AddToolMessage(FileName, MessageStr, '.....', LineNumber, ColumnNumber); ShowMessageView; end; procedure TMyWizMainForm.ShowUnitSource(const FileName: string); begin (BorlandIDEServices as IOTAActionServices).OpenFile(FileName); end; procedure TMyWizMainForm.ShowParseError(e: EParseError); var EditorServices: IOTAEditorServices; TopView: IOTAEditView; EditActions: IOTAEditActions; begin ShowInMessageView(CurrUnit, e.Message, e.LineNo, e.ColumnNo); EditorServices := BorlandIDEServices as IOTAEditorServices; TopView := EditorServices.TopView; if TopView = nil then begin ShowUnitSource(CurrUnit); TopView := EditorServices.TopView; end; if TopView <> nil then begin EditActions := TopView as IOTAEditActions; EditActions.NextError; end; Close; Beep; end;
It works (worked?) by inserting a custom line into the IDE's message window and make the IDE jump there.
-
1
-
-
You can use
ShellExecute(0, 'open', PChar(FileName), nil, nil, SW_SHOWNORMAL);
to show the unit in your registered Pascal editor - which probably is Delphi.
I don't know about the line number.
-
1
-
-
I think a repeat is conceptually the right thing here, as you want to read at least once unconditionally.
And of course written like David did. 😉
-
Wouldn't a repeat-until loop do the trick?
-
1
-
-
FWIW: There's also IFileIsInUse. E.g. delphi - Checking if the file is in use and by which application? - Stack Overflow.
But it only works for apps that support it.
-
1
-
-
36 minutes ago, PeterBelow said:It used to be possible to kind of redirect the output of Write/WriteLn using something called a "text-file device driver".
That's the core of Uwe's code I linked to.
-
-
-
Depending on your needs a non-modal solution might be better - something like Windows' toast notifications. I use DevExpress' dxAlertWindow for that.
-
I think leaving the spaces as is (C3) may be the least annoying solution.
-
Do I remember correctly that the standalone formatter doesn't use the expert DLL anymore? That should make debugging much easier.
-
21 minutes ago, dummzeuch said:There is no option (as far as I know, I might have missed it). And I remember seeing a comment in the original formatter sources from Egbert van Nes that he implemented this behaviour because he couldn't get the formatter handle these comments in any useful manner without breaking the source code.
If anybody really wants to use that kind of comments: I am accepting patches.
OK then, I'll see if I can give it a try.
-
23 minutes ago, Lars Fosdal said:/off-topic Preferences of code. I like begin/end for clarity.
However, I also like unusual breaks before then and strange indentations of single statements. If only I could convince the formatter to do my bidding.procedure MyProcedure(a, b: Boolean); begin if a then begin if b then Beep else Beep end else begin if b // Kommentar then Beep else Beep; end; end;
I'd just use begin/end here too, but that's difficult because of my charcter counting colleague. 😉
-
I have disabled the "Always break line between else and if" option, and I'm happy with the results.
However my colleague insists on having nested if-elses without begin/end pairs and on top mixes this with comments. A simplified example:
procedure MyProcedure(a, b: Boolean); begin if a then if b then Beep else Beep else // Kommentar if b then Beep else Beep; end;
This gets formatted toprocedure MyProcedure(a, b: Boolean); begin if a then if b then Beep else Beep else {// Kommentar} if b then Beep else Beep; end;
Is there an option to keep the lines separate under these circumstances? Do you deem the current behavior desirable?
-
21 hours ago, Remy Lebeau said:I don't know if this is covered in the documentation (I can't find it), but in TMetaFile's source code is the following comment:
Thanks, I didn't see that comment. And indeed it mostly works without the cloning. However without passing a reference DC <> 0 resolution/size still get mixed up. But as mentioned in my postscriptum I found a compatible DC, so that's only a cosmetic problem. :-))
-
I have an existing enhanced TMetafile in memory (technically speaking an array of them - it's a print preview) and want to add some text to it (page numbers). How can I best achieve that?
First I tried creating a TMetafileCanvas for the MF and added my text. But creating the TMetafileCanvas clears the existing MF, so no luck. Could I supress the clearing somehow?
The next idea was to clone the original MF:
OrigMF := // my metafile in memory CloneMF := TMetafile.Create; try CloneMF.Assign(OrigMF); MFCanvas := TMetafileCanvas.Create(CloneMF, 0); try MFCanvas.Draw(0, 0, OrigMF); // Draw my stuff on MFCanvas finally MFCanvas.Free; end; OrigMF.Assign(CloneMF); finally CloneMF.Free; end;
but I didn't manage to preserve the page dimensions, font sizes etc. The reference DC used to create OrigMF is gone and the combinations of properties like Width, MMWidth and Inch that I tried didn't help.
How could I clone OrigMF retaining these informations (that must be stored inside)?
PS: While writing this post I managed to dig out a reference DC that worked. But answers would be still interesting.
-
I had a look in the source code and decided I don't want to mess up GExperts' shortcut management. 😅
However I discovered that the relevant actions (actListSelectNext/actListSelectPrevious in TfmGrepResults) have SecondaryShortCuts assigned. These don't work for me out of the box but I assigned them in the config dialog:
I'll check how that works out for me.
-
3 hours ago, dummzeuch said:As for changing the functionality depending on the focus: Once you have used it once, the editor window has the focus, so how could the software know what you want?
I guess one could track the most recently focused one of the "target" lists.
3 hours ago, dummzeuch said:But anyway: GExperts can either use the shortcuts or not, there is no way that I know of to pass them on to the IDE.
Maybe it could work to have the shortcuts enabled (i.e. <> 0) only if the Grep result list is focused? I'll see if I can play a bit with that.
Unit dependency viwer
in I made this
Posted
Works now for me. I loaded our historically grown monster project and it was parsed quickly and without obvious errors. 😉