OS4 native datatype examples and documentation

This forum is for general developer support questions.

OS4 native datatype examples and documentation

Postby trixie » Thu Jun 30, 2011 5:14 pm

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.
SAM440ep-flex @ 667MHz / 1GB RAM / ATI Radeon 9250 / AmigaOS 4.1 Update 6
Author of WordNet for OS4
User avatar
trixie
 
Posts: 135
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: OS4 native datatype examples and documentation

Postby Belxjander » Fri May 18, 2012 10:14 pm

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

Re: OS4 native datatype examples and documentation

Postby ssolie » Sat May 19, 2012 12:26 am

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:
AmigaOS Development Team Lead
Be authentic. Get AmigaOS.
User avatar
ssolie
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 622
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada

Re: OS4 native datatype examples and documentation

Postby trixie » Wed Jun 20, 2012 7:44 am

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/DataTypes.DOCUMENT

Might be worth trying to contact David and ask if we could put it in the wiki.
SAM440ep-flex @ 667MHz / 1GB RAM / ATI Radeon 9250 / AmigaOS 4.1 Update 6
Author of WordNet for OS4
User avatar
trixie
 
Posts: 135
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: OS4 native datatype examples and documentation

Postby chris » Wed Jun 20, 2012 8:36 am

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/DataTypes.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.
chris
 
Posts: 235
Joined: Sat Jun 18, 2011 11:05 am

Re: OS4 native datatype examples and documentation

Postby trixie » Wed Jun 20, 2012 9:03 am

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?
SAM440ep-flex @ 667MHz / 1GB RAM / ATI Radeon 9250 / AmigaOS 4.1 Update 6
Author of WordNet for OS4
User avatar
trixie
 
Posts: 135
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: OS4 native datatype examples and documentation

Postby ssolie » Wed Jun 20, 2012 4:38 pm

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.
AmigaOS Development Team Lead
Be authentic. Get AmigaOS.
User avatar
ssolie
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 622
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada

Re: OS4 native datatype examples and documentation

Postby trixie » Tue Jun 26, 2012 2:05 pm

@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.
SAM440ep-flex @ 667MHz / 1GB RAM / ATI Radeon 9250 / AmigaOS 4.1 Update 6
Author of WordNet for OS4
User avatar
trixie
 
Posts: 135
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic


Return to General Developer Support

Who is online

Users browsing this forum: No registered users and 2 guests