OS4 native datatype examples and documentation

This forum is for general developer support questions.
Post Reply
User avatar
trixie
Posts: 411
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

OS4 native datatype examples and documentation

Post 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.
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
Belxjander
Posts: 315
Joined: Mon May 14, 2012 11:26 pm
Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan
Contact:

Re: OS4 native datatype examples and documentation

Post 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
User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: OS4 native datatype examples and documentation

Post 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:
ExecSG Team Lead
User avatar
trixie
Posts: 411
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

Re: OS4 native datatype examples and documentation

Post 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.
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
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: OS4 native datatype examples and documentation

Post 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.
User avatar
trixie
Posts: 411
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

Re: OS4 native datatype examples and documentation

Post 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?
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
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: OS4 native datatype examples and documentation

Post 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.
ExecSG Team Lead
User avatar
trixie
Posts: 411
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

Re: OS4 native datatype examples and documentation

Post 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.
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
Post Reply