-
Content Count
3345 -
Joined
-
Last visited
-
Days Won
111
Posts posted by Lars Fosdal
-
-
Correct link:
REST.Json.Interceptors types/methods are undocumented
https://quality.embarcadero.com/browse/RSP-23026Unabashedly mentions @Marco Cantu
-
On 1/2/2019 at 10:04 PM, Uwe Raabe said:I wonder if the situation on G+ has been any different.
G+ is slightly different. As Owner or Moderator you can only remove posts or comments, not edit them. A post that is removed from a community, remains on the profile of the original poster. I am already missing G+ a lot.
- 2
-
13 hours ago, hsvandrew said:I'm going to pause this rant for now, perhaps these issues have been resolved and its just the tickets in quality control haven't been closed.
We spend a lot of time on this in January and it failed miserably (especially for Linux) so we gave up.
It appears it might be ok now on 10.2.3/10.3 I will do some more testing and advise
Please amend the title. The title should IMO reflect the contents of the post, which "-------" does not.
- 3
-
Sounds like the std terms for any social media platform, i.e. meaning that the content will be massaged electronically to fit onto different devices and delivery methods.
-
Although there are no usage statistics for the G+ Delphi Developers, there is no doubt that the near 10k user count it has, in no way represent the actual number of active users, nor does it indicate the number of lurkers.
-
See previous my comments in this thread. SQL Server 2008 does not have built in support for pagination, while 2012 and newer does.
-
On 12/21/2018 at 4:01 PM, Stefan Glienke said:@Lars Fosdal Goto where?
That is the core of the question, isn't it?
-
Crosses heart, spits over left shoulder, throws salt over the right one, all while repeating "Thou shall not goto".
-
My advice: keep your permissioning as simple as possible. Flexible permissioning is a rich source of challenges 😛
- 1
-
8 minutes ago, Stefan Glienke said:Not really as you can turn off this warning with {$WARN NO_RETVAL OFF}
That is a good point.
I ended up calling a class method that do the init code in the unit init section.
It still is a strange warning, though.
-
-
https://quality.embarcadero.com/browse/RSP-23024
QuoteIf a record helper has a class constructor, the compiler will output the following error
[dcc32 Warning] W1035 Return value of function 'THelperType.ClassConstructorName' might be undefined
This doesn't make sense, since a class constructor doesn't have an assignable result value.
Note that the class constructor actually works as expected - it is only the bogus warning that is a problem.
Our build server is configured to not accept warning W1035, to ensure that we actually never release code which may have undefined return values, so this false warning is a problem.
MCVE attatched to report.
-
Gotta love the level of detail in the help for the interceptors 😞
http://docwiki.embarcadero.com/Libraries/Rio/en/REST.Json.Interceptors
QuoteEmbarcadero Technologies does not currently have any additional information.
Nudging @David Millington...
-
1 minute ago, Rollo62 said:If so many people urgently (mis)use it that way, this should be a sign that there is a strong need 🙂
Or, a lack of established conventions - or - as for xml, an endless series of abuse 😛
-
1 hour ago, Kryvich said:@Lars Fosdal Unfortunately, this will not work for the Variant type without additional processing. You can try to declare a custom reverter for an element of the inner array.
@Kryvich Do you know of any good examples of custom reverters?
I am only going to consume these structures, not produce them - so that simplifies it a bit. Basically, I'd love to be able to transform the inner array elements to a single object, as there is only a limited number of permutations.
-
29 minutes ago, Sherlock said:OT: JSON is cool and all, but it also promotes dropping all kinds of junk in it without thinking. Well maybe a little: "Let the next guy take care of this"
Indeed. This structure was probably designed by someone that is not loading objects, but who just walks the structures with a weakly typed language.
-
So - what happens to
{ "switch": true }
in an array of array of variant?
-
-
Consider the following Json data:
The array elements are lists of integers, strings and objects.
{ "message": [ [ 0, "a text" ], [ 1 ], [ 1, { "switch": true } ], [ 2, "text one", "text line two" ] ] }
Assume the JsonData const below is filled with the Json above. Using the Json tools from unit REST.Json, I would typically do like this.const JsonData = // see Json data above var Message: TJsonMessage; begin Message := TJson.JsonToObject<TJsonMessage>(JsonData);
But - how should TMessageArray be declared to accept the above structure? Is it actually possible?
TJsonMessage = class private Fmessage: TMessageArray; public property message: TMessageArray read FMessage write FMessage; end;
- 1
-
It does allow the syntax, though - so perhaps someone had it planned, once upon a time.
-
It's too complex for that, as the variations are many and loosely coupled.
It means I will have to handcraft more info manually.
-
Consider
type TSomeType = (One, Two Three); TSomeTypeHelper = record helper for TSomeType class function Values: TArray<string>; end;
Can I use RTTI to find the record helper type for TSomeType and the Values function?
Reason: I'd like to call Values - which would be a naming convention (since record helpers can't be inherited or generic) - for any type that has a record helper with a class function named Values.
-
Is there a way access TCustomAttribute values on individual enumerated values?
type TLevel = ( [Tx('First')] one, [Tx('Second')] two, [Tx('Third')] three );
-
Is there a way to use RTTI for records to allow walking public consts and types to extract names and values?
Asking for a friend 😛 - kidding ... I'm try to produce documentation of certain structures at run time, and would like to do something like TDocBuilder.WalkRecordType<html>.
type html = record type TRow = TArray<string>; public const LineBreak = '<BR />'; nbsp = ' '; lt = '<'; gt = '>'; DivEnd = '</div>'; public type divStyleDefault = record public const info = 'info'; book = 'book'; chapter = 'chapter'; section = 'section'; detail = 'detail'; example = 'example'; jsoncode = 'jsoncode'; end; divStyleDebug = record public const info = 'debuginfo'; book = 'debugbook'; chapter = 'debugchapter'; section = 'debugsection'; detail = 'debugdetail'; example = 'debugexample'; jsoncode = 'debugjsoncode'; end; {$ifdef debug} divStyle = divStyleDebug; {$else} divStyle = divStyleDefault; {$endif} end;
Changes in Parallel Library
in RTL and Delphi Object Pascal
Posted
Alternatives to sleep,could be to have a class that creates large arrays of random values, and do Bubble sort on them, optionally logging the progress to disk 😛