I have been trying to create "dynamic gentext" for a simple DTD
we have. Since the DTD (and FOSI) is simple, there is no noticeable
overhead associated with regenerating gentext continuosly.
However, I have now run out of ideas. My initial approach was to
use the insert_tag hook, which allowed me to regenerate whenever
a tag was inserted. I then went on to use the cut and paste
hooks, but discovered they are not triggered when removing tags
with backspace, but I can live with that.
What has me completely at a loss is to find out if the attribytes
of a tag has been modified. The modify_tag hook is useless in
this case since it is called _before_ the modify attribute
panel shows up, so at that time I do not know what the value will be.
What would be elegant would be to have just two callbacks, one
called whenever a tag is inserted or deleted (after the event),
and one whenever a tag is modified (once again, after the event).
I considered remapping modify_tag, I seem to remember that there is
a way of accessing the buitin commands even when there is an
alias of the same name, but I can't find anything in the documentation.
Something like this would solve the problem (I think):
alias modify_tag {
builtin modify_tag
set gentext = on
}
Is there a simpler solution that I have overlooked or is this as hard
as it seems ? Has anybody been doing something similar ?
Per-ÃÂ
ke Ling
--
Per-ÃÂ
ke Ling (note: Per-Åke, transliteration Per-Ake)
email: Per-Ake.Ling@uab.ericsson.se phone: +46 8 727 5674
Ericsson Utvecklings AB mobile: +46 70 790 2446
AXE Research and Development fax: +46 8 727 3463
we have. Since the DTD (and FOSI) is simple, there is no noticeable
overhead associated with regenerating gentext continuosly.
However, I have now run out of ideas. My initial approach was to
use the insert_tag hook, which allowed me to regenerate whenever
a tag was inserted. I then went on to use the cut and paste
hooks, but discovered they are not triggered when removing tags
with backspace, but I can live with that.
What has me completely at a loss is to find out if the attribytes
of a tag has been modified. The modify_tag hook is useless in
this case since it is called _before_ the modify attribute
panel shows up, so at that time I do not know what the value will be.
What would be elegant would be to have just two callbacks, one
called whenever a tag is inserted or deleted (after the event),
and one whenever a tag is modified (once again, after the event).
I considered remapping modify_tag, I seem to remember that there is
a way of accessing the buitin commands even when there is an
alias of the same name, but I can't find anything in the documentation.
Something like this would solve the problem (I think):
alias modify_tag {
builtin modify_tag
set gentext = on
}
Is there a simpler solution that I have overlooked or is this as hard
as it seems ? Has anybody been doing something similar ?
Per-ÃÂ
ke Ling
--
Per-ÃÂ
ke Ling (note: Per-Åke, transliteration Per-Ake)
email: Per-Ake.Ling@uab.ericsson.se phone: +46 8 727 5674
Ericsson Utvecklings AB mobile: +46 70 790 2446
AXE Research and Development fax: +46 8 727 3463