Jump to content

Pat Foley

Members
  • Content Count

    428
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Pat Foley


  1. I been having the same issues with some custom components added to a package.  I renamed the old BPLs to BPLxxs and seemed to have fixed it. //The IDE uses BPLs for showing components in design 

    Have you used shift+ctrl+F to look for compxxx.    When it was happening the component disappeared taking its method assignments with it.  I would start second IDE and load back up copy to copy and paste aberrant component with property and method assignments. // When compiler detects unitsearchpath error I cancel loading fix the path first.  

     

     

    If you sanitized your system could the problem be transported in the myProject.dproj?   Maybe compare with earlier dproj?   10.2.3 (is Stoic does not "leave the room" or disappear like 10.4) when using find class in search menu then control B to see paths in IDE code editor.  


  2. I been having the same issues with some custom components added to a package.  I renamed the old BPLs to BPLxxs and seemed to have fixed it.

    Have you used shift+ctrl+F to look for compxxx.    When it was happening the component disappeared taking its method assignments with it.  I would start second IDE and load back up copy to copy and paste aberrant component with property and method assignments. 


  3.  

    Quote

    meanwhile the mouse is over an entity in the editor

    https://stackoverflow.com/questions/6255248/controlclick-on-function-is-not-working-in-delphi-xe    

     

    Just hovering over a unpathed unit in an uses clause can cause a quick ending.  Issue with browsing path?

     

    The form screen position button in Design just happens to be in Bermuda triangle hot zone lower right hand code scrollbar edge.  

     

     

    formpositioner.png


  4. Here is a paper by Marco Microsoft Word - Delphi-and-Unicode_Marco-Cantu.doc (embarcadero.com)

     

    What about editing your dfms in a memo.  search for object: TLabel and insert the additional properties with offset.  You just type the control type in one edit box and the offset to insert and property name value pair in additional edit boxes.  when saved makes new improved dfm file. should be able to assign methods  too.  You need to cook your own search and insert coding.       

     

    An improvement over the years is the flow panel.  That may help in reducing number of views.     

     

    Above is one way to make two way. You edit the dfms and change the objects types to TswLabels  switched when running D10 to set the transparent property.  and just TswLabel = class(TLabel) otherwise.  


  5. Could it be you wanting namespace?    mainunithelpers.helpme   in case you have other helpme procedures.

      

    I put drawing procedures in a routines.pas by adding arguments to the procedure being moved.  The 

    arguments use Timage, TPanel or TForm to reduce dependences.   You simply pass the form you are working 

    in to procedure into your routines.pas 

    Unit routines
    uses forms;
    interface
    
    //  Procedure DrawBackGroundBMP(const aWidth, aHeight: Integer; anImage: TImage); // TImage is best passing canvas is tough 
    //  procedure DrawthingsEX(athingList:Tstrings; aForm: TForm);     //need to add forms to routines.pas 
    //  procedure DrawThings( aPanel:TPanel; Const FileandPathName:String;    
    //                          aThingList:Tstrings; aForm: TForm);   // A runtime control parent is assigned to aPanel and the controls onmousedown is assigned Aform.onMousedown
    
      procedure ShowBalloonTip(Control: TwinControl; Icon: integer; Title: pchar; Text: PWideChar;
                 BackCL, TextCL: TColor);
     Implementation
     
     procedure ShowBalloonTip(Control: TwinControl; Icon: integer; Title: pchar; Text: PWideChar;
    BackCL, TextCL: TColor);
    const
      TOOLTIPS_CLASS = 'tooltips_class32';
      TTS_ALWAYSTIP = $01;
      TTS_NOPREFIX = $02;
      TTS_BALLOON = $40;
      TTF_SUBCLASS = $0010;
      TTF_TRANSPARENT = $0100;
      TTF_CENTERTIP = $0002;
      TTM_ADDTOOL = $0400 + 50;
      WM_User = $01;
      TTM_SETTITLE = (WM_USER + 32);
      ICC_WIN95_CLASSES = $000000FF;
    type
      TOOLINFO = packed record
        cbSize: Integer;
        uFlags: Integer;
        hwnd: THandle;
        uId: Integer;
        rect: TRect;
        hinst: THandle;
        lpszText: PWideChar;
        lParam: Integer;
      end;
    var
      hWndTip: THandle;
      ti: TOOLINFO;
      hWnd: THandle;
    begin
      hWnd    := Control.Handle;
      hWndTip := CreateWindow(TOOLTIPS_CLASS, nil,
        WS_POPUP or TTS_NOPREFIX or TTS_BALLOON or TTS_ALWAYSTIP,
        0, 0, 0, 0, hWnd, 0, HInstance, nil);
      if hWndTip <> 0 then
      begin
        SetWindowPos(hWndTip, HWND_TOPMOST, 0, 0, 0, 0,
          SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE);
        ti.cbSize := SizeOf(ti);
        ti.uFlags := TTF_CENTERTIP or TTF_TRANSPARENT or TTF_SUBCLASS;
        ti.hwnd := hWnd;
        ti.lpszText := Text;
        Windows.GetClientRect(hWnd, ti.rect);
        SendMessage(hWndTip, TTM_SETTIPBKCOLOR, BackCL, 0);
        SendMessage(hWndTip, TTM_SETTIPTEXTCOLOR, TextCL, 0);
        SendMessage(hWndTip, TTM_ADDTOOL, 1, Integer(@ti));
        SendMessage(hWndTip, TTM_SETTITLE, Icon mod 4, Integer(Title));
      end;
    end;

        

     

     


  6. Quote

    My claim is that, unless you link with run-time packages or share code between design-time packages, it's perfectly acceptable to put everything into a design-time package if you can. I.e. you don't need the run-time package.  This also makes creating and maintaining design-time packages so much easier.

    Design package DX still makes a BPL.   Can the .dproj help switching the packages from 32 to 64 or hide them in mmx.       


  7. Quote

    As see as an application, my software could be viewed as a "track editor".

    Track editor yielded music "track" first

     

    Trail Editor found following // did not try since not secure.  

     

    Trail Tech's Ride Leader GPX Editing Software  

     

    In the western mountains trails are called either, one track ~ one person wide or two track ~ wagon wide.

     

     

    Often web pages have embedded additional terms for the search engine to find. Meaning use your terms for product naming and add terms so others can find your site.   

    • Like 1

  8. S:array[0..23] of ansichar
    
    THeader = Record
        flags : integer;
        dummy  : integer;
        name: S;
        //padding: integer;
    end;

    That may be enough to get you started just determine the array size and the correct encoding.  If you wanting to do the easy way use component streaming or simply loadfromfile and value pairs. 

     

    This example was "streamed" by copying from design and pasted here.   You can "stream" it by copying it and pasting in your design.      

    object Memo1: TMemo
      Left = 56
      Top = 40
      Width = 185
      Height = 89
      Lines.Strings = (
        'Flag=true'
        'Dummy=" "'
        'name=Pete2005'
        '')
      TabOrder = 0
    end

     


  9. Quote
      4 hours ago, vhanla said:

    Another interesting thing is, that creating a FMX application (in this case 2D mutidevice application) it always creates a Unit2 /TForm2 as main initial form even though there is no Unit1, at least here on my Delphi 10.3 Update 3 Rio installation.

    Is there a Unit1 already present in the source folder, if not in the Project? When creating a new unit, the IDE looks at existing units in the folder and chooses the highest unused sequential number.

    Or in the Default folders under Tools either shared repository or Default project.  


  10. procedure TForm1.LocationSensor1LocationChanged( 
    ...
    // Translate location to address
        if Assigned(FGeocoder) and not FGeocoder.Geocoding then
          FGeocoder.GeocodeReverse(NewLocation);
    
    //As described earlier, after Reverse Geocoding is completed, an OnGeocodeReverseEvent is fired.
    
      

    From sample.   I will bring out the win 7 machine with the FMX stuff on it but probably two days out.  I want to make two FMX programs this year Phone app that caches local data or least miles from North pole and miles West of home when cell towers down or out of range. A program to read topo map from Garmin 600t would nice too.      


  11. Ok  from your sample is your likewise event happening and is then using cached data or simply not  getting new data since in background. 

    procedure TForm1.LocationSensor1LocationChanged(Sender: TObject;
      const OldLocation, NewLocation: TLocationCoord2D);
    var
      URLString: String;
    begin
      // code for previous step goes here
    
      // Show Map using Google Maps
      URLString := Format
    Quote

     

     


  12. Quote

    So, after all the OnGeocodeReverse is triggered nicely but the labels themselves will only update if I, e.g. change to another tab, open close the multiviewer, something that force the redraw of the panel.

    If that's all you need just try show or set focus event to get the windows attention.  I think it would work better without the thread your callback event would simply wait its turn behind mouse events.   

×