Codetch 0.3.4 Bugs

Please report any issues you are having with the 0.3.4 release of Codetch here. If you already sent an email to me, go ahead and repost it here in case others are still having the same problem. Of course, I’ll try to stamp out any bugs I encounter myself, but many of them being reported I have not experienced. So try to be as detailed as possible so I or others can determine what could be causing the problem.

Note that I am developing Codetch on my laptop with Windows XP and Firefox 1.0.6 (it isn’t intended for Deer Park at the moment). Please state your operating system and Firefox version aswell to help us out. Thanks, and let the bug hunting begin (or continue, actually).

21 Responses to “Codetch 0.3.4 Bugs”

  1. Micon Frink Says:

    Hey love the screenshots! But you’ve got some problems on Linux…

    I seem to have traced thr problem to a JavaScript thing in the codetch.hasFiles() function but haven’t yet found that function… I may DL the source and mess with it if I get a free moment…

    but thought you should know…

  2. Micon Frink Says:

    I’ve looked around and isolated the problem to the codetch.js script…

    the problem seems to be that you instanciate the class after the init script. In Windows it activates that class so everything works but in Linux something is liniar because it doesn’t get a codetch class in time…

    Moved the class to the begining of the file but I get some odd exceptions so I think there must be a liniar order that is not quite right…

    I can now open and edit files but I get the following Errors:

    content/editorBindings.xml :: initObs :: line 654
    content/dialogs/new.js :: openNew :: line 71
    content/scripts/initfiles.js files :: copyFromDef :: 115

    It seems that it’s just a code placement problem… Understanding that JavaScript is an interpreted language and should be looked at in liniar form helps a lot. Some parsers are mor forgiving than others on this point but we sould code as if they are not so forgiving. If you think through the code in liniar form that is probably where most of the problems with the linux version lie…

    I’ll be glad to do any Linux testing too if you wish…

    - Frink

  3. Zach Says:

    Oh, thanks for the info Frink. I indeed wasn’t aware of this liniar code issue. I will play around with the order, but if you could be a Linux tester that would be greatly appreciated, or anyone else aswell. Maybe try moving the init and startup functions to the end of the file? I’ll try to post a release with some guesswork on the correct order later on, but testers would be nice.

  4. Micon Frink Says:

    I did that but there was some more issue with all kinds of errors… sor I kinda figured I’d wait for then next release to play with it… Unfortunately I don’t have gadzooks of time to spend on debugging. I can test and give you results though…

    I’ve only seendthe liniar thing come into play a couple of times. I used to do a lot of crossbrowser JavaScripting and that was a big problem - IE and Netscape (pre Mozilla) were really stupid about doing things completely differently…

    All interpretted languages are liniar by design. However, some are better than others. PHP is really good about reading in several swipes. It first validates the code for parseability and then runs it. Javascript seems to do both at the same time. It may be more speedy but it’s harder because we don’t really know if the errors are syntax related or proceedural. Hopefully someone will find a better way to handle this in the future with Mozilla…

    But for now at least you’re building a kickin app!!! Keep up the good work!

  5. Lynn Says:

    Found the answer. I didn’t have Jave Enabled. Might note that in your help. Thanks

  6. Zach Says:

    I’m sure that Codetch doesn’t use Java in any way… strange.

  7. CA Lane Says:

    This is the second time I have encounted this problem, after installing 0.3.4, was unable to open anything from the explorer window? This also happened when I installed the progam for the first time. After closing the program and then re-opening it, the explorer window allowed me the double-click and open a file in the Insert pane.

    THe frist time it happened I was about to just un-install the program and forget about Codetch.

  8. CA Lane Says:

    Oops, FireFox 1.0.6 on ME (yes, ME…hehe)

  9. Zach Says:

    CA Lane, there must have been an error during installation, which only runs when installing a new version of Codetch. After an error occurs, javascript sort of bails, so some things won’t work correctly depending on when and where the error happens. That is the reason for the “codetch has no properties” error - an error occured before the codetch object was defined so problems arrise when the codetch object is called to by other scripts. But do you see any specific Codetch errors in the console?

  10. redclay Says:

    I’m using Firefox debian package (v1.0.7-1), I’ve installed codetech 0.3.5, but when I start the editor, I get this error on the javascript console:

    Errore: uncaught exception: [Exception… “Component returned failure code: 0×80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsILocalFile.copyTo]” nsresult: “0×80520015 (NS_ERROR_FILE_ACCESS_DENIED)” location: “JS frame :: chrome://codetch/content/scripts/initfiles.js :: copyFromDef :: line 115″ data: no]

  11. hrajko Says:

    i’m using firefox in windows2k 1.0.4, i’ve instaled codetch 0.3.5, and i have problem with character encoding in html a php files and templates…

    i haven’t use diferent charcode than utf8. how i change working charcode?

    ===SORRY FOR ENGLISH===

  12. Caesar Says:

    When will the extension support Firefox 1.5 beta?
    It looks good, but I can’t install it.
    (FF 1.5 b - Win XP SP2)

  13. Zach Says:

    Redclay, this seems to be a problem with folder permissions on Linux when Codetch installs… which I thought i fixed >:(.

    hrajko, hmm, I am aware of this problem and am devising a solution, if not some strange work around which may not work. Any experience extension developers are encouraged to help, on any solutions for that matter. Maybe I overlooked something that would make this feature simple… (in file I/O perhaps?)

    Caesar, probably the release after next.

  14. erlando Says:

    I’m having the same problems as redclay above. FC4, firefox 1.0.7, codetch 0.3.5.

    Which folders is it writing to?

  15. Caesar Says:

    Doesn’t support FF 1.5 Beta 2

  16. jpjanze Says:

    I can’t seem to get design or preview windows to work on osX and ff1.5 - anyone else had a problem?

    I can get code and reference window, but when I select anything else it is just a blank window.

  17. Hyperknuck Says:

    When i try to make a new page, it says: openenr.codetch has no properties.
    How can i change the properties then???

  18. Benedict Ernst Says:

    XML-Verarbeitungsfehler: Fehler beim Verarbeiten von Referenz auf externe Entität
    Adresse: chrome://codetch/content/codetch.xul
    Zeile Nr. 12, Spalte 1:%codetchDTD;
    ^%codetchDTD;
    ^%codetchDTD;
    ^%codetchDTD;
    ^

    Thats my Problem…if u can help me i am very thanksfully for a short mail.

  19. Gozala Says:

    Hello!!!
    I’m Irakli from Georgia, you know usually we have a lot of problems with developers soft in here, that’s because a very few soft supports UTF-8 encoding correctly!!! Our national encoding is supported in utf-8!!!

    NOW about the bug!!!!
    Codetch currently doesn’t read/writes Files encoded in utf8!!!
    So sad to me becose I liked it so much!!!

    you know I’ve just started with xul development, but I know how to correct this bug!! I even can do it myself but I prefer to ask you first!!!

    I’ll post here a little peace of my own script I’m using to read/write files I think it will help you!!!

    Thank’s anyway
    ————————————————————————————-
    file = {
    read : function ($from_file) {
    //Result object
    var $result = new Object();

    // FireFox-istvis failtan wvdomis txovna
    try {
    netscape.security.PrivilegeManager.enablePrivilege(”UniversalXPConnect”);}
    catch ($error)
    {$result.code = 1;
    $result.value = “Have no privilegies | ERROR : ” + $error;
    return $result;}

    //Failis wasakitxi mastis sheqmna
    var $file = Components.classes[”@mozilla.org/file/local;1″].createInstance(Components.interfaces.nsILocalFile);
    $file.initWithPath($from_file);
    if ($file.exists() == false)
    {$result.code = 2;
    $result.value = “File does not exists | ERROR : ” + $error;
    return $result;}

    //Failis shigtavsis amgebi mastis sheqmna \ failis ageba
    var $file_stream = Components.classes[”@mozilla.org/network/file-input-stream;1″].createInstance(Components.interfaces.nsIFileInputStream);
    $file_stream.init($file,0×01, 00004, null);

    //Filis shigtavsis cvladshi gadamyvani mastis gaketeba
    var $file_hold = Components.classes[”@mozilla.org/scriptableinputstream;1″].createInstance(Components.interfaces.nsIScriptableInputStream);
    $file_hold.init($file_stream);

    //failis shigtavsis
    var $file_output = $file_hold.read($file_hold.available());
    // Unikodebis podjerjka
    $file_output = file.utf8($file_output,”in”);

    $result.code = 0;
    $result.value = $file_output;

    //mexsierebis gawmenda
    //$file.close();
    $file_stream.close();
    $file_hold.close();

    return $result;
    }
    ,
    write : function ($to_file,$text) {
    //Result object
    var $result = new Object();

    try {
    netscape.security.PrivilegeManager.enablePrivilege(”UniversalXPConnect”);}
    catch ($error) {
    $result.code = 1;
    $result.value = “Unknown | ERROR : ” + $error;
    return $result;}

    // Failis chasaweri mastis sheqmna
    var $file = Components.classes[”@mozilla.org/file/local;1″].createInstance(Components.interfaces.nsILocalFile);
    $file.initWithPath($to_file);

    if ($file.exists() == false ) { //Tu faili ar arsebobs sheqmna
    $file.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 420 );}
    // failis mexsierebashi gadmotana
    var $file_stream = Components.classes[”@mozilla.org/network/file-output-stream;1″].createInstance(Components.interfaces.nsIFileOutputStream );
    $file_stream.init($file, 0×04 | 0×08 | 0×20, 420, 0 );
    // Unikodireba
    $text = utf8($text,”out”);
    $file_stream.write($text,$text.length);

    $result.code = 0;

    // mexsierebis gawmenda
    $file_stream.close();
    //$file.close();

    return $result;
    }
    ,
    utf8 : function($text,$act) {
    // kodirebis gadamyvani mastis sheqmna
    var $converter = Components.classes[”@mozilla.org/intl/scriptableunicodeconverter”].createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
    // UTF-8 kodirebis dayeneba
    $converter.charset = “UTF-8″;

    if ($act == “in”) // gadagvyavs unikodshi
    {$text = $converter.ConvertToUnicode($text);}
    if ($act == “out”) // gadagvyavs unikodidan
    {$text = $converter.ConvertFromUnicode($text);}

    return $text;
    }
    }

  20. Zach Says:

    Thanks Gozala! My I/O script also has Unicode conversion functions. I’ll switch those on for the next version.

  21. inikeKili Says:

    hmm interesting site. I can be ticklish about my privacy profession I have a fresh joke for you) What time is it when the clock strikes 13? Time to get the clock fixed.

Leave a Reply