Problems with VSA IDE -
07-14-2003
, 04:01 PM
Greetings,
We tried logging these issues with Summit Tech Support, but didn't get
satisfactory answers, so I thought I would throw them open, and hopefully
someone out there has come across these before. Any assistance would be much
appreciated.
Thanks in advance.
Nick Gallimore
Senior Software Engineer
Runge Ltd
The application that we are integrating VSA into is a stand-alone
desktop application that uses VSA for extending its capabilities through
customisation scripts. During the integration process we have come
across a number of problems, as outlined below. All of these problems
can be seen using the JimPad 2003 sample that is available on the Summit
website.
A) What action should be taken when the "Stop" notification is
passed into the implementation of IVsaSite.Notify during a debugging
session? If no action is taken, the script will continue to run. That
presumably means the application itself (the design-time host) must stop
the script's execution. How does it do that safely? To duplicate, create
a method that declares a number, assigns a value to it, and prints out
the value in a message box. Place a breakpoint on the assignment line,
and run the method. When the breakpoint is reached, press the stop
button in the IDE. The message box will still appear.
The only solution I have been able to think of is running the script in a
thread, and killing the thread, but I'm not sure if that is a good way of
doing it. Summit actually suggested this as a _possible_ solution, saying it
_might_ work, but that doesn't sound too promising.
B) If a module is created and event objects are added to it, and
then the module is renamed, there is a compile error in the
engine-generated file "_Startup" complaining that a module with the old
name does not exist. I have tried intercepting the "DeclarationChanged"
notification through IVsaSite.Notify to remove and re-add the event
objects, but this notification appears to be sent for every module when
only one module is changed, which makes it problematic to use. The other
problem is that in removing and re-adding the event objects, the
"DeclarationChanged" notification is sent through again, creating a
re-entrancy problem.
On further examination, it appears as if the module (or class) name inside
the script must match the name of the IVsaCodeItem, otherwise it won't work.
Is this correct? Is there any way around this?
C) There appears to be a problem with read-only flags for scripts:
1) Programmatically add a script with the read-only flag of the
IVsaDTCodeItem set to true.
2) Open the script in the IDE. The script is marked as read-only, as it
should be.
3) Close the script (just the file, not the IDE) and reopen it.The script is
no longer marked as read-only, and can be edited. |