OESF Portables Forum

Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => Qt/Qtopia => Topic started by: gregarican on October 03, 2005, 02:53:02 pm

Title: Vanishing App?
Post by: gregarican on October 03, 2005, 02:53:02 pm
I have a QPEApplication object created as a Ruby script. The object and its various children's objects, methods, etc. work fine. There is a suspect area. I have a series of push buttons that launch various documents various using Hancom Word. The code that I have to accomplish the actual launching is similar to:
Code: [Select]
system("qcop QPE/Application/HancomMobileWord 'setDocument(QString)' '/path/to/myDocument.doc'")The Ruby system() method that wraps the qcop call simply launches a sub-shell that loads up Hancom Word set to a particular document. The problem is when I close Hancom Word the QPEApplication object disappears. When I check the active processes I see that my Ruby script is running but I can't seem to recover the GUI app I created. If I try to issue something like:
Code: [Select]
qcop QPE/Application/myGUIApp 'setDocument()'there is a brand new instance of the GUI app I have. The original one still doesn't appear. Or if I try:
Code: [Select]
qcop QPE/Application/myGUIApp 'raise()'nothing happens.

Since my Ruby script doesn't have anything displayed on the task bar I can't figure out a way to bring it back after exiting Hancom Word. Any suggestions?
Title: Vanishing App?
Post by: gregarican on October 04, 2005, 09:44:36 am
As a follow up I read about similar behavior when a script creates a new QPEApplication instance. Apparently since the script doesn't have a taskbar instance associated with it, when another Qtopia app is launched and exits the scripted QPEApplication object just disappears into the background. See http://lists.trolltech.com/qt-embedded-int...ead00043-0.html (http://lists.trolltech.com/qt-embedded-interest/2005-03/thread00043-0.html) for details.

So if I launch my Ruby script from a Terminal session it will stay visible after Hancom Word exits. But the load that it adds having a Terminal session up is considerable. Is there an easy way to just create a taskbar instance for my Ruby script?
Title: Vanishing App?
Post by: gregarican on October 04, 2005, 10:35:59 am
Finally figured it out. Checking another forum on this site I ran across a similar Python scripting issue (https://www.oesf.org/forums/index.php?showtopic=5626&hl=). Making the Exec= value in the .desktop exactly match the QPEApplication.new() parameter in my Ruby script caused there to be a corresponding taskbar icon instance for my application. Now it doesn't disappear when Hancom Word exits. This seemed like a needle in a haystack, so I am going to post these results to a Ruby board or two just in case some Qtopia developer using Ruby runs into similar issues....