How to attach text viewer to "Open (Read-Only)" action in li

J

Jan Hovius

Guest
Hello,

I've succesfully registered a new viewType within the dfII environment
using deRegApp i.c.w. entries in the data.reg file and all works
correct upon creating a new view and opening it within the library
manager. Only problem is: there is no difference in behaviour between
the library manager actions "Open" and "Open (Read-Only)", no matter
which of these I select they both open the view in edit mode within the
external application I registered. Since the resultfile is text-based
(HDL code) I would like to differentiate between opening in edit mode
("Open") and read-only mode ("Open (Read-Only)") such that in case of
the latter it opens the text viewer (the same one as used for verilog
views per default). Is this possible at all and if so what is the clue?

Thanks for your help,

Jan.
 
On 23 Nov 2005 01:41:17 -0800, "Jan Hovius" <Jan.Hovius@nsc.com> wrote:

Hello,

I've succesfully registered a new viewType within the dfII environment
using deRegApp i.c.w. entries in the data.reg file and all works
correct upon creating a new view and opening it within the library
manager. Only problem is: there is no difference in behaviour between
the library manager actions "Open" and "Open (Read-Only)", no matter
which of these I select they both open the view in edit mode within the
external application I registered. Since the resultfile is text-based
(HDL code) I would like to differentiate between opening in edit mode
("Open") and read-only mode ("Open (Read-Only)") such that in case of
the latter it opens the text viewer (the same one as used for verilog
views per default). Is this possible at all and if so what is the clue?

Thanks for your help,

Jan.
Hi Jan,

My apologies for not replying to the email you sent me about this.

The triggers that get called when the application is opened (for example,
the dataTrigger) get passed a disembodied property list with a slot called
accessMode. So for example, you can do:

procedure(myDataTrigger(args)
case(args->accessMode
(("a" "w")
... do the editable thing ...
)
("r"
... do the readonly thing...
)
(t
... something bad happened ...
)
) ; case
) ;procedure

Something like that.

Hope this helps!

Regards,

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top