Re: Adding own Event Handlers

Christian Stocker <[email protected]> Tue, 16 Nov 2004 15:33:11 -0800
Newsgroups gmane.editors.bitflux.devel
Message-ID <[email protected]>

On 15.11.2004 22:20 Uhr, Patrick Kollitsch wrote:
> hi,
> 
>> I added it. mode="append" doesn't work yet, but I'm not sure, if we 
>> need that at all. Maybe I'll add it, maybe not ;)
>>
>> Here's the syntax in config.xml
>>
>> <events>
>>     <event name="Exit">__exit</event>
>> </events>
>>
>> would call the function __exit instead of the built in default event.
>>
>> It's called in xml_config, where every js file defined in config.xml 
>> should have been loaded already
>>
>> It's only in the trunk and I won't backport it to 1.0
> 
> 
> we switched to trunk. it works but only for the predefined events. I 
> have implemented some events for buttons which insert predefined 
> contents (templates). it would be good to have them loaded through this 
> too.

It works for me with my own events

<events>
	<event name="myown">__myown</event>
</events>
<buttons>
        <button name="b" col="1" row="1" action="myown"/>
  </buttons>

did call the __myown function.

But your other approach with overwriting the function is also a 
possibility. It's an actual feature of javascript.

chregu

> 
> greetings
> patrick

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  [email protected]  |  gnupg-keyid 0x5CE1DECB
-- 
bx-editor-dev mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev