jjb,

our mails have crossed...

what i need is this :

- get which attribute has been clicked (or on which attribute the contextmenu 
was triggered)
- find the attribute name AND the original node it belongs to to calculate its 
xpath address (i can not rely on selection, since you can click on an attribute 
without selecting a node)

- i've tried with onBeginEditing listener but it does not help, since i can not 
find the original node.
- i've tried to add an item to the context menu with a listener (inspired from 
CodeBruner) and it worked... until i realized i also lost the original node

I don't know if there is a solution really, since even a monkey patch on 
getContextMenuItems would give me the node but not the attribute (if i'm not 
mistaken)



Greg

Le 19 mars 2010 à 18:00, John J Barton a écrit :

> 
> 
> On Mar 19, 6:59 am, Duchesnes Grégory - Ilomedia
> <[email protected]> wrote:
>> I'm feeling stupid sometimes, i guess it was to obvious :
>> 
>> Firebug.Editor.addListener(this);
> 
> Firebug.Editor supports three events:
> onBeginEditing(panel, editor, target, value)
> onStopEditing(panel, editor, target)
> onSaveEditing(panel editor, target, value, previousValue),
> 
> jjb
> 
>> 
>> Le 19 mars 2010 à 14:44, Duchesnes Grégory - Ilomedia a écrit :
>> 
>>> Hi all,
>> 
>>> follow up of my previous post, i'm now trying to use event listeners.
>> 
>>> Here is what i need :
>>> when someone clicks on an attribute in the HTML panel i need to send a 
>>> message to my own panel saying "hey an attribute has been clicked in HTML 
>>> panel".
>> 
>>> i've spotted somme event listeners in editor.js, html.js and a11y.js but 
>>> i'm not sure how to use them (i'm no javascript guru in fact). Is there an 
>>> example on how to instantiate a listener in my panel?
>>> Should i instantiate it in my prototype or in my model?
>> 
>>> i've tried this for example, but it does not seem to work :(
>> 
>>>    var htmlPanelNode = this.context.getPanel('html').panelNode;
>>>    htmlPanelNode.addEventListener("click", this.onHtmlClick, false);
>> 
>>> thanks for the help,
>> 
>>> Gregory
>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Firebug" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to 
>>> [email protected].
>>> For more options, visit this group 
>>> athttp://groups.google.com/group/firebug?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Firebug" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/firebug?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en.

Reply via email to