2
I Use This!
Very Low Activity

News

Analyzed 1 day ago. based on code collected 3 days ago.
Posted over 3 years ago by ab
Oups...I forgot to commit the updated tests...https://github.com/synopse/mORMot2/commit/9603635b
Posted over 3 years ago by ab
Perhaps ask on the Zeos forums.They are usually very responsive.
Posted over 3 years ago by ab
I guess the easiest in your case is to create an interface-based service.Input POST will be parsed, and the JSON object fields will fill the method parameters.See the documentation about it, especially how JSON is transmitted.https://synopse.info/files/html/Synopse … #TITLE_460
Posted over 3 years ago by ab
The integer conversion is done by the OleDB layer itself, which sets all bits to the integer value, therefore returns -1.What do you want to achieve?
Posted over 3 years ago by TPrami
OK, I could do somethiong like that. if code is something like thatwhilke Data do  Compress(GetFewBytesOfData);make the Compress() keep cache internally which is flushed at end and when buffer gets full.I take a look at the file compression routine.Thanks man.-Tee-
Posted over 3 years ago by tbo
Shouldn't it be called that? TRttiJson.RegisterCustomSerializer(TypeInfo(TItem), TItemReader.ReadItem, nil); Examples can be found in the test units for mORMot2.Maybe it's better to first describe what you actually want to do (what the data structure you want to serialize looks like) and not how you do it.With best regardsThomas
Posted over 3 years ago by ab
Such filled areas seems not supported yet.Any feedback is welcome.
Posted over 3 years ago by okoba
I had a code with mORMot1 like: TTextWriter.RegisterCustomJSONSerializer(TypeInfo(TItems), @ReadItem, nil);and function TItemReader.ReadItem(P: PUTF8Char; var AValue; out AValid: boolean): PUTF8Char; var V: TObject absolute AValue; OldP, S: ... [More] PUTF8Char; SP: RawUTF8; L: integer; begin AValid := False; Result := nil; if P = nil then Exit; OldP := P; P := JsonObjectItem(P, 'CustomClass'); if P = nil then raise Exception.Create('Invalid Item'); JSONRetrieveStringField(P, S, L, False); SetString(SP, S, L); case SP of 'ItemA': V := TItemA.Create; 'ItemB': V := TItemB.Create; else raise Exception.Create('Unknown Item: ' + SP); end; AValid := True; Result := JSONToObject(AValue, OldP, AValid, nil, JSONTOOBJECT_TOLERANTOPTIONS); end;and now with mORMot2, I can not convert it.I thought I should do this but it leads to unknown errors. function TItemReader.ReadItem(P: PUTF8Char; var AValue; out AValid: boolean): PUTF8Char; var V: TObject absolute AValue; OldP, S: PUTF8Char; SP: RawUTF8; L: integer; begin AValid := False; Result := nil; P := Context.Json; OldP := P; P := JsonObjectItem(P, 'CustomClass'); if P = nil then raise Exception.Create('Invalid Item'); JSONRetrieveStringField(P, S, L, False); SetString(SP, S, L); case SP of 'ItemA': V := TItemA.Create; 'ItemB': V := TItemB.Create; else raise Exception.Create('Unknown Item: ' + SP); end; AValid := True; Context.Json := JSONToObject(Instance, Context.Json, Context.Valid, nil, JSONTOOBJECT_TOLERANTOPTIONS); end;What is the correct way to unserializing and array of classes?Note: I can not use ParseNewObject, as the CustomClass property may not be the first properties and some other custom needs. [Less]
Posted over 3 years ago by aboczko69
Hello,I am trying to adapt the synPDF solution to my PDF printout project, but I ran into such a problem. Some of the "Symbol" stamps, such as arrows, punches, and ranges from - to, are printed incorrectly. What can be done to make it work? I was ... [More] browsing through all the information on the forum, e.g. https://www.synopse.info/forum/viewtopic.php? Pid = 16224, but that's all in the code. And printing is still a problem (it's all about the Symbol font).Best wishes, [Less]
Posted over 3 years ago by ab
What makes SynLZ efficient is its in-memory process.This is not the only algorithm doing it. For instance, Lizard has the same feature / limitation.See https://github.com/inikep/lizard/blob/l … _format.mdSo there is no "stream" oriented interface of ... [More] SynLZ.What you could do is cut the main data in chunks.This is what we do e.g. with FileSynLZ() which use 128 MB compression chunks. [Less]