moai.FreeApp() doesn't seem to work

Discuss GUI programming with the RapaGUI plugin here

moai.FreeApp() doesn't seem to work

Postby PEB » Fri Jul 15, 2016 2:07 am

Here is some code that demonstrates the problem:
Code: Select all
AppStr$=[[<?xml version="1.0" encoding="iso-8859-1"?>
<application>
   <window title="Test">
      <vgroup>
            <button>Dummy Button</button>
      </vgroup>
   </window>
</application>]]

moai.CreateApp(AppStr$)
WaitLeftMouse()
moai.FreeApp()
WaitLeftMouse()
moai.CreateApp(AppStr$)


So is this a bug, or am I doing something wrong?
PEB
 
Posts: 152
Joined: Sun Feb 21, 2010 2:28 am

Re: moai.FreeApp() doesn't seem to work

Postby airsoftsoftwair » Sat Jul 16, 2016 1:07 pm

No, looks like a bug to me. I don't think I ever tested moai.FreeApp() because normally it isn't needed. By the way, why do you want to re-create the application object?
User avatar
airsoftsoftwair
 
Posts: 2233
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: moai.FreeApp() doesn't seem to work

Postby PEB » Sat Jul 16, 2016 8:55 pm

The main part of my program does not use RapaGUI; but depending on what the user might want to adjust, different configuration windows can be opened (that's where I wanted to use RapaGUI). So I was thinking that I could create the GUI window when needed, free it after it was closed, and then have the possibility to recreate a different GUI window (based on what the user chooses to do).
PEB
 
Posts: 152
Joined: Sun Feb 21, 2010 2:28 am

Re: moai.FreeApp() doesn't seem to work

Postby airsoftsoftwair » Mon Jul 18, 2016 11:06 am

PEB wrote:The main part of my program does not use RapaGUI;


That's only possible on AmigaOS. On all other systems, saying @REQUIRE "RapaGUI" will switch your complete script to RapaGUI's display adapter which means that even normal displays will essentially be windows managed by RapaGUI which means that they won't be 100% compatible to displays managed by Hollywood's inbuilt display adapter because not all features are currently routed through the plugin API, e.g. the "NoClose" flag isn't routed through. Menus aren't routed through either.

The reason why RapaGUI can't coexist with Hollywood's inbuilt display adapter on Win32/Mac/Linux is that RapaGUI uses an entirely different toolkit which can't be integrated with Hollywood's inbuilt display adapter. This is only possible with MUI on AmigaOS which integrates nicely with Hollywood's inbuilt display adapter because of AmigaOS' clean design in which additional toolkits just add their own wait signals which can then be handled through exec.library. On all other systems, however, things are much more complicated so that RapaGUI has to kill Hollywood's default event handler completely and substitute it with a custom one. That's why RapaGUI will replace almost everything on non-AmigaOS systems.

but depending on what the user might want to adjust, different configuration windows can be opened (that's where I wanted to use RapaGUI). So I was thinking that I could create the GUI window when needed, free it after it was closed, and then have the possibility to recreate a different GUI window (based on what the user chooses to do).


It's possible to do this (once I've fixed the bug in moai.CreateApp()) but it won't make any sense because, as I said above, once you require RapaGUI in your script, all your displays will be RapaGUI windows, even without an application object.
User avatar
airsoftsoftwair
 
Posts: 2233
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: moai.FreeApp() doesn't seem to work

Postby airsoftsoftwair » Sat Nov 05, 2016 4:23 pm

Code: Select all
- Fix: moai.FreeApp() didn't work correctly
User avatar
airsoftsoftwair
 
Posts: 2233
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany


Return to RapaGUI

Who is online

Users browsing this forum: No registered users and 2 guests

cron