Wishes for Preferences?

AmigaOS users can make feature requests in this forum.
User avatar
trixie
Posts: 409
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: Wishes for Preferences?

Post by trixie »

@chris

I know how you feel about XML, we've discussed it before :) But PrefsObjects is fairly simplistic, without unnecessary bloat that XML sometimes incurs. And it's actually quite a neat concept: what I especially like is it's ability do save prefs in different hierarchies. For instead, the main program can save its settings in level 1, and program plugins in level 2 - all this in one prefs file but still logically structured and easy to read. As the individual prefs elements (individual settings as well as whole clusters of settings) are seen as objects, it's all very simple to manipulate through the Application Library/PrefsObjects methods.
The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Wishes for Preferences?

Post by nbache »

trixie wrote:@nbache
No, PrefsObjects is great, and easy to use.
Maybe, but the schema design is really horrid.

Every tag is either called "key" or "string" or "integer" or similar, so the real schema definition ends up being "hidden" in the values of the tags. That's not how good XML is designed. (And it bloats it even more as well.)

In effect, all XML documents using this schema end up being constructed out of a few super-general building blocks. That's why I likened it to Morse code (which has dots and dashes, and maybe a convention about the lengths of pauses between some of them, but that's it).

Best regards,

Niels
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Re: Wishes for Preferences?

Post by JosDuchIt »

@chris thanks for the hint

I was pointe to CLIExchange which complements the command above very nicely (or is there an offical "CLI exchang""
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Re: Wishes for Preferences?

Post by JosDuchIt »

The Amidock preferences is an xml file
I was able to generate one that crashed Amidock as well as the workbench
I copied it to an other name and would like to correct it 'manually' to restore the lost info by removing the last app added.
So i got interested in this format.
The prefs file points to
http://www.amiga.com/DTDs/PrefsObjects-1.0.dtd
this link does not work. The file is not on my HD either Where can i get it ?
How can the prefs be interpreted without the dtd ?
User avatar
Raziel
Posts: 1171
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: Wishes for Preferences?

Post by Raziel »

JosDuchIt wrote:The Amidock preferences is an xml file
I was able to generate one that crashed Amidock as well as the workbench
I copied it to an other name and would like to correct it 'manually' to restore the lost info by removing the last app added.
So i got interested in this format.
The prefs file points to
http://www.amiga.com/DTDs/PrefsObjects-1.0.dtd
this link does not work. The file is not on my HD either Where can i get it ?
How can the prefs be interpreted without the dtd ?
Maybe Utilities/PrefsObjectEditor is what you are looking for?

I was told it will display (and even fix) errors in XML files.
At least you can manually edit those files
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Re: Wishes for Preferences?

Post by JosDuchIt »

@raziel
Maybe Utilities/PrefsObjectEditor is what you are looking for?

I was told it will display (and even fix) errors in XML files.
Thanks for the suggestion. works great
It even fixed problems i did not correct knowingly: notably subdockis i thought were lost
User avatar
MichaelMerkel
Beta Tester
Beta Tester
Posts: 355
Joined: Mon Dec 20, 2010 2:08 pm
Location: Germany
Contact:

Re: Wishes for Preferences?

Post by MichaelMerkel »

nbache wrote:
trixie wrote:@nbache
No, PrefsObjects is great, and easy to use.
Maybe, but the schema design is really horrid.

Every tag is either called "key" or "string" or "integer" or similar, so the real schema definition ends up being "hidden" in the values of the tags. That's not how good XML is designed. (And it bloats it even more as well.)

In effect, all XML documents using this schema end up being constructed out of a few super-general building blocks. That's why I likened it to Morse code (which has dots and dashes, and maybe a convention about the lengths of pauses between some of them, but that's it).
+1 +1 +1 +1

for plain prefs it may be sufficient. but i we should never use if for anything else.
but even the amidock prefs file (which is in that format) is almost absolutely unreadable and uneditable... compared to better designed xml files.

regards...
michael
Michael Merkel :lol:
(Member of Amiga Freunde Pfalz)
User avatar
trixie
Posts: 409
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: Wishes for Preferences?

Post by trixie »

@nbache
the schema design is really horrid.
Fair enough, I take your point. But why was it designed like that? Am I to understand that nobody in the team even bothered to check what the guy responsible for PrefsObjects actually did, before releasing it as part of the OS?
The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Wishes for Preferences?

Post by nbache »

trixie wrote:@nbache
the schema design is really horrid.
Fair enough, I take your point. But why was it designed like that? Am I to understand that nobody in the team even bothered to check what the guy responsible for PrefsObjects actually did, before releasing it as part of the OS?
Good XML design requires some special skills (no, I don't necessarily have them all myself either, but I have used XML enough to recognize well designed and poorly designed varieties). I don't know whether (and how many) persons with these skills are/were on the team, but even if there were, they might have been busy with other stuff at the time. And the alternative, hiring a pro from the outside to do it, costs money, a resource which as we all know is not abundant in AmigaOS development.

The present solution "works", even if it is hard/ugly to use more widely than for its present specific purposes, so maybe it was regarded as a sufficient stop gap for now. But we can always hope that some day somebody looks at it again with more long-range spectacles.

(Just speculation on my part, I have no inside knowledge about this, and if I had, I wouldn't be in a position to speculate like this ;-)).

Best regards,

Niels
Post Reply