From: | Allan Odgaard |
Date: | 15 Jul 2000 at 19:24:44 |
Subject: | Re: I am going OO nuts !!! |
On 15-Jul-00, Colin Wenzel wrote:
> What I need is the stub code for the rom call DoMethod()
DoMethod() is not a rom call. It's simply shorthand notation for
CallHook(OCLASS(obj)->cl_Dispatcher, obj, msg).
> in whatever library it is in.... (intuition ??)
> and MUI_MakeObject() as it appears not to be in mui.lib.
MUI_MakeObjectA() is in muimaster.library, but MUI_MakeObject() is the
variable-length argument variant, which is normally just generated by
the compiler.
This is similar to OpenWindowTagList(), which takes a pointer to a
Window structure and a *pointer* to a taglist, where OpenWindowTags()
receives the taglist on the stack.
Look in your intuition-pragma-file, here you'll find something like
this:
#pragma amicall(IntuitionBase, 0x25e, OpenWindowTagList(a0,a1))
#pragma tagcall(IntuitionBase, 0x25e, OpenWindowTags(a0,a1))
As you can see, the first indicates a library call, the second indicates
to the compiler, that the second argument should be a pointer to
something "build on the stack".
The code I posted (for DoMethod() and MUI_MakeObject()) should function
as stubs, so simply add these two functions to your source, and your
program should compile! It's not ideal, because they rely on
parameters being passed on the stack (which they are) and as said, your
compiler should be able to do it, but I don't know Aztec... I don't
understand why you don't just change compiler, because during startup
you don't want to struggle with problems caused by an outdated compiler
-- when you master C, AmigaOS, OOP etc. then you can go back and fight
these problems... ;-)
> As this is the very first time I have ever done any of this OO stuff
> I have not needed a stub for these functions,
Var-args functions have nothing to do with OO.
Regards Allan
------------------------------------------------------------------------
It's the End Of The Line for My Shipping Broker.
http://click.egroups.com/1/5175/1/_/451227/_/963685631/
------------------------------------------------------------------------