Jump to content


Important Announcement!

Please read this post about our new Privacy Policy


Photo

Auto Context - Ver. 1.5.0.3


  • Please log in to reply
110 replies to this topic

#101 Cashman

Cashman

    [hu-HU] Moderator

  • BabelZillian Mods
  • 427 posts

Posted 20 September 2009 - 11:52 AM

@Sonickydon

Is throwed an error to Error Console?

I created a test overlay.js file.
Please backup the original and replace with the new js file.
On popup the document title is replaced with some characters.
Could you send me the showed characters (or screenshot)..

Attached Files



#102 Sonickydon

Sonickydon

    [el-GR] Coordinator

  • BabelZillian Mods
  • 768 posts

Posted 21 September 2009 - 01:12 AM

QUOTE (Cashman @ Sep 20 2009, 11:52) <{POST_SNAPBACK}>
Is throwed an error to Error Console?

The error i get on the error console (with both files, the normal and the testing) is:

CODE
Error: uncaught exception: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFileInputStream.init]"  nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)"  location: "JS frame :: chrome://autocontext/content/utility.js :: anonymous :: line 133"  data: no]


QUOTE (Cashman @ Sep 20 2009, 11:52) <{POST_SNAPBACK}>
On popup the document title is replaced with some characters.
Could you send me the showed characters (or screenshot)..

Upon selection and popup the showed characters are: TEST:123456789ABCDEFG1234HIJKLMNOPQRS
If i right click after that, it turns to : TEST:123456789ABCD.
and when i release the selection it turns to : TEST:123456789ABCDEFG1234H.
If i switch to another tab after that it turns to : TEST:123456789A.
There's also a number of Gtk errors i get on the terminal if i run Firefox through it which i don't know if are of any use to you, i include them anyway in the attached txt file to avoid cluttering the forum.
In case i was misunderstood : The popup menu works, displays and reacts fine, the problem is the right-click menu.

PS. I don't know if anybody else noticed, but the extension blocks the build in "three clicks to select the whole line" feature of Firefox since the menu pops up upon the second click on a word - something quite frustrating for lazy people like me smile.gif.

Attached Files


Graecum est, non legitur

#103 Cashman

Cashman

    [hu-HU] Moderator

  • BabelZillian Mods
  • 427 posts

Posted 22 September 2009 - 07:41 PM

QUOTE
The error i get on the error console:
location: "JS frame :: chrome://autocontext/content/utility.js :: anonymous :: line 133" data: no


listURLget: function(listName) {
var filelist;
if (acbranch.getBranchAutoContext().getIntPref("prefs-storeExListMenulist")==0) {
filelist = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties)
.get("ProfD",Components.interfaces.nsIFile);
filelist.append(acutils.fListName+listName+".txt");
} else {
var filelist = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
filelist.initWithPath(gOverlayAutoContext.acconvertToUnicode("UTF-8", acbranch.getBranchAutoContext().getCharPref("prefs-storeExListPath")));
filelist.append(acutils.fListName+listName+".txt");
}
if (!filelist.exists()) filelist.create(0,null);
var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"]
.createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
converter.charset = "UTF-8";
var istream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
istream.init(filelist, 0x01, 0444, 0);
istream.QueryInterface(Components.interfaces.nsILineInputStream);
var line = {}, hasmore; var i = 0;
var listURLtemp = new Array();
if (!filelist.fileSize==0) {
do {
hasmore = istream.readLine(line);
listURLtemp[i] = line.value;
i += 1;
} while(hasmore);
}
istream.close();
return listURLtemp;
},


The problem i know. It is in Linux.
The rights for the file autocontext-ListW.txt and autocontext-ListB.txt stored by default in profile direcory.
I don't know why it is or how to resolve the problem.
Set the full access for the files..
Tell me if this resolves the problem..


#104 Sonickydon

Sonickydon

    [el-GR] Coordinator

  • BabelZillian Mods
  • 768 posts

Posted 24 September 2009 - 01:59 AM

QUOTE (Cashman @ Sep 22 2009, 19:41) <{POST_SNAPBACK}>
The problem i know. It is in Linux.
The rights for the file autocontext-ListW.txt and autocontext-ListB.txt stored by default in profile direcory.
I don't know why it is or how to resolve the problem.
Set the full access for the files..
Tell me if this resolves the problem..


