

mvanrijnen
Members-
Content Count
492 -
Joined
-
Last visited
-
Days Won
1
Everything posted by mvanrijnen
-
ANN: Sempare Template Engine for Delphi
mvanrijnen replied to darnocian's topic in Delphi Third-Party
thnx, works like a charm like this. -
ANN: Sempare Template Engine for Delphi
mvanrijnen replied to darnocian's topic in Delphi Third-Party
Little problem with records, not sure if its Sempare or just delphi ande rtti on records some quick test code: TTestRecord=record ID : Integer; TypeID : integer; Description : string; Vehicle : string; ChildRecords : TArray<TTestRecord>; procedure Init; function SubResource(const AType : Integer; var AResource : TTestRecord) : Boolean; function SubResources(const AExceptTypes : TIntegerSet) : TArray<TTestRecord>; end; const CNST_HTMLTEMPLATE_RESOURCE = '<font face="calibri" size="12">'+ '<b>(<% id %>) <% description %></b><br><br>'+ '<% Vehicle %><br>'+ '</font>'+ '<font face="calibri" size="10">'+ '<% for subres in ChildRecords %>SubRes: |<% subres.Description %>|<br><%end%>'+ '</font>'; var tpl : ITemplate; v1,v2 : TTestRecord; r : TTestRecord; begin tpl := Template.Parse(CNST_HTMLTEMPLATE_RESOURCE); v1.Description := 'xx11-22-33'; v1.ID := 1; v1.TypeID := 2; v2.Description := 'yy4455-66'; v2.ID := 2; v2.TypeID := 2; r.Description := 'maurits'; SetLength(r.ChildRecords, 2); r.ChildRecords[0] := v1; r.ChildRecords[1] := v2; r.Init; mmoResult.Text := Template.Eval(tpl, r); showmessage(r.Vehicle); end; i get not the result i expected on the subres.description, I get 2 times SubRes: but the description field stays empty in the parsed result? -
ANN: Sempare Template Engine for Delphi
mvanrijnen replied to darnocian's topic in Delphi Third-Party
Yes, would be nice if this would be configurable. In the solution i now have, i have to parse on server, and sometimes a second time on clients. If this is configurable, i can decide in the template where things are resolved. -
Ah ok, its for creating an API consumer, (my first thought was something for declaring API's,, e.g. like in radserver (which we are using right now)).
-
ANN: Sempare Template Engine for Delphi
mvanrijnen replied to darnocian's topic in Delphi Third-Party
ok, tnx for the quick response π For now, it's ok how it is, i will check next week for update. -
ANN: Sempare Template Engine for Delphi
mvanrijnen replied to darnocian's topic in Delphi Third-Party
thnx. other question, is it possible to use the engine multithreaded? (eg, can i have more engine instances in one process? ) -
ANN: Sempare Template Engine for Delphi
mvanrijnen replied to darnocian's topic in Delphi Third-Party
Looking now to implement the engine in an application here, but when i have a template like: Value: <% value %> Description: <% description %> I get double crl/lfs in the result? [edit] after inspection it seems like that the Template.Eval function adds an extra CR is added. (e.g. #$D#$A becomes #$D#$D#$A) quickfix: π Result := Template.Eval(FParsedTemplate, objrec).Replace(#13#13, #13, [rfReplaceAll]); -
Is it really that bad to Use boolean parameters to make your functions do two things?
mvanrijnen replied to Mike Torrettinni's topic in General Help
or use a const π const FILESEARCH_RECURSIVE = True; FILESEARCH_NONE_RECURSIVE = False; ... ... TFileSearcher.FindFiles('c:\', FILESEARCH_RECURSIVE); ... ... [edit] already mentioned i see now, sorry For myself i prefer the enumating way by the way. -
Compute nearest color
mvanrijnen replied to FPiette's topic in Algorithms, Data Structures and Class Design
Use HLS/HSL colorspace for distance ? -
Security - How freaky can you get!
mvanrijnen replied to ClΓ©ment's topic in Algorithms, Data Structures and Class Design
I'v (very long ago), published shareware, with (don't know which anymore) protection component (bought a component back then). 1 Day after publising the cracks where available on the internet π (and this was a niche product, some tooling for Progress 4GL, but created with delphi) Seems some crackers do things completely automaticly. -
Yes, but can't publish the version we are using here (at work). I will start soon, creating a new more general version at home (knowledge is in my mind already π ).
-
Using our own swagger parser > delphi unit generator here. works great. Generates the needed types as classes and a class which executes the methods. Will see if i can extract/publish a public version in my spare free time π
-
Reasonable pricing π And reasonable discounts for longtime customers (subscriptors) We also created some tickets about the new LSP, and i really really wonder how the tested the new LSP, so many bugs in it what makes it unusable, and then if you switch back to thel old code insight, all the bugs are still there. it's a shame.
-
ANN: Parnassus Parallel Debugger
mvanrijnen replied to Dave Millington (personal)'s topic in Delphi Third-Party
I've had an employer like that also. And then they go mad because tackling problems with the software while in production takes ages for consultants and after them the developers, because they get no errors π -
ANN: Parnassus Parallel Debugger
mvanrijnen replied to Dave Millington (personal)'s topic in Delphi Third-Party
Looks good so far, sometimes a liitle bit slow with repainting the windows, but very usefull! That there are some issues matches the host application π -
In recent versions there is a "migration tool" which also can be used for backup/restore actions. It covers not all things needed for a full backup of you delphi installation. You still have to backup files installed by installers (delphi, 3thparty components) etc.
-
DynArraySetLength doesn't check for NewLength = OldLength
mvanrijnen replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
You got this from Rudy J.? -
Hey, we installed D10.4.1 lastweek, code completion works better, code insight still not realy usable (for us). But one thing, if you override a class, normally with codecompletion you would see all the overridable methods of the parent class, with the 10.4.1 we do not see them. so all the overrides you have to type full instead of pick them from the list. (e.g. destroy, afterconstruction, beforedestruction etc etc)
-
Delphi 10.4.1 Codecompletion no overrides etc
mvanrijnen replied to mvanrijnen's topic in Delphi IDE and APIs
Added commenct to rsp-29357 sreenshot, clean install of 10.4.1, simple console project. hitting ctrl-space for code compeltion Getting very, very, very tired of the Delphi IDE. -
Take a look to TTimeSpan in the, System.TimeSpan unit, maybe you can do something with that. For the years and months you can use YearsBetween/Monthsbetween. (also for the rest : )
-
Take a look here (noi do not have grijjy stock π ) MVVM Starter Kit (Part 1 of 3) β grijjy blog Good explanation and good examples. And a framework ready to go
-
I can serialize a record but I can not deserialize
mvanrijnen replied to dkounal's topic in Algorithms, Data Structures and Class Design
I like this one a lot: Efficient and easy-to-use JSON and BSON library β grijjy blog -
Offline Installer - GetIt doesn't work with msg JSON metadata not found ?
mvanrijnen replied to Lars Fosdal's topic in Delphi IDE and APIs
Always cost me a day to install or upgrade the Delphi IDE (now upgrading from 10.3 to 10.4), never goes smooth. but sorry for the bad words π -
My thoughts go to method injection π
-
Offline Installer - GetIt doesn't work with msg JSON metadata not found ?
mvanrijnen replied to Lars Fosdal's topic in Delphi IDE and APIs
Wich idiot (NOFI) wrote the getit manager? Feels like it's done by some intern? Slow search, Slow scroll, can not queue packages to install at once and go drink coffee. (sorry bad day π )