Re: [GNC-dev] Sample Report with Examples

Geert Janssens <[email protected]>
Newsgroups gmane.comp.gnome.apps.gnucash.devel
Organization Kobalt W.I.T.
Message-ID <[email protected]>
All good suggestions.

Let's see how many are reasonable for flywire to pick up and fix. (flywire, I have no idea 
of your skill level and willingness to work on this...)
I would already take partial fixes as a step in the good direction.

Regards,

Geert

Op zaterdag 14 januari 2023 16:58:09 CET schreef john:
> Geert,
> 
> Roger. The problem with that argument is that someone with that little
> programming experience isn't going to be able to write a custom report
> anyway. Even someone with enough programming experience to agree that
> default option values aren't significant to the structure of the code isn't
> going to be able to write a custom report unless at least some of that
> experience is in one of  the Lispish languages. The Lispish paradigms of
> car, cdr, lambda, map, and so on are utterly foreign to most procedural
> language programmers, but required for writing GnuCash reports.
> 
> Yes, the use of Hello, World is a bit flippant, and yes, hello-world.scm
> isn't a minimal Scheme program. It's also not a sample report because it
> doesn't demonstrate querying the GnuCash data performing analysis, or
> presenting results. So if someone feels motivated to make it less flippant
> and better described then I suggest:
> 
> * Change the filename to options-example.scm, and the menu-name to "Options
> Example". * Add a report title option. Most of the real reports have one.
> Set its default to "Example Title". * Fix the comment describing the value
> of `name from "This will be used, among other things for making its menu
> item in the main menu.". It doesn't do that, it sets the name on the
> options dialog's title bar and the default value for the General section's
> Report Name option. "menu-name", which is part of the report-registration
> block at the bottom, sets the menu name. The comment should also explain
> that changing the report name option will change the value of the report's
> window or tab title but not its options dialog title. * Change the name
> value to "Options Example Report".
> * Change the two Hello… section names to something like Tab A and Tab B to
> make clear that "Sections" in the option block map to tabs on the dialog
> box. * Change the string option default to "String Option Default".
> * Speaking of the General section, there should be a comment explaining that
> a skeleton General section gets added by gnc:report-template-new-options
> that provides the name (but not the title, reports must add that
> themselves) and stylesheet options.
> 
> Regards,
> John Ralls
> 
> > On Jan 14, 2023, at 2:02 AM, Geert Janssens <[email protected]>
> > wrote:
> > 
> > Ok, I tend to agree partially with flywire on this one.
> > 
> > John, you and I have years of programming experience and to us the default
> > value of an option is a minor detail.
> > 
> > However I can imagine someone with hardly any development experience at
> > all will have a much harder time to map the same string used multiple
> > times in the report code to the output visible on screen. And I
> > sympathize with those that try to create their own custom reports. So
> > yes, using different sample strings in code (even for default values)
> > makes it easier to relate output on the report with what's written in the
> > code - before - any option is changed.
> > 
> > To us this may look like bikeshedding, I think for someone trying to wrap
> > their head around the gnucash code this may actually help.
> > 
> > And while bikeshedding was mentioned, I'd rather use values like
> > "Sample string", "Sample Document Title" and "Sample Report" than the
> > half-baked "Hello String" and "Hello Example".
_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.