Page 1 of 1

struct IntuitionIFace has no member named 'GetMsg()'

Posted: Thu Oct 10, 2013 2:55 pm
by Alix
Hi all,

I have installed the Amiga OS4 SDK, and and I am trying to find my way around the most basic concepts, so I appologise in advance if my question is trivial (I have plenty of experience as a C programmer, but very little understanding of the Amiga OS - still learning!)

I am simply trying to compile the example at the bottom of this page:
http://wiki.amigaos.net/index.php/Intui ... _Interface

But it won't even compile. It says: struct IntuitionIFace has no member named 'GetMsg()'

Now as a programmer I understand what that means. I am calling a function (GetMsg) that doesn't exist on this object/interface. But I am not sure why, since I am running a code example without changing it. Am I not using the right version of the libraries? Of the SDK?

And more importantly, is there a way to LOOK at a certain interface, i.e. look at the list of the different methods and their parameters?

Thanks all! :)

Alix

Re: struct IntuitionIFace has no member named 'GetMsg()'

Posted: Thu Oct 10, 2013 3:08 pm
by salass00
@Alix

That's an error in the example code. It should be IExec->GetMsg() not IIntuition->GetMsg().
And more importantly, is there a way to LOOK at a certain interface, i.e. look at the list of the different methods and their parameters?
For up to date information on library functions you should read the autodocs. You can find them in:
SDK:Documentation/AutoDocs/

Re: struct IntuitionIFace has no member named 'GetMsg()'

Posted: Thu Oct 10, 2013 4:42 pm
by ssolie
Alix wrote:But it won't even compile. It says: struct IntuitionIFace has no member named 'GetMsg()'
Now fixed.
Alix wrote:And more importantly, is there a way to LOOK at a certain interface, i.e. look at the list of the different methods and their parameters?
Each interface like IExec has a struct ExecIFace* type. This type is defined in a header file which means you have a full list of every function available on that interface. I just don't remember right now where those files are in the SDK (not near an Amiga).

You should also review the associated autodoc of course but it is nice to know where the C source files are because code doesn't lie (unlike docs).

Re: struct IntuitionIFace has no member named 'GetMsg()'

Posted: Thu Oct 10, 2013 5:16 pm
by Alix
Okay thanks guys, all this is very helpful. My code is now compiling and working, and I have found the auto docs.

It's a shame that there are errors in the code examples. I found a very obvious one earlier :
http://wiki.amigaos.net/index.php/Introduction_to_Exec

Right at the bottom, on the line:
struct IntuitionIFace *IIntuition = IExec->GetInterface(base, "main" 1, NULL);

There is cleary a comma missing after "main". Once I am more confident I will be more than happy helping with updates/corrections of the Wiki :)

Re: struct IntuitionIFace has no member named 'GetMsg()'

Posted: Thu Oct 10, 2013 8:13 pm
by cha05e90
Alix wrote:My code is now compiling and working, and I have found the auto docs.
For more convenient look up of Autodocs you might try this SDKBrowser (http://os4depot.net/index.php?function= ... rowser.lha) or the inbuild Autodoc browser of Codebench (http://codebench.co.uk).

Re: struct IntuitionIFace has no member named 'GetMsg()'

Posted: Thu Oct 10, 2013 10:22 pm
by ssolie
Alix wrote:There is cleary a comma missing after "main". Once I am more confident I will be more than happy helping with updates/corrections of the Wiki :)
Fixed. And yes, we always need more wiki editors. There are probably hundreds of errors given the massive amount of text available.

I'm just happy we have a place to store, edit and improve that text. Before the wiki you would be stuck with combing the internet or using pirated copies of manuals to get the information you needed.