-
Content Count
520 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Tommi Prami
-
Problem with Form/Window Caption on HIGH DPI, Delphi 10.3 and VCLStyles SKIN
Tommi Prami replied to ivancx's topic in VCL
If got link to Bugreport, would be more than willing to vote. -Tee- -
Is there GIS library for delphi (Free or very cheap)
Tommi Prami posted a topic in Delphi Third-Party
Just to tinker as hobby at home. Would not like to learn some other language to do some tinkering at home as hobby (et this point) -Tee- -
https://quality.embarcadero.com/browse/RSP-23624 -Tee-
-
If got an code : uses Winapi.msxml, Winapi.MSXMLIntf; procedure TForm10.Button1Click(Sender: TObject); var LDocument: IXMLDomDocument3; LCurrrentValueNode: IXMLDOMNode; LNodeList: IXMLDOMNodeList; I: Integer; begin LDocument := CoDOMDocument60.Create; LDocument.async := False; LDocument.validateOnParse := False; LDocument.ResolveExternals := False; LDocument.PreserveWhiteSpace := True; LDocument.loadXML(Memo1.Lines.Text); if LDocument.parseError.errorCode <> 0 then raise Exception.CreateFmt('XML parsing error : %s at row %d position %d', [LDocument.parseError.reason, LDocument.parseError.Line, LDocument.parseError.linepos]); if Assigned(LDocument.documentElement) then LNodeList := LDocument.documentElement.getElementsByTagName('IBAN') else LNodeList := LDocument.getElementsByTagName('IBAN'); for I := 0 to LNodeList.Length - 1 do begin LCurrrentValueNode := LNodeList.Item[I]; Memo2.Lines.Add(LCurrrentValueNode.nodeValue); end; repeat LCurrrentValueNode := LNodeList.nextNode; if Assigned(LCurrrentValueNode) then Memo2.Lines.Add(LCurrrentValueNode.nodeValue) else Break; until True; end; and XML <?xml version="1.0" encoding="UTF-8"?> <Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.02"> <BkToCstmrStmt> <Stmt> <Acct> <Id> <IBAN>FI0434270410003403</IBAN> </Id> </Acct> </Stmt> <Stmt> <Acct> <Id> <IBAN>FI7542316072000169</IBAN> </Id> </Acct> </Stmt> </BkToCstmrStmt> </Document> Any idea why getElementsByTagName doews not return Tags it should (I think). Once you're set to do something pretty simple and nothing works. I remember now why I do not enjoy the M$Xml too much. Also if you can recommend better replacement XML libraries, feel free to do so.
-
(I use 10.3.1) If got an code : uses Winapi.msxml, Winapi.MSXMLIntf; procedure TForm10.Button1Click(Sender: TObject); var LDocument: IXMLDomDocument3; LCurrrentValueNode: IXMLDOMNode; LNodeList: IXMLDOMNodeList; I: Integer; begin LDocument := CoDOMDocument60.Create; LDocument.async := False; LDocument.validateOnParse := False; LDocument.ResolveExternals := False; LDocument.PreserveWhiteSpace := True; LDocument.loadXML(Memo1.Lines.Text); if LDocument.parseError.errorCode <> 0 then raise Exception.CreateFmt('XML parsing error : %s at row %d position %d', [LDocument.parseError.reason, LDocument.parseError.Line, LDocument.parseError.linepos]); if Assigned(LDocument.documentElement) then LNodeList := LDocument.documentElement.getElementsByTagName('IBAN') else LNodeList := LDocument.getElementsByTagName('IBAN'); for I := 0 to LNodeList.Length - 1 do begin LCurrrentValueNode := LNodeList.Item[I]; Memo2.Lines.Add(LCurrrentValueNode.nodeValue); end; repeat LCurrrentValueNode := LNodeList.nextNode; if Assigned(LCurrrentValueNode) then Memo2.Lines.Add(LCurrrentValueNode.nodeValue) else Break; until True; end; and XML <?xml version="1.0" encoding="UTF-8"?> <Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.02"> <BkToCstmrStmt> <Stmt> <Acct> <Id> <IBAN>FI0434270410003403</IBAN> </Id> </Acct> </Stmt> <Stmt> <Acct> <Id> <IBAN>FI7542316072000169</IBAN> </Id> </Acct> </Stmt> </BkToCstmrStmt> </Document> Any idea why getElementsByTagName does not return Tags it should (I think). Once you're set to do something pretty simple and nothing works. I remember now why I do not enjoy the M$Xml too much. Also if you can recommend better replacement XML libraries, feel free to do so.
-
Trouble with (very) simple XML-parsing
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Did test with Xml.XMLIntf.pas IXMLDocument also. OmniXML as vendor or not. Made own recursive routine, based on OmniXML implementation, it'll find nodes just fine, but not node Values, which seems to be super weird. function GetElementsByTagName(const ADocumentElement: IDOMElement; const AElementName: string): TList<IDOMNode>; procedure InternalGetElementsByTagName(const ANode: IDOMNode; const AElementName: string; const ANodeList: TList<IDOMNode>); var I: Integer; LChildNode: IDOMNode; begin if ANode.HasChildNodes then for I := 0 to ANode.ChildNodes.Length - 1 do begin LChildNode := ANode.ChildNodes.Item[I]; if (LChildNode.NodeType = ELEMENT_NODE) and ((LChildNode as IDOMElement).NodeName = AElementName) then ANodeList.Add(LChildNode); InternalGetElementsByTagName(LChildNode, AElementName, ANodeList); end; end; begin Result := TList<IDOMNode>.Create; InternalGetElementsByTagName(ADocumentElement, AElementName, Result); end; -
Trouble with (very) simple XML-parsing
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
First test was there just to get an idea is there one and which it'll use. IT seems to depend on something. Done so many tests so can't really give specifics on that. At least that xpath down work, because structure of XML is not always same. It has to be more structure agnostic. -
Trouble with (very) simple XML-parsing
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
At least all the documentation I've found tells that it should. find others also. m$xml docs and also more generic DOM ones. What ever is the implementation is totally different story. -Tee- -
Trouble with (very) simple XML-parsing
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
With OmniXML dom I got slightly closer procedure TForm10.Button2Click(Sender: TObject); var LXMlDocument: IXMLDocument; LDomList: IDOMNodeList; LValueNode: IDOMNode; I: Integer; begin DefaultDOMVendor := sOmniXmlVendor; LXMlDocument := LoadXMLData(Memo1.Lines.Text); LDomList := LXMlDocument.DOMDocument.documentElement.getElementsByTagName(TAG_IBAN); for I := 0 to LDomList.length - 1 do begin LValueNode := LDomList[I]; Memo2.Lines.Add(LValueNode.nodeName + ': ' + LValueNode.nodeValue); end; end; it find the tags, but nodeValue returns empty. -Tee- -
Wrong Group... Sorry
-
Please don't hijack the conversation to offtopic.
-
Current 24" monitor with 1920x1200 has DPI/PPI (what ever) that makes most of the default fonts, like in Delphi ide too small (for me). Solutions I can think of Monitor with lower DPI but not smaller resolution (Cause now the desktop size is pretty limited). But all larger monitor seems to be 4K Way to change IDE font(s) to larger, not just code, which I use now size 12, but it gives me already just barely room horizontally to see code. Get large 4K display (if can) and raise DPI from windows. but at least previously et opened kind of can of worms. Delphi really should normalize the dfm always to the native 96 DPI, so it would be consistent and easy to compare. Is that a problem, are there teams that coders use different DPI? And if problems, does it really matter? Am I missing some obvious solution, than Quitting my job and move into wilderness, away from all the technology?
-
"Our current LTS release is 1.0.2, and it will be supported until the end of 2019." Seems that 1.0.x is close at its end of life. -Tee-
-
Lockfree approach on a Single reader, Multiple Writer queue
Tommi Prami replied to kokoslolos's topic in Algorithms, Data Structures and Class Design
My experience is that, if you are unlucky, bugs can lurk in multithreaded code way longer than in single threaded code. I have encountered (own and others) code, even single threaded, that should never have worked, but for reason or other, it always has been. Until it'll present it self in worst possible, time, place and way :D -Tee- -
Added: -x-fpr generates 3 times faster stack memory page probing code (RSP-19826) Added: Options -x-O1, -x-O2, -x-O3, -x-Ox that enable other optimization options More info.... Hope these optimizations would come to Delphi compiler directly. https://andy.jgknet.de/blog/2017/10/ide-fix-pack-6-1-released/ https://andy.jgknet.de/blog/2018/06/ide-fix-pack-6-3-released/
-
Solution(s) for coder with quite poor eyesight
Tommi Prami replied to Tommi Prami's topic in Delphi IDE and APIs
As stated above, using other Dpi than 100% is not good. Because it'll affect into Dfm-files. And you just can't know is there true changes between two, if edited with environments with different Dpi. If Delphi woulöd normalize the dfm into 100% font sizes, and Form editor would be totally Dpi agnostic, at design time, it would be way easier to work in a team with different Dpi environments, -Tee- -
Solution(s) for coder with quite poor eyesight
Tommi Prami replied to Tommi Prami's topic in Delphi IDE and APIs
How sharp was the text in that situation? -Tee- -
Solution(s) for coder with quite poor eyesight
Tommi Prami replied to Tommi Prami's topic in Delphi IDE and APIs
Any models available for those specs... That would be better than nothing. Not more desktop area tough. -Tee- -
Solution(s) for coder with quite poor eyesight
Tommi Prami replied to Tommi Prami's topic in Delphi IDE and APIs
Might be, but I would specifically need more than 100% font size if use 4K monitor, even on very large one. -Tee- -
Solution(s) for coder with quite poor eyesight
Tommi Prami replied to Tommi Prami's topic in Delphi IDE and APIs
Pumped into this on, somewhere in here : https://github.com/zMotoR/IDEFont Seemed like perfect solution, but it'll change the Font size of the Form editor also, which leads into resized components on the form. Filed an issue for the projects, don't know is it possible to set font form by form, in the IDE; but that plugin is very close what would be good enough for me. -Tee- -
Solution(s) for coder with quite poor eyesight
Tommi Prami replied to Tommi Prami's topic in Delphi IDE and APIs
At least we had to set all of our desktops (Previous versions of Delphi at least) to 100% font size/DPI setting, because Delhi will save the Dpi value to the Dfm, and sizes of components are scaled also. Should do quick test tough... -
Solution(s) for coder with quite poor eyesight
Tommi Prami replied to Tommi Prami's topic in Delphi IDE and APIs
I use Win10, latest version. Previously Delphi saved the higher DPI to the dfm, and therefor you jsut can't compare changes on saved on different machines (with different DPI). Would be super cool if deDelphi would always save as standard 96dpi not the one dev machine happens to use. -Tee- -
We use DUnitX and it discovers all our silly mistakes before release
Tommi Prami replied to Lars Fosdal's topic in DUnitX
That issue is closed, is there duplicate, or why is that? Any idea? Issue states fixed in 10.2 if I understand... -
ANN: Parnassus Bookmarks and Navigator will be included in the next release of RAD Studio
Tommi Prami replied to Dave Millington (personal)'s topic in Delphi Third-Party
Removed the experts from my Tokyo installation, works not, not optimal tough... -
ANN: Parnassus Bookmarks and Navigator will be included in the next release of RAD Studio
Tommi Prami replied to Dave Millington (personal)'s topic in Delphi Third-Party
Yep, I also had XTokyo one, but will it just load wrong one...