-
Content Count
560 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Vandrovnik
-
Your Delphi/BCB version is not supported by this JVCL version!
Vandrovnik replied to Cirrus22's topic in Delphi Third-Party
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? -
I would use plain tEdit.
-
[Android] How to change regional settings
Vandrovnik replied to Fabian1648's topic in Cross-platform
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); -
Would it help, if you use ms.Position := 0; before .LoadFromStream(ms)?
-
Android app does not start after migration to Delphi 11
Vandrovnik replied to Vandrovnik's topic in FMX
I have upgraded to Delphi 11.1. I have deleted folders Android\Debug, Android\Release, Android64\Debug, Android64\Release. Now it works 🙂 -
Why jpg image is not created?
Vandrovnik replied to neumimnemecky's topic in Algorithms, Data Structures and Class Design
Use full (absolute) path for JpgFileName and dest_path, such as F:\img etc. -
Reduce storage space for floating point range
Vandrovnik replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
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. -
[DCC Warning] W1013 Constant 0 converted to NIL
Vandrovnik replied to dummzeuch's topic in RTL and Delphi Object Pascal
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) -
FreeAndNil() - The Great Delphi Developer Debate
Vandrovnik replied to AlexBelo's topic in Tips / Blogs / Tutorials / Videos
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. -
ANN: Better Translation Manager released
Vandrovnik replied to Anders Melander's topic in Delphi Third-Party
Thank you, I did not realize that it is possible to use a filter 🙂 That will be enough. -
ANN: Better Translation Manager released
Vandrovnik replied to Anders Melander's topic in Delphi Third-Party
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? -
Interbase VAR Licence and Demos or Free Versions
Vandrovnik replied to Juan C.Cilleruelo's topic in Databases
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/ -
Interbase VAR Licence and Demos or Free Versions
Vandrovnik replied to Juan C.Cilleruelo's topic in Databases
Could you use Firebird for the free version? With server, or even embedded, so there is no need to install it. -
Can an Object hold and object list of Itself?
Vandrovnik replied to AlanScottAgain's topic in Algorithms, Data Structures and Class Design
No, it is just a forward declaration. -
Can an Object hold and object list of Itself?
Vandrovnik replied to AlanScottAgain's topic in Algorithms, Data Structures and Class Design
Just put this to the top: type tDrawingObjectList = class; -
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.
-
Access violation on DataModule := TDataModuleMain.Create(nil);
Vandrovnik replied to ioan's topic in General Help
What if you create the datamodule using Synchronize? -
But the result contains addresses - just IPv6, not IPv4...
-
Yes, but I do not know its name.
-
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.)
-
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;
-
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.
-
D2D1Missing - Direct2D 1.1 ID2D1DeviceContext : How to use it?
Vandrovnik replied to gioma's topic in VCL
I do use it in Delphi application... -
D2D1Missing - Direct2D 1.1 ID2D1DeviceContext : How to use it?
Vandrovnik replied to gioma's topic in VCL
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. -
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.