Jump to content

Vandrovnik

Members
  • Content Count

    560
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Vandrovnik

  1. Just a guess: you may have files from older JCL/JVCL somewhere on your disk and it tries to use them, instead of this new version you want to use?
  2. Vandrovnik

    comma separated values in DBEdit

    I would use plain tEdit.
  3. Vandrovnik

    [Android] How to change regional settings

    You can still use: var MyFormat: TFormatSettings; MyFormat:=TFormatSettings.Create; // obtains default settings if pos('yyyy', MyFormat.ShortDateFormat)<=0 then MyFormat.ShortDateFormat:=StringReplace(MyFormat.ShortDateFormat, 'yy', 'yyyy', []); ... DateToStr(now, MyFormat);
  4. Vandrovnik

    Write blob field to database from client

    Would it help, if you use ms.Position := 0; before .LoadFromStream(ms)?
  5. Vandrovnik

    Android app does not start after migration to Delphi 11

    I have upgraded to Delphi 11.1. I have deleted folders Android\Debug, Android\Release, Android64\Debug, Android64\Release. Now it works 🙂
  6. Use full (absolute) path for JpgFileName and dest_path, such as F:\img etc.
  7. These numbers are randomly distributed? When not, it might be more space efficient to store differences (after converting them to integers). If differences are small, you could use variable-length storing (7 bit data, 1 bit as indicator, that another byte is used). And finally a compression.
  8. It is a feature, not a bug 🙂 (I have never seen it before.) https://docwiki.embarcadero.com/RADStudio/Sydney/en/W1013_Constant_0_converted_to_NIL_(Delphi)
  9. I also use FreeAndNil - if I ever forget that an object was already freed with .Free, app might be working fine or give an AV "sometimes". When I use FreeAndNil and by mistake try to use freed object later, I am sure it always gives AV. I would not use FreeAndNil in time-critical parts, but there are almost none in my apps.
  10. Vandrovnik

    ANN: Better Translation Manager released

    Thank you, I did not realize that it is possible to use a filter 🙂 That will be enough.
  11. Vandrovnik

    ANN: Better Translation Manager released

    It works, that is really great! I have also add a Ctrl + right-mouse-click to find labels etc.: procedure TdmMain.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean); var PointClient: tPoint; Control: tControl; Form: tWinControl; begin {$IFDEF PrekladyBTM} if (msg.message=WM_RBUTTONDOWN) and ((msg.wParam and MK_CONTROL) <> 0) then begin Handled:=true; Form:=Screen.ActiveCustomForm; if Form<>nil then begin PointClient:=Form.ScreenToClient(Mouse.CursorPos); Control:=Form.ControlAtPos(PointClient, true, true, true); if Control<>nil then TranslationManagerIntegration.TrackControl(Control); end; end; {$ENDIF} end; Just a small notice: when I need to find a control and there are more properties in BTM, BTM often selects a property with "Don't translate". Please could you change it, so that BTM tries to select a property which should be translated?
  12. Vandrovnik

    Interbase VAR Licence and Demos or Free Versions

    I have never tried, but it seems it should work, at least for FB 2.5 they explicitly write about embedded version: https://firebirdsql.org/en/firebird-2-5/
  13. Vandrovnik

    Interbase VAR Licence and Demos or Free Versions

    Could you use Firebird for the free version? With server, or even embedded, so there is no need to install it.
  14. No, it is just a forward declaration.
  15. Just put this to the top: type tDrawingObjectList = class;
  16. Vandrovnik

    SynEdit changed with Delphi upgrade ?

    If you have SynEdit from GetIt, then yes, you may get newer version of SynEdit after installing newer Delphi. SynHighlighterMulti.pas is on C:\Users\MyUserName\Documents\Embarcadero\Studio\22.0\CatalogRepository\SynEdit-2022.03-11\Source\Highlighters\SynHighlighterMulti.pas on my computer in Delphi 11.1.
  17. What if you create the datamodule using Synchronize?
  18. Vandrovnik

    FB-3 Get Connected Clients IP Numbers

    But the result contains addresses - just IPv6, not IPv4...
  19. Vandrovnik

    LDAP connection

    Yes, but I do not know its name.
  20. Vandrovnik

    LDAP connection

    It was my function. It takes a string in the form "cn=Valek,ou=OOOO,o=XXX" and divides it to Cn "cn=Valek" and Base "ou=OOOO,o=XXX" (I was dividing it using the first coma in the input string.)
  21. Vandrovnik

    LDAP connection

    function LdapGetAttribute(aUserFqdn: string; aAttrib: string): string; var Ldap: TLDAPSend; Attribs: tStringList; Cn, Base: string; begin result:=''; Ldap:=TLDAPSend.Create; try Ldap.UserName:=Config.LdapUser; Ldap.Password:=Config.LdapPassword; Ldap.TargetHost:=Config.LdapHost; Ldap.TargetPort:=Config.LdapPort; Ldap.AutoTLS:=true; if Ldap.Login then begin if Ldap.Bind then begin Attribs:=tStringList.Create; try Attribs.Add(aAttrib); RozdelLdap(aUserFqdn, Cn, Base); // cn=Valek,ou=OOOO,o=XXX -> cn=Valek + ou=OOOO,o=XXX Ldap.Search(Base, false, '('+Cn+')', Attribs); if (Ldap.SearchResult.Count>0)and(Ldap.SearchResult[0].Attributes.Count>0) then begin result:=Ldap.SearchResult[0].Attributes[0].Text; end; finally FreeAndNil(Attribs); end; end; end; finally FreeAndNil(Ldap); end; end;
  22. Vandrovnik

    LDAP connection

    Hello, many years ago, I have used something like this for Novell eDir: function LdapOverPrihlaseni(aUserName, aPassword: string): boolean; var Ldap: TLDAPSend; begin result:=false; if aPassword='' then exit; Ldap:=TLDAPSend.Create; try Ldap.UserName:=aUserName; Ldap.Password:=aPassword; Ldap.TargetHost:=Config.LdapHost; // 'novell.xxxxx.cz'; Ldap.TargetPort:=Config.LdapPort; // '389'; Ldap.AutoTLS:=true; if Ldap.Login then begin if Ldap.Bind then begin result:=true; end; end; finally FreeAndNil(Ldap); end; end; ldapsend.pas was part of Synapse.
  23. I do use it in Delphi application...
  24. I have found and used this, instead of the outdated (maybe it is not in D11.1?) version in Delphi: https://github.com/CMCHTPC/DelphiDX12 But I do not use TDirect2DCanvas.
  25. Vandrovnik

    Deploy without overwriting the DB?

    In Delphi 11, it is in C:\Program Files (x86)\Embarcadero\Studio\22.0\source\rtl\common\System.StartUpCopy.pas in my installation. Help and doc - ehm... Did not find them.
×