Pat Foley
Members-
Content Count
403 -
Joined
-
Last visited
-
Days Won
2
Pat Foley last won the day on August 9 2023
Pat Foley had the most liked content!
Community Reputation
51 ExcellentTechnical Information
-
Delphi-Version
Delphi 12 Athens
Recent Profile Visitors
7946 profile views
-
I thought Remy mentioned using Add with a memo control. Here is a Sample using a nested procedure and a procedure with arguments that pass in controls that update the UI as needed. This sample uses both Format and ToString to help show the logic in the Controls as the program runs. implementation {$R *.dfm} const BooleanOperators: TArray<string> = ['And', 'or', 'xor','NotAnd','NotOr']; var A, B, RC: Boolean; procedure TForm13.Button1Click(Sender: TObject); begin A := True; B := True; // filter the controls props here use nil or '' if control or string not made yet demo357Repair(Memo1.Lines, Listbox1.Items, nil, A, B); end; { TForm13 } /// <summary> /// The TStrings of TMEMO are passed and requires a Memo1 and a Listbox1 to work /// /// </summary> procedure TForm13.Demo357Repair(const memoStrs, lbAItems, lbBItems : TStrings;var argA,argB: Boolean); // this flyover updates the value of RC each pass // how would you update A each time function flyoverCase(const Idx: NativeInt): Boolean; begin case Idx of 0: Result := argA and argB; 1: Result := argA or argB; 2: Result := argA xor argB; 3: Result := not argA or argB; // adjust these to suit your schema 4: Result := argA and not argB; else begin Result := False; memoStrs.Add('flyover needs attention');//surface errors end; end; // A := Result; // UX = User outputs memoStrs.Add( Format('%2s = %2s %s %2s', [RC.toString, argA.ToString(True), BooleanOperators[Idx], ArgB.ToString(False)]) ); lbAItems.Add(RC.ToString); //how would you connect lbBItems end; begin for var I := Low(BooleanOperators) to High(booleanOperators) do RC := flyoverCase(I); end;
-
I like the extra one or two code lines showing gained by not showing them. If only the debug pause button had a key.
-
How do I set debugging ranges with-in lines?
Pat Foley replied to JohnLM's topic in Delphi IDE and APIs
procedure TForm1.Button1Click(Sender: TObject); begin 1 2 -- debugging started via F8. 3 4 5 6 7 -- stop debugging after this. so if i press F8, debugging will not continue to step past it 7. // move to end 8 9 end;// <== put break point here to stop loading the next block or unit use F9 to resume or f7 to enter By putting a trap at the end lets you use F9 to advance to trap to either move to next routine or F9 to run. As the program is debugged these traps are last to remove. -
Does baseform have the onMyEvent assigned to empty event simply a frameclick(Sender:TObject)begin..end? doing that allows the inherited form a stub to hook up its event.
-
The feature I like best is the time loading metric when starting the IDE... Mostly the reading is 1728 if the reading is above 22xx I will restart the IDE several times to freshen the OS file MRUs/caches. When the reading was 65xxx the machine was having a quota issue*. It would interesting to compare MMX load time on different machines. The tip of the day, refactor with and link-analyzer are used or useful. Thanks for providing it. *Edge died off then and only D12 ran albeit no Co-Pilot . The next months windows update fixed the issue.
-
I had had some luck following these rules. Place only mature controls in the palette. If a control coding is changed just select Install that seems to tell the IDE to do the right thing. Needs to be 32 bit to see install. Any existing control needs removed from the designer view with ctrl X and the control gets the update as it pasted back in. This saves restarting the IDE. Check the path of control ensure that it's codebase made the trip to 290 and not using a control that using a 11 or 280 codebase. Have a sub project that allows the custom controls and forms to be compiled as standalone allowing modular construction getting custom controls working. then the main project uses the forms that have the controls placed on them.
- 11 replies
-
- rad studio c++ builder
- custom components
-
(and 1 more)
Tagged with:
-
Only 2 GB available despite IMAGE_FILE_LARGE_ADDRESS_AWARE
Pat Foley replied to dummzeuch's topic in Windows API
My machine shows the same but shows 131.xxx when compiled as 64 I set the kernel32 to Kernelbase. My swapfile is hard set at 2917 or so. -
Features of using command line compilers for Android64, Linux64, MacOS64, iOS64.
Pat Foley replied to dmitrybv's topic in Cross-platform
1. Read the "hints" on the error your compiling for "32" 64 with version 35.0 compiler switched to using a D11 path. I would say its a proj copied from d11 codebase to to a d12 codebase that kept the d11 proj guid. -
Delete
-
My tool suspects the load.php? business most. We will see what happens.
-
They could get a free trial of a Tool to resolve issue here https://www.idera.com/ppc/precise/performance-intelligence-from-click-to-storage/ That product may provide a remedy.
-
1. form := GetParentForm(AControl); 2. example speedbutton click overridden to allow click to jump to control on another form. TpfJumper = class(TSpeedButton) private FgotoName: string; FgotoControl: TControl; procedure SetgotoControl(const Value: TControl); procedure SetgotoName(const Value: string); // procedure onclick; protected procedure Paint; override; public property gotoControl: TControl read FgotoControl write SetgotoControl; property gotoName: string read FgotoName write SetgotoName; published { Published declarations } procedure Click; override; end; 3. The events for the Control. Procedure TpfJumper.Paint; begin with Canvas do begin brush.Color := clMoneyGreen; Point(85,21),Point(17,0)]); polygon([Point(68,0),Point(68,7),Point(85,7),Point(85,34),Point(68,34),Point(68,41), Point(0,21),Point(68,0)]); end; end; procedure TpfJumper.click; begin inherited; gotoControl.Show; end; 4. In the designer you can assign several controls to one event. In the handler cast the sender as needed.
- 5 replies
-
- vcl
- component classes
-
(and 2 more)
Tagged with:
-
"Death to WITH" in your Delphi Code
Pat Foley replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
How about qualified with. procedure TMyForm.UpdateInventoryItem(const NewQty: Integer); procedure &With(A: TDataModule; B: TTable; const NewQty: Integer); begin B.Edit; B.FieldByName('Qty').AsInteger := NewQty; B.Post; end; begin &With(dmStoreInventoryData, dmStoreInventoryData.tblUpdateItemForStore, NewQty); end; -
How about a second machine for the user. They can view old work flows to gain insight on the work flows they are working on presently. This second machine is simply left on so it doesn't need to download the "knowledge base" each time a user wants to know how a work flow was implemented last time. Since a second machine and screen is used you could charge additional license fees. If the user can get more done each day by running a second application on second machine it should pay off since first machine used for work orders and IT work done concurrently on second machine albeit losing their "knowledge base" view when backing up. In short, Historian functions adds a lot of overhead in bandwidth and screens!
-
How about procedure TChangeForm.dostuff(inDBName, inDBTable, inTable: Variant) begin if not assigned(Changeform) then Changeform := Tchangeform.create(Application); // hookup up the incoming // end;