Page 1 of 1

OS4 native datatype examples and documentation

Posted: Thu Jun 30, 2011 6:14 pm
by trixie
Since the introduction of datatypes in OS3, we have always proudly mentioned them as one of Amiga's revolutionary features. Unfortunately, no one ever cared to provide good developer documentation for writing datatypes. (Same for BOOPSI classes or Dockies, by the way.)

The potential that datatypes bring to AmigaOS4 extension is immense, yet we are still but scratching the surface. We need examples and documentation! For instance, how do I write my own datatype that is, say, a subclass of text.datatype? Or, how do I make a new datatype class? References to source code are nice but I'd love to know how the datatype system works, instead of blindly pasting pieces of foreign code I do not understand.

Re: OS4 native datatype examples and documentation

Posted: Fri May 18, 2012 11:14 pm
by Belxjander
to my understanding you need to start with a Library for containing the datatype class...

after that I know very little... I would certainly love to know more about this since my own "Polymorph" project will depend on providing an extended DataTypes class mechanism for the handling of some program types

Re: OS4 native datatype examples and documentation

Posted: Sat May 19, 2012 1:26 am
by ssolie
Start with the wiki
http://wiki.amigaos.net/index.php/Datatypes_Library

Next check the SDK examples and Aminet.

And please document everything in the wiki when you figure it out. :mrgreen:

Re: OS4 native datatype examples and documentation

Posted: Wed Jun 20, 2012 8:44 am
by trixie
I've found this text by David Junod particularly helpful for learning about how to subclass a datatype:

http://www.ummon.eu/Amiga/API/DataType/ ... s.DOCUMENT

Might be worth trying to contact David and ask if we could put it in the wiki.

Re: OS4 native datatype examples and documentation

Posted: Wed Jun 20, 2012 9:36 am
by chris
trixie wrote:I've found this text by David Junod particularly helpful for learning about how to subclass a datatype:

http://www.ummon.eu/Amiga/API/DataType/ ... s.DOCUMENT

Might be worth trying to contact David and ask if we could put it in the wiki.
I think that might come from the DevCon documents on the DevCD.

Re: OS4 native datatype examples and documentation

Posted: Wed Jun 20, 2012 10:03 am
by trixie
chris wrote: I think that might come from the DevCon documents on the DevCD.
Ha, I found it - it's on the Developer CD in "NDK/NDK_3.1/Docs/tutorials/".

@ssolie

Steven, would it be legal to put it in the wiki's Tutorial section?

Re: OS4 native datatype examples and documentation

Posted: Wed Jun 20, 2012 5:38 pm
by ssolie
trixie wrote:Steven, would it be legal to put it in the wiki's Tutorial section?
For Hyperion it is.

That said, the tutorial section is the wrong place for that.

The content of that document needs to be merged with the existing content at http://wiki.amigaos.net/index.php/Datatypes_Library also by the same author.

It appears he wrote more than one article but never got around to merging the content into a cohesive whole. Now is the time to do so.

Re: OS4 native datatype examples and documentation

Posted: Tue Jun 26, 2012 3:05 pm
by trixie
@whoever is interested

I just wanted to let you know that I've managed to write a simple Text Datatype subclass, using information and example code from David Junod's article linked above. It's not that hard after all so I'd encourage others to give it a try :-) I'll release my datatype when I develop it some more, it really doesn't do much at the moment.