From belaviyo at gmail.com Mon Mar 2 11:44:54 2009 From: belaviyo at gmail.com (joe ertaba) Date: Mon, 2 Mar 2009 23:14:54 +0330 Subject: [Project_owners] JS Question Message-ID: <23d9f6b20903021144hfd24053h4a849b2d6cc460f5@mail.gmail.com> Hi Here is my problem, I have a asynchron function (MyAsynchronFun), I need it many time in my code, but problem is that I need its output to continue my script, here is sample a = 1; MyAsynchronFun( function(a) { b = some_return_value_from_MyAsynchronFun; ... MyAsynchronFun( function(b) { ... c = some_return_value_from_MyAsynchronFun; ... }) }) Whereas I need to call this function several times so it make code so complex, Here is what I need a = 1; b = MySynchronFun( a ); .... c = MySynchronFun( b ); so I want to convert a asynchron function to synchron one, here is my idea MySynchronFun (a) { MyAsynchronFun( function(a) { .... , cancel_pause() } ); PAUSE(); return some_return_value_from_MyAsynchronFun; } There isn't any real pause function for JS, but I wonder if there is something like alert() which make script stop without any cpu usage and cancel_pause should be something like clicking on OK in alert window so is there any idea about this kind of pause function ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From fry.kun at gmail.com Mon Mar 2 12:56:05 2009 From: fry.kun at gmail.com (Konstantin Svist) Date: Mon, 02 Mar 2009 12:56:05 -0800 Subject: [Project_owners] JS Question In-Reply-To: <23d9f6b20903021144hfd24053h4a849b2d6cc460f5@mail.gmail.com> References: <23d9f6b20903021144hfd24053h4a849b2d6cc460f5@mail.gmail.com> Message-ID: <49AC47E5.5010807@gmail.com> joe ertaba wrote: > Hi > > Here is my problem, I have a asynchron function (MyAsynchronFun), I > need it many time in my code, but problem is that I need its output to > continue my script, here is sample > > a = 1; > > MyAsynchronFun( function(a) { > > b = some_return_value_from_MyAsynchronFun; > ... > MyAsynchronFun( function(b) { > ... > c = some_return_value_from_MyAsynchronFun; > ... > > }) > > }) > > Whereas I need to call this function several times so it make code so > complex, > > Here is what I need > > a = 1; > > b = MySynchronFun( a ); > .... > c = MySynchronFun( b ); > > so I want to convert a asynchron function to synchron one, here is my idea > > > MySynchronFun (a) { > > MyAsynchronFun( function(a) { .... , cancel_pause() } ); > > PAUSE(); > > return some_return_value_from_MyAsynchronFun; > > } > > > There isn't any real pause function for JS, but I wonder if there is > something like alert() which make script stop without any cpu usage > and cancel_pause should be something like clicking on OK in alert window > > so is there any idea about this kind of pause function ? If you want to leave it async, your best bet is probably to use callbacks. For instance: function abc(){ ...code part 1... setTimeout( function(){MyAsynchronFun(abc_callback, callback_params)} , -1); // call the async function } function abc_callback(params) ...code part 2... } function MyAsynchronFun(callback, callback_params) { ... setTimeout( function(){callback.apply(this, callback_params)}), -1); } From loveleeyoungae at yahoo.com Wed Mar 4 23:18:50 2009 From: loveleeyoungae at yahoo.com (NGUYEN-Manh Hung) Date: Wed, 4 Mar 2009 23:18:50 -0800 (PST) Subject: [Project_owners] Error of page encoding Message-ID: <752173.58944.qm@web38003.mail.mud.yahoo.com> Hi, We committed this page 2 weeks ago, and it has been fine until now. All characters now turn into "?", it seems that mozdev has changed something in the encoding? http://vi.mozdev.org/index.vi.html ----- NGUYEN-Manh Hung From manish at experiencecommerce.com Wed Mar 4 23:27:07 2009 From: manish at experiencecommerce.com (manish deora) Date: Thu, 5 Mar 2009 12:57:07 +0530 Subject: [Project_owners] Firefox sidebar addon Message-ID: Hi ,I have a problem in firefox sidebar addon, how can i automatically open up a sidebar addon just after installing it.? Regards, Manish Deora -------------- next part -------------- An HTML attachment was scrubbed... URL: From silfreed at silfreed.net Thu Mar 5 05:13:37 2009 From: silfreed at silfreed.net (Douglas E. Warner) Date: Thu, 05 Mar 2009 08:13:37 -0500 Subject: [Project_owners] Error of page encoding In-Reply-To: <752173.58944.qm@web38003.mail.mud.yahoo.com> References: <752173.58944.qm@web38003.mail.mud.yahoo.com> Message-ID: <49AFD001.8010405@silfreed.net> NGUYEN-Manh Hung wrote: > We committed this page 2 weeks ago, and it has been fine until now. All characters now turn into "?", it seems that mozdev has changed something in the encoding? > http://vi.mozdev.org/index.vi.html > I don't know what might have changed, but it looks like this file contains the Byte-Order Mark. Removing it from the file on our test server seemed to fix it [1]. This is the script I used to fix it [2]. -Doug [1] http://vi.vebzom.org/index.vi.html [2] http://lists.freebsd.org/pipermail/freebsd-questions/2006-February/113401.html -- Douglas E. Warner Site Developer Mozdev.org http://www.mozdev.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: OpenPGP digital signature URL: From loveleeyoungae at yahoo.com Thu Mar 5 05:58:13 2009 From: loveleeyoungae at yahoo.com (NGUYEN-Manh Hung) Date: Thu, 5 Mar 2009 05:58:13 -0800 (PST) Subject: [Project_owners] Error of page encoding References: <752173.58944.qm@web38003.mail.mud.yahoo.com> <49AFD001.8010405@silfreed.net> Message-ID: <965372.3709.qm@web38008.mail.mud.yahoo.com> Well, so you don't support HTML files containing BOM characters? Just strange, because the page was fine when we uploaded it 2 weeks ago, and we haven't done anything to it since then. The error is still there and the file on your local server is an old one. Do you mean that we should re-upload the non-BOM file? ----- NGUYEN-Manh Hung ----- Original Message ---- > From: Douglas E. Warner > To: Mozdev Project Owners List > Sent: Thursday, March 5, 2009 8:13:37 PM > Subject: Re: [Project_owners] Error of page encoding > > NGUYEN-Manh Hung wrote: > > We committed this page 2 weeks ago, and it has been fine until now. All > characters now turn into "?", it seems that mozdev has changed something in the > encoding? > > http://vi.mozdev.org/index.vi.html > > > > I don't know what might have changed, but it looks like this file contains the > Byte-Order Mark. Removing it from the file on our test server seemed to fix > it [1]. This is the script I used to fix it [2]. > > -Doug > > [1] http://vi.vebzom.org/index.vi.html > [2] > http://lists.freebsd.org/pipermail/freebsd-questions/2006-February/113401.html > > -- > Douglas E. Warner Site Developer > Mozdev.org http://www.mozdev.org From silfreed at silfreed.net Thu Mar 5 06:27:08 2009 From: silfreed at silfreed.net (Douglas E. Warner) Date: Thu, 05 Mar 2009 09:27:08 -0500 Subject: [Project_owners] Error of page encoding In-Reply-To: <965372.3709.qm@web38008.mail.mud.yahoo.com> References: <752173.58944.qm@web38003.mail.mud.yahoo.com> <49AFD001.8010405@silfreed.net> <965372.3709.qm@web38008.mail.mud.yahoo.com> Message-ID: <49AFE13C.8000906@silfreed.net> NGUYEN-Manh Hung wrote: > Well, so you don't support HTML files containing BOM characters? Just strange, because the page was fine when we uploaded it 2 weeks ago, and we haven't done anything to it since then. > > The error is still there and the file on your local server is an old one. Do you mean that we should re-upload the non-BOM file? > The HTML files aren't used as-is; they're included into our template system which wraps the html file in other content. So the BOM isn't the first character in the file, which shifts things so the UTF-8 isn't properly-aligned. I'm not sure what has changed since you first uploaded the file, but the BOM seems to be the problem. I didn't touch the production version as I don't like to modify projects' content unless asked; so yes, just re-upload the file w/o the BOM and see if that helps. -Doug -- Douglas E. Warner Site Developer Mozdev.org http://www.mozdev.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: OpenPGP digital signature URL: From brian at mozdev.org Thu Mar 5 07:51:27 2009 From: brian at mozdev.org (Brian King) Date: Thu, 05 Mar 2009 16:51:27 +0100 Subject: [Project_owners] Firefox sidebar addon In-Reply-To: References: Message-ID: <49AFF4FF.9000900@mozdev.org> manish deora wrote: > Hi , > I have a problem in firefox sidebar addon, > how can i automatically open up a sidebar addon just after installing it.? https://developer.mozilla.org/en/Code_snippets/Sidebar - Brian From manish at experiencecommerce.com Thu Mar 5 08:58:19 2009 From: manish at experiencecommerce.com (manish deora) Date: Thu, 5 Mar 2009 22:28:19 +0530 Subject: [Project_owners] Fwd: Firefox sidebar addon In-Reply-To: References: <49AFF4FF.9000900@mozdev.org> Message-ID: Regards, Manish Deora ---------- Forwarded message ---------- From: manish deora Date: Thu, Mar 5, 2009 at 10:26 PM Subject: Re: [Project_owners] Firefox sidebar addon To: Mozdev Project Owners List Hi Brian, i am already using toggleSidebar function but, if i call it in my overlay.xul it gives me exception of property not found. and i think it is getting null as sidebar object. but once i call it on users click of status button then i works fine. Can u help me out.? Regards, Manish Deora 2009/3/5 Brian King - Show quoted text - manish deora wrote: > >> Hi , >> I have a problem in firefox sidebar addon, >> how can i automatically open up a sidebar addon just after installing it.? >> > > https://developer.mozilla.org/en/Code_snippets/Sidebar > > - Brian > _______________________________________________ > Project_owners mailing list > Project_owners at mozdev.org > https://www.mozdev.org/mailman/listinfo/project_owners > -------------- next part -------------- An HTML attachment was scrubbed... URL: From manish at experiencecommerce.com Fri Mar 6 02:41:05 2009 From: manish at experiencecommerce.com (manish deora) Date: Fri, 6 Mar 2009 16:11:05 +0530 Subject: [Project_owners] toggleSidebar doesnot work in ff3 In-Reply-To: References: Message-ID: Hi, i have got into a strange problem, i am calling the toggleSidebar function in my overlay.xul file in window.onload , it works fine in FF2 versions but in ff3 it doesnot open the sidebar. i tried to catch the exception also but no exception. Can anyone help out on this. Regards, Manish Deora -------------- next part -------------- An HTML attachment was scrubbed... URL: From manish.deora at gmail.com Thu Mar 5 08:56:30 2009 From: manish.deora at gmail.com (manish deora) Date: Thu, 5 Mar 2009 22:26:30 +0530 Subject: [Project_owners] Firefox sidebar addon In-Reply-To: <49AFF4FF.9000900@mozdev.org> References: <49AFF4FF.9000900@mozdev.org> Message-ID: Hi Brian, i am already using toggleSidebar function but, if i call it in my overlay.xul it gives me exception of property not found. and i think it is getting null as sidebar object. but once i call it on users click of status button then i works fine. Can u help me out.? Regards, Manish Deora 2009/3/5 Brian King > manish deora wrote: > >> Hi , >> I have a problem in firefox sidebar addon, >> how can i automatically open up a sidebar addon just after installing it.? >> > > https://developer.mozilla.org/en/Code_snippets/Sidebar > > - Brian > _______________________________________________ > Project_owners mailing list > Project_owners at mozdev.org > https://www.mozdev.org/mailman/listinfo/project_owners > -------------- next part -------------- An HTML attachment was scrubbed... URL: From manish.deora at gmail.com Fri Mar 6 02:40:37 2009 From: manish.deora at gmail.com (manish deora) Date: Fri, 6 Mar 2009 16:10:37 +0530 Subject: [Project_owners] toggleSidebar doesnot work in ff3 Message-ID: Hi, i have got into a strange problem, i am calling the toggleSidebar function in my overlay.xul file in window.onload , it works fine in FF2 versions but in ff3 it doesnot open the sidebar. i tried to catch the exception also but no exception. Can anyone help out on this. Regards, Manish Deora -------------- next part -------------- An HTML attachment was scrubbed... URL: From belaviyo at gmail.com Sat Mar 7 06:51:27 2009 From: belaviyo at gmail.com (joe ertaba) Date: Sat, 7 Mar 2009 18:21:27 +0330 Subject: [Project_owners] Real time JS editor on extension Message-ID: <23d9f6b20903070651o1234b63rbdab2c4f7f7e0a67@mail.gmail.com> Hi Is it possible to add a CodeMirror JavaScript editor to a Firefox extension? Here is the link: http://marijn.haverbeke.nl/codemirror/jstest.html http://marijn.haverbeke.nl/codemirror/codemirror-0.61.zip example editor works on a new tab in browser but when I put it in my extension then it doesnt show the editor