OSLib 6.70 released
Erik Groenhuis
e.groenhuis at xs4all.nl
Sun Aug 1 03:17:31 BST 2004
On 30 Jul 2004 David J. Ruck wrote:
> On 8 Jul 2004 Tony van der Hoff <tony at mk-net.demon.co.uk> wrote:
> > Some 6 months after the last release, OSLib 6.70 is now available as a
> > binary download at http://ro-oslib.sourceforge.net/. The CVS tag is
> > oslib-670, for those who want the sources.
>
> OSLibSupport library objects are junk. Please can we have a working version
> as a matter of urgency.
Moving from using the Toolbox with clib to using the Toolbox with
OSLibSupport is, indeed, not trivial.
Some points of attention are:
- event_poll() and event_poll_idle():
Contrary to the regular versions, these functions from OSLibSupport
do not accept NULL parameteres for the event_code and poll_block
parameters. They must point to actual objects of type wimp_event_no
and wimp_block respectively. Calling event_poll(0,0,0) will usually
crash the program. The poll_word parameter is required when and only
when the Pollword is used (as determined by the mask passed to
event_set_mask() ).
- OSLibSupport has two headers involved in showing information to the
user: Err.h and Message.h.
. Err.h is mainly concerned with showing error boxes, and hardly has
support for MessageTrans.
. Message.h is mainly concerned with MessageTrans. It can show a variety
of error boxes, but insists the user passes a
messagetrans_control_block parameter and an application name. The
demand for these parameters was, according to the sources, added
later. There is no explanation why they were added.
We probably need to make a global messblock and pass it.
. Worry: maybe it is required to pass a *different* message block from
the one passed to toolbox_initialise().
- Message_ShowError() makes a mess of messages with 3 parameters.
This is because the value returned by Message_GetMessage() is
held in a static char [] in an internal Message routine. When we try to
use this string in the subsequent call to Message_ShowError(), it is
overwritten with the contents of the token retrieved with the second
call. Solution: copy the string of the first call to a private char[].
- There is no manual for the routines defined in OSLibSupport. For
those who are interested, I scrambled some information in a StrongHelp
file. See http://www.xs4all.nl/~erikgrnh/riscos/OSLibSupMan.zip . It
contains info about Choices_, Err_, Event_ and Message_ calls.
Hope this helps.
--
Erik Groenhuis http://www.xs4all.nl/~erikgrnh
Home of RCS for RISC OS v5.7.1.2 http://www.rcs.riscos.org.uk/
Csite on RiscPC with a StrongARM RISC processor and RISC OS 4.02
More information about the oslib-user
mailing list