[MUI] ApplicationObject twice
  • Order of the Butterfly
    Order of the Butterfly
    r-tea
    Posts: 300 from 2005/3/27
    From: Poland, Zdzies...
    Just curious...
    Is it allowed to have two application objects within a single cource code of MUI program?
    E.g.
    Code:
    app = ApplicationObject,
    MUIA_Application_Title,
    ...
    End;
    app2 = ApplicationObject,
    MUIA_Application_Title,
    ...
    End;
    Mac mini G4@1,5GHz silent upgrade + Xerox Phaser 3140 + EPSON Perfection 1240U
    Commodore C64C + 2 x 1541II + Datasette + SD-Box

    I miss draggable screens... and do you? I know I'm in a minority unfortunately.
  • »14.08.17 - 14:01
    Profile
  • MorphOS Developer
    geit
    Posts: 1030 from 2004/9/23
    AFAIK as long as you don´t mix any objects/classes/signals/pointers it should work fine.

    Potential side effects could be that you may run out of task signals.

    But why would you want to do something like that? Just asking as you may just overcomplicate something.
  • »14.08.17 - 15:10
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2968 from 2003/3/5
    From: Canada
    You are threading in a dangerous territory here - I'd recommend moving the 2nd app into its own thread.
  • »14.08.17 - 16:19
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    r-tea
    Posts: 300 from 2005/3/27
    From: Poland, Zdzies...
    I was just wondering if it would give some advantages, e.g. the second app object would be a separate task/process in much easiest way than it's commonly supposed to do. :-D
    Mac mini G4@1,5GHz silent upgrade + Xerox Phaser 3140 + EPSON Perfection 1240U
    Commodore C64C + 2 x 1541II + Datasette + SD-Box

    I miss draggable screens... and do you? I know I'm in a minority unfortunately.
  • »14.08.17 - 16:20
    Profile
  • MorphOS Developer
    geit
    Posts: 1030 from 2004/9/23
    A second application is not running in a new task. It will be the same task.
  • »15.08.17 - 11:43
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2968 from 2003/3/5
    From: Canada
    A MUI application effectively runs on the process that calls MUIM_Application_NewInput. While it's possible to have it called twice for both app objects, there really is no benefit there. You must call NewInput on the process you created the MUIC_Application object on btw.
  • »15.08.17 - 13:04
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    r-tea
    Posts: 300 from 2005/3/27
    From: Poland, Zdzies...
    Ok. Clear as a cristal :-)

    Another question regarding MUI:
    Is there a programmable way to prevent an user from iconifying an application at all?
    Mac mini G4@1,5GHz silent upgrade + Xerox Phaser 3140 + EPSON Perfection 1240U
    Commodore C64C + 2 x 1541II + Datasette + SD-Box

    I miss draggable screens... and do you? I know I'm in a minority unfortunately.
  • »16.08.17 - 19:58
    Profile