Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7691673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:40:44+00:00 2026-05-31T20:40:44+00:00

I’m playing with the thunderbird codebase, the aim being to implement inline contact editing.

  • 0

I’m playing with the thunderbird codebase, the aim being to implement inline contact editing. The current code catches the Click event on a XUL tree, and if it’s a double click (events.detail == 2), it open the profile editor. I modified it so as to start editing the current treeCell, and I did add editable=true to the corresponding XUL document. The updated code reads

var orow = {}, ocolumn = {}, opart = {};
gAbResultsTree.treeBoxObject.getCellAt(event.clientX, event.clientY,
                                       orow, ocolumn, opart);

var row = orow.value, column = ocolumn.value.index;         
if (row == -1) 
  return;

if (event.detail == 2)
  gAbResultsTree.startEditing(row, column);

Unfortunately, when the code reaches the startEditing part, it returns

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsITreeView.isEditable]" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: chrome://global/content/bindings/tree.xml :: startEditing :: line 337" data: no]

I’m pretty much lost here. Could someone with more XUL experience help?
Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:40:45+00:00Added an answer on May 31, 2026 at 8:40 pm

    I was trying to do something similar and I have same problem.

    Wrapper with original abview set as __proto__ with functions overriden works fine until it is set as abResultsTree’s view.

    I’ve finally found (I hope) an elegant solution.

    function MyAbView() {
        this.originalAbViewInstance = this.originalAbViewFactory.createInstance(null, Ci.nsIAbView);
    
        if (!this.proxiesGenerated) {
            // find out which interfaces are implemented by original instance, their property proxies will be generated later
            for (var ifName in Ci) {
                if (Ci[ifName] instanceof Ci.nsIJSID && this.originalAbViewInstance instanceof Ci[ifName]) {
                    MyAbView.prototype.supportedInterfaces.push(Ci[ifName]);
                }
            }
    
            function generatePropertyProxy(name) {
                Object.defineProperty(MyAbView.prototype, name, {
                    get: function() {
                        return this.originalAbViewInstance[name];
                    },
                    set: function(val) {
                        this.originalAbViewInstance[name] = val;
                    },
                    enumerable: true
                });
            }
    
            for (var prop in this.originalAbViewInstance) {
                if (this[prop] == undefined) {
                    generatePropertyProxy(prop);
                }
            }
    
            MyAbView.prototype.proxiesGenerated = true;
        } else {
            for each (var interface in this.supportedInterfaces) {
                this.originalAbViewInstance.QueryInterface(interface);
            }
        }
    }
    
    MyAbView.prototype = {
        classID: null,
    
        _xpcom_factory: {
            createInstance: function(outer, iid) {
                return new MyAbView().QueryInterface(iid);
            }
        },
    
        QueryInterface: function(aIID) {
            for each (var interface in this.supportedInterfaces) {
                if (interface.equals(aIID)) {
                    return this;
                }
            }
    
            throw Components.results.NS_ERROR_NO_INTERFACE;
        },
    
        originalAbViewFactory: null,
        originalAbViewInstance: null,
    
        proxiesGenerated: false,
        supportedInterfaces: [],
    
        // any overriden functions come here
    };
    

    It’s implemented as a component to replace the original abview, but it might be modified to just create a wrapper.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.