cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding new toolbar/buttons to Epic Editor 5.1

Level 1

Adding new toolbar/buttons to Epic Editor 5.1

Adepters,

Documentation clearly state: "You can not add new toolbar buttons to the
toolbar."

I find this to be unbelievable! Can anyone verify this?

Aloha.
Tags (2)
10 REPLIES
Level 1

Re: Adding new toolbar/buttons to Epic Editor 5.1


I remember reading that, too. I assume they mean you can't add new
buttons to any of the toolbars Arbortext provides (anyone confirm
that?). You can, however, add your own toolbar defined in XUI and loaded
using either the AOM method Window.loadComponentFile or an ACL function
that I can't remember right now. The documentation (to me) is a
little lacking in this area, but there is some good info on the Adepters
archive if you search for 'toolbar'.

>
> From: "Song, Myong S. \(Gerald\)" <songmyos@jicpac.pacom.mil>
> Date: Wed, 19 Jan 2005 14:15:40 -1000
> Subject: Adding new toolbar/buttons to Epic Editor 5.1
>
> Adepters,
>
> Documentation clearly state: "You can not add new toolbar buttons to the
> toolbar."
>
> I find this to be unbelievable! Can anyone verify this?
>
> Aloha.
>
>
Level 1

Re: Adding new toolbar/buttons to Epic Editor 5.1

Brain, Thanks! Should've checked the archives first.

-Gerald.
Level 1

Re: Adding new toolbar/buttons to Epic Editor 5.1

Adeptors,

I've created a XUI Toolbar file and was able to use the
window_load_component_file ACL command or in our .NET customization a
call to the Epic.ActiveWindow.LoadComponentFile method. Unfortunately, I
can't seem to load an image or place a label on the toolbar button. Any
ideas? This is getting very frustrating....

(We're running Epic 5.1 on Windows.)

Here's the XUI File:





<window dock="top" enabledocking="topleft" resize="none"><imagegroup<br/>id="test1">

<image id="test2" path="c:\test.bmp"/"></imagegroup>

<toolbargroup>

<toolbar id="test">

<button backgroundcolor="gray4" command="response("test")" <br="/>image="test2">

</button>

</toolbar>

</toolbargroup>

</window>
Level 1

Re: Adding new toolbar/buttons to Epic Editor 5.1

Is the image of the right dimensions? I think it needs to be 16 x 16
bits or else you need to use an imagegroup where you can have images
stuck together in one bitmap.

John Dreystadt
Director of Product Management
Arbortext

Level 1

Re: Adding new toolbar/buttons to Epic Editor 5.1

John, I change the path attribute of the button element to single quotes
(from path = "c:\test.bmp" to path = 'c:\test.bmp') and the image
displayed. Thanks.

-Gerald.
Level 1

Re: Adding new toolbar/buttons to Epic Editor 5.1

Anyone here have a workaround to this problem?:

1) User opens a new document. ACL code creates custom toolbar on the
active window.
2) doc_add_callback function specifying the callback 'destroy' is
instantiated.
3) User closes the document. The callback routine is called to hide the
toolbar, but the first parameter; current_window() returns -1 when it
attempts to hide the toolbar using the dlgitem_withraw call. Epic
complains that the window specified does not exist.

I'm trying to clean up any custom toolbar buttons when the user closes
the document.

-Gerald.
Level 1

Re: Adding new toolbar/buttons to Epic Editor 5.1

I assume (in other words, I'm guessing) that your problem is caused by
the window already being gone by the time your callback function is
executed. I was able to accomplish this in Java using a DocumentUnload
event listener rather than the doc_add_callback. The documentation for
the DocumentUnload event in the programmer's guide states:
"The DocumentUnload event occurs when a document is unloaded from a
window frame. There is no ACL callback equivalent for this event."
Inside of my event handler code is (among other things) a call to
Acl.eval("dlgitem_withdraw()")
I left out the parameters to dlgitem_withdraw just to make it easier to
read here.

>
> From: "Song, Myong S. \(Gerald\)" <songmyos@jicpac.pacom.mil>
Level 1

Re: Adding new toolbar/buttons to Epic Editor 5.1

Brian,

Your guess is correct. I'll try the DocumentUnload event Monday. Thanks for the input.

-Gerald.
Level 1

Re: Adding new toolbar/buttons to Epic Editor 5.1

Adepters,

What am I doing wrong here? I've implemented the IDOMEventListener
interface with my handleEvent method. "Registered" my events with the
AddEventListener method of the events I'd like to capture. The Window
events seem to work. MenuSelected works fine. But I can't capture any of
the Document events such as DocumentUnload, DocumentCreated,
DocumentClosed, etc? What am I missing?

-Gerald.