Howto use mcc files.
  • Just looking around
    Bastiaan
    Posts: 18 from 2014/8/7
    From: Amsterdam, The...
    Hi,

    I'm new to MUI and Amiga development in general. Can anybody give me a pointer on how to use a .mcc file in my GCC based MUI project? I used the show/hide example from MorphOS examples folder as starting point for building my MUI GUI. I want to add the scintilla.mcc class. How do i do this..?

    Thanks,

    Bastiaan
  • »15.04.15 - 19:42
    Profile Visit Website
  • MorphOS Developer
    geit
    Posts: 1049 from 2004/9/23
    You simply don´t!

    Just include the related header file.

    If you want to include an MUI object inside your GUI, etc a lamp object, you just

    #include <mui/Lamp_mcc.h>

    And now you can use the macro

    WindowObject, ....
    Child, LampObject, End,
    End;

    Same goes for all external classes.
  • »15.04.15 - 19:47
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Tcheko
    Posts: 534 from 2003/2/25
    From: France
    You can do this as well if you don't like the macro way

    Object *obj = MUI_NewObject("classname.mcc", MUIA_Foobar, value, ...,TAG_DONE);
    Quelque soit le chemin que tu prendras dans la vie, sache que tu auras des ampoules aux pieds.
    -------
    I need to practice my Kung Fu.
  • »15.04.15 - 23:26
    Profile Visit Website
  • Just looking around
    Bastiaan
    Posts: 18 from 2014/8/7
    From: Amsterdam, The...
    Thanks bigtime guys, this amiga programming is just so different then anything ive done before. So far i managed to include the Scintilla header file into my project. The project compiles.. so thats good. But know i'm stuck on creating the actual control in the GUI.

    I have:

    Child, VGroup,
    Child, scintilla = Scintilla(); // <-- something wrong here..
    Child, VSpace(0),
    End,
    End,

    I analyzed the header file, but can't make up the actual name of the control's constructor. Does anybody know if there's any documentation of example online of using the Scintilla.mcc class?

    Thanks.

    [ Edited by Bastiaan 16.04.2015 - 19:25 ]
  • »16.04.15 - 19:22
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    pegasos-sigi2
    Posts: 265 from 2006/8/31
    Quote:

    Bastiaan wrote:
    Thanks bigtime guys, this amiga programming is just so different then anything ive done before. So far i managed to include the Scintilla header file into my project. The project compiles.. so thats good. But know i'm stuck on creating the actual control in the GUI.

    I have:

    Child, VGroup,
    Child, scintilla = Scintilla(); // <-- something wrong here..
    Child, VSpace(0),
    End,
    End,

    I analyzed the header file, but can't make up the actual name of the control's constructor. Does anybody know if there's any documentation of example online of using the Scintilla.mcc class?

    Thanks.


    This is the entry to beginning:


    Child, VGroup,
    Child, scintilla = MUI_NewObject("Scintilla.mcc",TAG_DONE),
    Child, VSpace(o),
    End,
    End,


    Every extern MUI-Class must add with above code or with a macro in your custom source.
    Spreedy - The spreedsheet editor of MorphOS
    Calimero - Do you know about the new DTP Program for MorphOS ?
  • »16.04.15 - 19:52
    Profile
  • MorphOS Developer
    Krashan
    Posts: 1107 from 2003/6/11
    From: Białystok...
    While not directly answering your question, reading MUI chapter of this document will give you some background.
  • »17.04.15 - 05:43
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Tcheko
    Posts: 534 from 2003/2/25
    From: France
    @Bastiaan : important thing to know. Everything you allocated (memory, port, whatever) shall be *explicitly* released when exiting. There is no resource tracking at all.

    Everything you forgot to release is definitly *lost* (you could remove stuff in system struct afterward, but well, that's a call for disaster).

    Function that returns something and has FreeFunctionName counterpart must work in pair.

    Do not forget to release Lock()ed file either. Upon program exit, the operating system will not unlock the file for you.

    Programming AmigaOS operating system is like dancing on eggs. :)
    Quelque soit le chemin que tu prendras dans la vie, sache que tu auras des ampoules aux pieds.
    -------
    I need to practice my Kung Fu.
  • »17.04.15 - 07:20
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Raf_MegaByte
    Posts: 430 from 2004/10/10
    From: Nella grande r...
    If in doubt how to realize software for MorphOS you can buy this visual development tool:

    Hollywood

    http://www.hollywood-mal.com/


    You realize your software in Hollywood and then with a touch of the mouse, Hollywood will output executable code for all these platforms

    AmigaOS 3 (m68k)
    AmigaOS 4 (ppc)
    Android (arm)
    AROS (i386)
    Linux (arm)
    Linux (i386)
    Linux (ppc)
    Mac OS X (i386)
    Mac OS X (ppc)
    MorphOS (ppc)
    WarpOS (m68k/ppc)
    Windows (i386)

    [ Edited by Raf_MegaByte 17.04.2015 - 09:53 ]
    Bill Gates "Think!", Steve Jobs: "Think different!" So... Let these guy continue blabbering thinking and enjoy computing! We are on Amiga!
  • »17.04.15 - 08:53
    Profile
  • Just looking around
    Bastiaan
    Posts: 18 from 2014/8/7
    From: Amsterdam, The...
    Ok, bring up the cake :D just wrote my first MUI application.. :D

    @Pegasos-sigi2

    Thank you, i finaly got it to work!!! :-)

    @Krashan:
    Thanks and cool, will read into that :-)

    @Tcheko:
    I see! Thank you for sharing this with me, i realy appreciate it!! learning all the time :-)
  • »17.04.15 - 17:16
    Profile Visit Website
  • Just looking around
    Bastiaan
    Posts: 18 from 2014/8/7
    From: Amsterdam, The...
    @Raf_Megabyte: Thanks for the headsup, but i'm not a app generator kind of guy. Doing stuff the hard way haha.
  • »19.04.15 - 18:58
    Profile Visit Website