Page 1 of 1
Datatypes library autodoc for SetDTAttrsA()
Posted: Sat Sep 26, 2015 4:59 pm
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.
Re: Datatypes library autodoc for SetDTAttrsA()
Posted: Sat Sep 26, 2015 5:19 pm
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
Re: Datatypes library autodoc for SetDTAttrsA()
Posted: Sat Sep 26, 2015 6:04 pm
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?
Re: Datatypes library autodoc for SetDTAttrsA()
Posted: Sat Sep 26, 2015 7:18 pm
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.
Re: Datatypes library autodoc for SetDTAttrsA()
Posted: Sat Sep 26, 2015 8:37 pm
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.
Re: Datatypes library autodoc for SetDTAttrsA()
Posted: Sat Sep 26, 2015 8:55 pm
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.