It does work ok! Hmmm.. That's really weird, i can't remember if i ever have noticed a file which belongs to the right user but he has neither read, nor write privileges on it, do you set the right mode for the files when you create them?.
Graecum est, non legitur

#105 Cashman

Cashman

    [hu-HU] Moderator

  • BabelZillian Mods
  • 427 posts

Posted 26 September 2009 - 05:54 PM

@Sonickydon
QUOTE
... do you set the right mode for the files when you create them?

I don't know. I create all files in my extension if not exists with:
if (!filelist.exists()) filelist.create(0,null);
I found in somewhere on web the file creating with:
file.create(0x00, 0664);
..but I don't know, what is the option 0664.
I can't test it in Linux.

I found this one too:
octal binary meaning
0600 000 110 000 000 readable and writable by owner
0644 000 110 100 100 readable and writable by owner, read only for everyone else

The file init is the folowing in my extension:
istream.init(filelist, 0x01, 0444, 0);
os.init(file, flags, 0600, 0);
istream.init(filelist, 0x02 | 0x20, 0664, 0); // write, truncate
istream.init(filelist, 0x02 | 0x08 | 0x10, 0664, 0); // write, create, append
I think the problem is with permission 0444 which is only for read only?
Or in my code I wanna write to the file which is opened for read and not to write..

#106 Sonickydon

Sonickydon

    [el-GR] Coordinator

  • BabelZillian Mods
  • 768 posts

Posted 28 September 2009 - 01:57 AM

QUOTE (Cashman @ Sep 26 2009, 17:54) <{POST_SNAPBACK}>
I don't know. I create all files in my extension if not exists with:
if (!filelist.exists()) filelist.create(0,null);
I found in somewhere on web the file creating with:
file.create(0x00, 0664);
..but I don't know, what is the option 0664.
I can't test it in Linux.

0644 gives the right permissions to the file, you've already said that smile.gif :
QUOTE
0644 000 110 100 100 readable and writable by owner, read only for everyone else



QUOTE
I think the problem is with permission 0444 which is only for read only?
Or in my code I wanna write to the file which is opened for read and not to write..

Negative, the problem is that you create a file for which the owner (user) has neither read, nor write permission, which means that nobody can read it or write in it.

I've replaced the "0, null" arguments with "0x00, 644" for the filelist.create function and it works right on my system (the files are created with read and write permissions for the owner) so i guess that if it still works on windows (i can't test it on that platform but i think that the 644 argument is valid only for unix-like platforms and is ignored on windows) then the problem is solved.
Graecum est, non legitur

#107 Cashman

Cashman

    [hu-HU] Moderator

  • BabelZillian Mods
  • 427 posts

Posted 28 September 2009 - 04:13 PM

@Sonickydon
Thank you for your help.
I make the changes..
Extension upadted with new file creating rights (1.5.0.3).


#108 humbertosartini

humbertosartini

    Advanced Member

  • Members
  • 239 posts

Posted 20 February 2010 - 06:27 PM

Hi

Brazilian Portuguese (pt-BR) localization has been released

Humberto
[]'s
Humberto Sartini
http://www.hss.blog.br

#109 Guest_charmed94_*

Guest_charmed94_*
  • Guests

Posted 10 March 2010 - 09:52 PM

Delete me!

#110 DavidONE

DavidONE

    Newbie

  • Members
  • 1 posts

Posted 30 October 2010 - 03:31 PM

My error log is showing two errors for Auto Context nsContextMenu.js and utility.js - see bottom of this screen shot for details: http://i.imgur.com/1Vj3A.png

#111 Lakrits

Lakrits

    Daredevil Test Pilot

  • Admin
  • 894 posts

Posted 31 October 2010 - 08:13 PM

Swedish locale (sv-SE) added and released.
"[…] och han talar med bönder på böndernas sätt
men med lärde män på latin." – Erik Axel Karlfeldt

Lakrits
BabelZilla admin
Moderator for the Swedish BabelZilla forum section


2 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


    CCBot (2)