

Pat Foley
Members-
Content Count
433 -
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
54 ExcellentTechnical Information
-
Delphi-Version
Delphi 12 Athens
Recent Profile Visitors
-
I actually looked at some JS code and Physics for Game Developers by Bourg for stuff on Quaternions. The Model-3D sample may be a start. Years ago at a talk about making the Matrix movie the speaker said the stuff in background was all 2D "decals". And it takes three years of schooling for 3D. (Also even a graphic artist needs know linux to get hired.) procedure TModel3DTest.Form3DMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Single); begin if (ssLeft in Shift) and Mouse then begin DummyX.RotationAngle.X := DummyX.RotationAngle.X - (Y - Down.Y)* 0.3 ; DummyY.RotationAngle.Y := DummyY.RotationAngle.Y + (X - Down.X)* 0.3 ; Down.X := X; Down.Y := Y; end; end;
-
What making One Application for now. And Run it Three times at a time. set the Parameters Data1.dat , Data2.dat, Data3 for first app. set the Parameters Data2.dat , Data3.dat, Data1 for Second app. set the Parameters Data3.dat, Data1.dat, Data2 for Third app. ... procedure FindDeltas( const Param{1}, Param(2), Param(3)); begin Old code in here end; Is it a lazy steer that its 'looking' at?
-
What version I using 12.2 and tried this IDE insight and it works well with the keyboard. start Delphi Press <F6> and enter VCL Using down arrows select Windows Application Press<F6> enter VCL select VCL form Press<F6> Enter TButton Repeat above as needed. Press<F6> Enter Help
-
Looking for CBuilder/VS help on C open source project
Pat Foley replied to Vincent Parrett's topic in Job Opportunities / Coder for Hire
You are right. The files to look at is web.pas has var dom, console, and window. The js.pas uses JSValue and parses JSON objects unsure if the eval can do multiline. -
Looking for CBuilder/VS help on C open source project
Pat Foley replied to Vincent Parrett's topic in Job Opportunities / Coder for Hire
What about Lazarus pas2js This screen capture Shows the source in the js.pas. Its hid in the co..\pas2js\Demos -
Share a data between two units in dynamic loaded BPL.
Pat Foley replied to CRO_Tomislav's topic in VCL
Would not using global variables for any forms and using unique name for forms to use make it a better idea. To reduce complexity a TreeView is loaded in mainform with nodes referencing the forms being created. The Treeview can then be parented to the Active form to let the user navigate the app readily. A DM can help surfacing the data through the UI. -
Share a data between two units in dynamic loaded BPL.
Pat Foley replied to CRO_Tomislav's topic in VCL
You might to study and use this to move cursor to control being selected. I want to add it to IDE <F6> or <Ctrl>. function it only jumps to selection without any animation 🙂 procedure TTaskmaster.moveMouse(AtaskDetail: TInstruction); var x, y, MouseXError, MouseYError: integer; ControlCenter: Tpoint; AC: TControl; begin findControl(AtaskDetail, AC); if not assigned(AC) then exit; if assigned(AC.Parent) then AC.Parent.Show; AC.Show; x := AC.ClientOrigin.X + AC.width div 2; y := AC.ClientOrigin.y + AC.height div 2; begin MouseXError := round(1.12 *(x - mouse.CursorPos.X)); MouseYError := round(1.12 * (y - mouse.cursorPos.y)); // MouseXError := min(MouseXError, 10 * sign(MouseXError)); // MouseYError := min(MouseYError, 10 * sign(MouseYError)); controlCenter.X := mouse.CursorPos.x + MouseXError; controlCenter.Y := Mouse.CursorPos.y + mouseYError; mouse.CursorPos := ControlCenter; end; repeatTask := (abs(MouseXError) > 7) or (abs(MouseYError) > 7); end; -
Share a data between two units in dynamic loaded BPL.
Pat Foley replied to CRO_Tomislav's topic in VCL
This should yield control asked for. procedure TTaskMaster.findControl(AtaskDetail: TInstruction; var AC: TControl); var ff, ii : integer; sForm, sControl: string; begin with AtaskDetail do begin if Control <> nil then AC := Control else begin sForm := controlForm + ' not found.'; sControl := controlName + ' not found.'; //screens move about on windows list top window usually 0 :( for ff := 0 to Screen.FormCount - 1 do if Screen.Forms[ff].name = controlform then begin sform := controlForm; with Screen.Forms[ff] do begin for ii := 0 to componentcount - 1 do if Components[ii].Name = ControlName then begin sControl := controlName + ' comps ' + ii.ToString; Control := Components[ii] as Tcontrol; //onBS(False, format('Item %d Found %s',[ii,controlName])); break; end //else//if name //run := false; // onBS(False, format('Item %d not found %s',[ii, controlName])); end;// with screen forms end; //if screen.forms onBS(False, sForm + ' ' + sControl); end;// else end;//with taskdetail end; What TInstruction is TInstruction = class //position in Db Atom: PAtom; Control: TControl; ControlForm: string; //3 ControlName: string; //2 Description: string;//6 //Nu: integer; //0 Kind: string; //1 was integer KindNU: integer; referenceValue: Double;//5 tagName: string; //4 tagValue: Double; //no data in table end; -
Share a data between two units in dynamic loaded BPL.
Pat Foley replied to CRO_Tomislav's topic in VCL
One thing about XML is on a treeview each node needs a unique caption so as tabSheets or the parent of control wanted are added a number is added to the node's caption as the forms are added. Second thing is the Control could have data reference added. type // On the UI controls side carry some data references for convenience // the data side could use Dependance Injection to tie in UI controls TDataButton = class(TButton) Form: TControl; Strs: TStrings; end; What's neat about MDI you can create a new childform inside a begin..end. To access the form elsewhere use Application.Screen -
Retrieving outlook contact emails
Pat Foley replied to Connie McBride's topic in Algorithms, Data Structures and Class Design
I used the code for reverse phone lookup that's for an xxx with xx,xxx outlook accounts. You need to make a custom list of clients, a Client group email and ... then as employees come and go you add remove their access to the companies Client email account. Or you could enhance your application by logging when clients are added, contacted, removed from client list. I sent out emails and SMS each week to departments as client schedules were updated. -
Retrieving outlook contact emails
Pat Foley replied to Connie McBride's topic in Algorithms, Data Structures and Class Design
Again I would use OutLook to make the output using export. example mapping https://jkp-ads.com/rdb/win/s1/outlook/mail.htm Also here is some old (2017) Excel code from Ron's earlier site Sub DemoAE() Dim colAL As Outlook.AddressLists Dim oAL As Outlook.AddressList Dim colAE As Outlook.AddressEntries Dim oAE As Outlook.AddressEntry Dim oExUser As Outlook.ExchangeUser Set colAL = Outlook.session.AddressLists '("Offline Global Address List") For Each oAL In colAL 'Address list is an Exchange Global Address List If oAL.AddressListType = olExchangeGlobalAddressList Then Set colAE = oAL.AddressEntries For Each oAE In colAE If oAE.AddressEntryUserType = _ olExchangeUserAddressEntry _ Or oAE.AddressEntryUserType = _ olExchangeRemoteUserAddressEntry Then Set oExUser = oAE.GetExchangeUser ' Debug.Print (oExUser.JobTitle) ' Debug.Print (oExUser.OfficeLocation) ' Debug.Print (oExUser.BusinessTelephoneNumber) ' Range("A1").Offset(X, 1) = oExUser.JobTitle Range("A1").Offset(X, 9) = oExUser.ID 'OfficeLocation Range("A1").Offset(X, 8) = oExUser.MobileTelephoneNumber 'HomeTelephoneNumber Range("A1").Offset(X, 7) = oExUser.Name 'Range("A1").Offset(X, 5) = oExUser.PrimarySmtpAddress X = X + 1 End If Next End If Next End Sub -
Even holding the mouse over the symbol should show its unit and line! // since I loaded it look how TStrings Visualizer vs the IDE code screen in rendering in 12.2
-
Retrieving outlook contact emails
Pat Foley replied to Connie McBride's topic in Algorithms, Data Structures and Class Design
One way is save as .pst file or .csv file inside of Outlook. Second way is use VBA to learn the names of methods that Outlook uses to save lists in different formats. -
I think the issue lies in the coding, each series properties needed be updated consistently. This example shows renaming the series and the labels to allow a consistent means of updating the control. Consistently meaning each control deals only with the data it was named and Created for. procedure TForm1.Button1Click(Sender: TObject); const labelAft = 'Afternoon'; labelNite = 'Nite'; labelDay = 'Day'; ShiftDayFraction = 8/24; clNite = clRed; var seDay, seAfternoon, seNight: TGanttSeries; begin seDay := Series1; seAfternoon := Series2; seNight := Series3; seNight.Clear; seDay.Clear; seAfternoon.Clear; var addC: Boolean := CheckBoxBreakLabels.Checked; var startDate: TDateTIme := Now; startDate.SetTime(4, 0, 0, 0); seDay.AddGanttColor(startDate + ShiftDayFraction, startDate + 2 * ShiftDayFraction, 1, labelDay, clGreen); if addC then seAfternoon.AddGanttColor(startDate + 2 * ShiftDayFraction , startDate + 3 * ShiftDayFraction, 3, labelAft, clBlue); seNight.AddGanttColor(startDate, StartDate + ShiftDayFraction, 2, labelNite, clNite); // seNight.AddGanttColor(startDate, StartDate + ShiftDayFraction, 1, 'Sametimeline', clNite); end;
-
GroupDescendentsWith - Why 'TCustomAction' is promoted to TControl?
Pat Foley replied to GabrielMoraru's topic in VCL
So that it is found in the controls list of the control or component vs the components list of a form or application.