Datatypes library autodoc for SetDTAttrsA()

This forum is for general developer support questions.
Post Reply
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Datatypes library autodoc for SetDTAttrsA()

Post by xenic »

The SetDTAttrs() function in the datatype.library autodoc does not document the "struct Requester *" argument in the INPUTS paragraph. A short explanation for that arg should be added. In addition, I can't find any explanation for that argument in the "Datatypes Library" documentation WIKI.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Datatypes library autodoc for SetDTAttrsA()

Post by broadblues »

It's exactly the same usage as the equivalent

IIntuition->SetGadgetAttrs() function.

999 out a 1000 you will set that to NULL.


made BZ about the missing description in the autodoc
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: Datatypes library autodoc for SetDTAttrsA()

Post by xenic »

broadblues wrote:It's exactly the same usage as the equivalent

IIntuition->SetGadgetAttrs() function.

999 out a 1000 you will set that to NULL.


made BZ about the missing description in the autodoc
I also notice that the return value for SetDTAttrsA() is not documented. I would assume 0 or -1 for failure but I don't want my program waiting for a signal that sound play has completed if SetDTAttrsA() failed. Could you add that to the BZ?
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Datatypes library autodoc for SetDTAttrsA()

Post by broadblues »

I also notice that the return value for SetDTAttrsA() is not documented. I would assume 0 or -1 for failure but I don't want my program waiting for a signal that sound play has completed if SetDTAttrsA() failed. Could you add that to the BZ?
Don't assume that. SetAttrs type functions don't give simplistic fail or success return codes. The return does not indicate success or failure, but may , depending n the object indicate that some kind of refresh is required (mainly for gadgets).

Consult the individual documentation for the datatype you are using.
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: Datatypes library autodoc for SetDTAttrsA()

Post by xenic »

broadblues wrote:
I also notice that the return value for SetDTAttrsA() is not documented. I would assume 0 or -1 for failure but I don't want my program waiting for a signal that sound play has completed if SetDTAttrsA() failed. Could you add that to the BZ?
Don't assume that. SetAttrs type functions don't give simplistic fail or success return codes. The return does not indicate success or failure, but may , depending n the object indicate that some kind of refresh is required (mainly for gadgets).

Consult the individual documentation for the datatype you are using.
The sound datatype docs don't mention any return value for setting attributes or specifically SDTA_SignalBitMask & SDTA_SignalTask. Since all the examples I have blindly assume a signal will be sent, I guess I'll do the same. A lack of meaningfull return values seems to be common with object oriented stuff, which is why I don't like it.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Datatypes library autodoc for SetDTAttrsA()

Post by broadblues »

Well passing a signal mask and process address can hardly fail so there *is* no meaning error code.

There are other methods for retrieving errors, checking the result of the NewObject() lsistening to DTA_ErrorLevel in your IDCMP_UPDATE handler etc.
Post Reply