Where is this elusive demo?Please refer to the PrefsObjectsExample demo about more examples
on how to use the PrefsObjects system.
PrefsObject
PrefsObject
From the application AutoDoc:
Workbench Explorer - A better way to browse drawers
Re: PrefsObject
@mritter0
Oh please don't get me started on the Application Library/PrefsObjects autodoc!
More seriously: what kind of help/example do you need in relation to PrefsObjects?
Oh please don't get me started on the Application Library/PrefsObjects autodoc!
More seriously: what kind of help/example do you need in relation to PrefsObjects?
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
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
- broadblues
- AmigaOS Core Developer
- Posts: 600
- Joined: Sat Jun 18, 2011 2:40 am
- Location: Portsmouth, UK
- Contact:
Re: PrefsObject
Is it not here?:mritter0 wrote:From the application AutoDoc:
Where is this elusive demo?Please refer to the PrefsObjectsExample demo about more examples
on how to use the PrefsObjects system.
SDK:Examples/Application/PrefsObjectsExample/PrefsObjectsExample.c
I wouldn't use it myself, it produces horid unstructured xml, where the only relation between a key and value is that value follows immediatly after the key.
I use expat and my own sane xml prefs formats for SketchBlock.
Re: PrefsObject
@broadblues
Yes, the PrefsObjects XML file structure is quite unbelievable. Keys should have been declared as attributes and not as elements preceding other elements. The design probably comes from the time when one could take an idea and make it part of AmigaOS without consulting anyone else. Shared objects is another example.
Yes, the PrefsObjects XML file structure is quite unbelievable. Keys should have been declared as attributes and not as elements preceding other elements. The design probably comes from the time when one could take an idea and make it part of AmigaOS without consulting anyone else. Shared objects is another example.
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
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
Re: PrefsObject
I can't find it in the new SDK or the previous one.broadblues wrote: Is it not here?:
SDK:Examples/Application/PrefsObjectsExample/PrefsObjectsExample.c
AmigaOne X1000 with 2GB memory - OS4.1 FE
Re: PrefsObject
I'm tempted to voice my opinion about useless additions and useful things removed but it probably won't do any good at this pointtrixie wrote: Yes, the PrefsObjects XML file structure is quite unbelievable. Keys should have been declared as attributes and not as elements preceding other elements. The design probably comes from the time when one could take an idea and make it part of AmigaOS without consulting anyone else. Shared objects is another example.
AmigaOne X1000 with 2GB memory - OS4.1 FE
- broadblues
- AmigaOS Core Developer
- Posts: 600
- Joined: Sat Jun 18, 2011 2:40 am
- Location: Portsmouth, UK
- Contact:
Re: PrefsObject
Oh, seems that the Application examples aren't in the SDK.xenic wrote:I can't find it in the new SDK or the previous one.broadblues wrote: Is it not here?:
SDK:Examples/Application/PrefsObjectsExample/PrefsObjectsExample.c
The examples directory structure has changed abit, so something like Reaction examples and menuclass have moved under GUI, but Applcation seems missing completly.
Don't know if that's intentional (out of date example for instance) or not.
Re: PrefsObject
I opened another can of worms.
I was going to update my program's prefs file from IFF to PrefsObject XML style since it is the "new standard". No example code to get a start with. The AutoDocs don't have any examples.
So I wasn't blind this time; not seeing the Application examples.
The PrefsEditor in Utilities drawer can't load any program's XML prefs file that I tried (CodeBench, Ringhio,...) Am I wasting my time using PrefsObject system?
I was going to update my program's prefs file from IFF to PrefsObject XML style since it is the "new standard". No example code to get a start with. The AutoDocs don't have any examples.
I didn't even see the new MenuClass examples until I had posted a few questions that would have been taken care of if I had known they were there.The examples directory structure has changed abit, so something like Reaction examples and menuclass have moved under GUI, but Applcation seems missing completly.
So I wasn't blind this time; not seeing the Application examples.
The PrefsEditor in Utilities drawer can't load any program's XML prefs file that I tried (CodeBench, Ringhio,...) Am I wasting my time using PrefsObject system?
Workbench Explorer - A better way to browse drawers
- broadblues
- AmigaOS Core Developer
- Posts: 600
- Joined: Sat Jun 18, 2011 2:40 am
- Location: Portsmouth, UK
- Contact:
Re: PrefsObject
They are using their own custom xml format, prefs editor is not a general xml editor, just a prefsobject "broken" xml editor.The PrefsEditor in Utilities drawer can't load any program's XML prefs file that I tried (CodeBench, Ringhio,...)
All a matter of choice, if you have working IFF based -prefs code, there no compulsion to 'upgrade'.Am I wasting my time using PrefsObject system?
Whilst I'm not a fan, one usefuil aspect of the prefs object approach is that you can manually edit the prefs file, so not every preference needs a GUI to control it, useful for rarely used options. This is also true of custom Xml solutions or even plain text based ones (like YAM uses) less so of IFF.
- salass00
- AmigaOS Core Developer
- Posts: 530
- Joined: Sat Jun 18, 2011 3:12 pm
- Location: Finland
- Contact:
Re: PrefsObject
Well if there are problems with the current pobjects format then they can be fixed in application.library.broadblues wrote: I wouldn't use it myself, it produces horid unstructured xml, where the only relation between a key and value is that value follows immediatly after the key.
Currently application.library reads and writes version 1.0 pobjects files but it should be simple enough to make a new version of the library that reads version 1.0 and version 2.0 pobjects file and writes in the latter format only.
If you have suggestions on how the new pobjects format should look then please post them here.