Development :  K-Meleon Forum
K-Meleon development related discussions. 
nsIAppStartup
Posted by: adodupan
Date: July 07, 2011 09:00PM

This interface is intended to be used as startup application service.
Has anybody tried to use this service. In km15 i see the error message in the console, in km16 i do not see errors..Except it function does not work.
Interest me your experience. Please help me.

Options: ReplyQuote
Re: nsIAppStartup
Posted by: deadlock
Date: July 07, 2011 09:55PM

@adodupan
>In km15 i see the error message in the console,
What did you do in KM 1.54 to get an nsIAppStartup error?

>in km16 i do not see errors..Except it function does not work.
>Interest me your experience. Please help me.

What function does it provide and did that work in 1.5?

Those "Obsolete since Gecko 1.9.1" looks interesting.
It is KM 1.6's Gecko version.

Options: ReplyQuote
Re: nsIAppStartup
Posted by: adodupan
Date: July 07, 2011 10:31PM

I am using quit and eRestart constant. required gecko 1.8

Options: ReplyQuote
Re: nsIAppStartup
Posted by: deadlock
Date: July 07, 2011 10:49PM

@adodupan
>I am using quit and eRestart constant. required gecko 1.8[/quote]
Does this refer to KM sources?
I need a sample to test it in KM 1.54 and
can use that for KM 1.6 to find a solution.

Options: ReplyQuote
Re: nsIAppStartup
Posted by: adodupan
Date: July 07, 2011 11:10PM

Try this

function restartApp() {
var appStartup=Components.classes["@mozilla.org/toolkit/app-startup;1"]
.getService(Components.interfaces.nsIAppStartup);
appStartup.quit(appStartup.eForceQuit | appStartup.eRestart);
}

function quitApp() {
var appStartup=Components.classes["@mozilla.org/toolkit/app-startup;1"]
.getService(Components.interfaces.nsIAppStartup);
appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit);
}



Edited 1 time(s). Last edit at 07/07/2011 11:12PM by adodupan.

Options: ReplyQuote
Re: nsIAppStartup
Posted by: deadlock
Date: July 08, 2011 01:16AM

@adodupan
It heavily depends on where those functions
are executed. What I really need is this:

A working sample I can copy KM 1.54,
that can be executed by a button.

Compreg.dat in KM 1.6 says that app-startup is registered.

Reference A:
http://www.oxymoronical.com/experiments/xpcomref/applications/Firefox/3.5/components/@mozilla.org/toolkit/app-startup;1

Reference B:
https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIAppStartup_MOZILLA_2_0

Options: ReplyQuote
Re: nsIAppStartup
Posted by: adodupan
Date: July 08, 2011 01:58AM

Where the function should execute?
What do you mean 'that can be executed by a button'?

Do you have a specific answer, or an example?

Options: ReplyQuote
Re: nsIAppStartup
Posted by: deadlock
Date: July 08, 2011 02:42AM

@adodupan - you wrote:
>In km15 i see the error message in the console,
>in km16 i do not see >errors..Except it function does not work.


I asked for an example to reproduce the errors
in console you told you had. WHAT DID YOU DO?

Didn't you have those errors, because you
tried to use the function somewhere?

>Where the function should execute?
>What do you mean 'that can be executed by a button'?


EXAMPLE: Here is a XUL bug with attached code.
It works with 1.54 and has a problem in 1.6:

http://kmeleon.sourceforge.net/bugs/viewbug.php?bugid=1288

>Do you have a specific answer, or an example?
not yet, still trying to find out what you did

Options: ReplyQuote
Re: nsIAppStartup
Posted by: adodupan
Date: July 08, 2011 03:05AM

Error: Invalid InterfaceID = NS_ERROR_XPC_BAD_IID

Options: ReplyQuote
Re: nsIAppStartup
Posted by: deadlock
Date: July 08, 2011 03:15AM

@adodupan
>Error: Invalid InterfaceID = NS_ERROR_XPC_BAD_IID
That is an error and not an instruction to get the error.

Options: ReplyQuote
Re: nsIAppStartup
Posted by: adodupan
Date: July 08, 2011 04:00AM

I tried to run this service in various ways, but i reached the right result.
Trying to understand where others are wrong, that's the hard way. In this case it is a waste of time, everything i tried, i was wrong. If you have no solution to the problem, it is much faster and easier to find their own solution. So i think and i am pretty successful, but now i hit the wall.
This service is implemented by mozilla and i can not accept that option in ff this service can run, and not km.
Interest me your experience. If we want to help, be creative and find their own solution to this problem and share it with me.

If someone manages to use this service, ask for a concrete example.
Thank you for your answers.



Edited 1 time(s). Last edit at 07/08/2011 03:42PM by adodupan.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.