Jump to content

Pat Foley

  • Content Count

  • Joined

  • Last visited

Community Reputation

35 Excellent

1 Follower

Technical Information

  • Delphi-Version
    Delphi 10.4 Sydney

Recent Profile Visitors

1076 profile views
  1. These show my idea of controllers. Each controller is the dashboard of it's controlled domain. Better example would be a spinbutton changing a calendar view to start each week on say Sunday verses Monday. Another spinbutton changes the month the calendar view is looking at. The hours worked and leave taken each day is retrieved from DB. This Viewer was made to show a vendor that there was too much "separation of concerns" when they put vacation leave on one view and hours worked on another view. Viewer example loaded leave and hours worked on same view so adjusting for a consistent 40 hours each week when mixing benefits with hours worked was much easier. In time the vendor merged the views. Rather than actions or using TApplicationEvents. I make the DM UI aware by adding Forms and Controls to its user cause. When the application forms are created, editboxes, labels and panels are added to lists in the Event module. Note the mainform or other forms are not added to uses clause. The controls added in EM Eventmodule parent is set to panel or form passed in. but control onevent is direct consumed by the model. That makes it easier to debug IMHO. constructor TEventBoss.Create(AOwner: TComponent); begin inherited; Headings := TStringList.Create; Panels := TList<Tpanel>.create; //so controls can be added at run time Jobs := Tlist<TProc>.create; //needs empty parens to work Job() Edits := TList<TtextPair>.create; //TtextPair = Tpair<Tcomponent, Tcomponent>; Jobs.add(checkforWhiteSpace); //in the Edits list only states white space does not "change" //the value.
  2. Invert the scheme have the controllers on top and have them carry their own forms for additional display or tuning. Just set the properties the controller "looks at," drop on a form and use.
  3. Pat Foley

    "Fatal: F2048 Bad unit format" error in Delphi 10 Seattle

    Typing where dcc*.exe at the command line shows all Delphi pathed. only 10.4 and 11 pathed on my machine. I wonder why Delphi needs the system path set, wouldn't the registry be more modern pathing?
  4. Pat Foley

    Debug Points won't clear

    Use the Finder typing Debug should yield view breakpoints.
  5. Use the Rs to help. Records aRRays of Record // Reuse records by Repeat or iteRate Report the UI showing the data -additional Array[0..8*4] of TFrame //later -Input First build an app with a Stringgrid.Row[iteRater].commatext := Format('%d , %d ... [data[1],data[2]]) // convert what you have into csv format. Reduce -In Design window assign the same event to Controls calling the same procedure. Or assign event when loading UI controls at runtime. Use a Reference in that procedure - UpdateMatch(AGame: TMatch; Sender as TWinControl.Tag; Regulate the UI showing the data against time -Future matches use LeftTeam, RightTeam assigned Record with Nation string set to 'to be determined' -When the game is history the match.LeftTeam is assigned the team Use records using keys and several tables using these keys. TTeam = Record TLA, //Key Nation: string; Bracket end; TMatch = Record GMT,LocalTime: TDateTime; LeftTeam, RightTeam: TTeam; Keyed to a team or initial value end; TGamePlay = Record Game: TMatch; Keyed Team: TTeam; Keyed Yellows, Reds, Fouls: Integer; end; I would start with two hours reviewing the baseball code shared by Ray Konopka. https://delphibydesign.com/downloads/ DelphiGenerics.zip Pat
  6. Pat Foley

    Set focus on dialog box button

    Since you are working with Delphi now. There's a lot to learn about how get Delphi to speak to the Oracle or least a database. One step is learning about TDataModule. They're used in some examples. The quote has a button click inside a double click which is inside a dialog. How about enabling controls when needed. Hiding buttons are bad, better to have disabled buttons as placeholders with hints what is needed first. Pat
  7. Pat Foley

    Calculation problem

    Here's idea make a Tlist<TQuadbeam> to help separate the UI from the math. I marked up the UI to help.
  8. Pat Foley

    10.4.2 IDE crashes on start

    Sorry the tips didn't work. The 11.1 works very well on my laptop as did 10.4.1 and 10.3. Each one is always an improvement. Does the app made on Seattle machine run on the laptop that may check if the anti-virus and Access like what you are doing. The tip about loading the form in runtime is to allow not loading the suspect form dfm into design window. just have in same directory. Sometimes the IDE's browsing path gets out of sync with the compiler path.
  9. Pat Foley

    10.4.2 IDE crashes on start

    Try this in the new test project put in the code units and dfms that are not loading yet. you are already 3/8 done. This may find path error caused by code squished into small laptop. 🙂 implementation uses frmMemUnit;// put not in dpr or project var frmMemoTest: TffrmMemo; frmMainTester.btnClick(Sender: TObject); begin frmMemoTest:= TffrmMemo.create(application); // set break here or memoforms.create; frmmemoTest.Show; end;
  10. Pat Foley

    10.4.2 IDE crashes on start

    You could try this: Open new app and open a unit of the code hanging the IDE. The IDE code window draws red squiggly and warning mark where the defects are. If the units DFM is flawed that should turn up. Or top down approach is start the project with projx.dpr not projx.dproj. In case they are out of step.
  11. Pat Foley

    difference .optset and .dproj file

    A projectgroup may what what you want. Best to keep it all multi-device FMX switching the target platform in the project manager.
  12. Reading between the lines means learning actuarial science as side effect you learn how use various tools perhaps getting tools paid for as intern. The time spent porting would be better used becoming a Subject Matter Expert that way you know if the output is reasonable or just pretty.
  13. Pat Foley

    debugging crash

    I did have a crash when setting 64-bit debug to release on d11.1. And some wrecks running 10.4 in same time frame when switching over. To fix that mess I switched to 32 bit and hit compile all projects and also may have overwritten a .dproj or two by starting up with .dpr to get fresh dproj. I plan inspect the dcus freshness next time! 32==>64 is OK but 64==>32 may not have worked well on 10.4. On 11 64 debug ==> 64 release the custom components in Palette were dimmed when unable to load.
  14. Pat Foley

    Lost Code Format Menu option....

    Try using the finder(s) first type format in Title bar finder finds Options under tools then type formatter in options title bar.
  15. Pat Foley

    debugging crash

    First set a break point or hit F7 or F8 before running F9 that either key should run to cursor last position. It may be keys are remapped to Alt - F4 somehow.