Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread using Cracker classes in EWB - blog entry
Tue, Apr 11 2023 6:54 PMPermanent Link

erickengelke

Avatar

I've started an EWB programming blog covering somewhat advanced topics that are too long to be posted in this forum.

See:   https://www.erickengelke.com

Of interest, it's possible to use "cracker" classes to extend EWB classes without a lot of work.

See: https://www.erickengelke.com/blog/4.html

The sample project is included for download at the end of the article so you don't need to retype it.

I hope it will be helpful to some.  Let me know if there is a topic you'd like covered.

Erick
EWB Programming Books and Nice Component Library
See my EWB BLOG posts, at:
http://www.erickengelke.com
Wed, Apr 12 2023 7:47 AMPermanent Link

Ralf Mimoun

Thanks for sharing. I use that approach to set DataSet.DateTimeFormat to ISO 8601.

Btw, I just wrote a TPersistent descendant with a AsJSON property (read/write), with some additional properties to optionally write specific values as "null". It helps to generate pretty JSON with null values eg. for dates like 01.01.1970, integers like -1 or strings like "". I'd love to post it after some cleanup if anyone is interested.
Wed, Apr 12 2023 8:24 AMPermanent Link

erickengelke

Avatar

Ralf Mimoun wrote:

>Thanks for sharing. I use that approach to set DataSet.DateTimeFormat to ISO 8601.

Please share.

> Btw, I just wrote a TPersistent descendant with a AsJSON property (read/write), with some additional properties to optionally write specific values as "null". It helps to generate pretty JSON with null values eg. for dates like 01.01.1970, integers like -1 or strings like "". I'd love to post it after some cleanup if anyone is interested.

That's be great.

Erick
EWB Programming Books and Nice Component Library
See my EWB BLOG posts, at:
http://www.erickengelke.com
Wed, Apr 12 2023 11:47 AMPermanent Link

Ralf Mimoun

A no brainer Smile

 TDataSetHelper = class(TDataSet)
 end;

[...]

 TDataSetHelper(MyDataSet).DateTimeFormat := dtfISO8601;

@Tim: Maybe that property could become public or published in one of the next versions?

I'll try to brush up the TPersistentJSON class in the next days.
Image