Issue 15552 - cannot unassign script to event
Summary: cannot unassign script to event
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: scripting (show other issues)
Version: OOo 1.1 Beta2
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: duncan.foster
QA Contact: issues@framework
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-12 12:14 UTC by robert.kinsella
Modified: 2003-06-16 16:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description robert.kinsella 2003-06-12 12:14:57 UTC
SframeworkInstall ed0.3 rc4 OpenOffice 1.1Beta2 and StarOffice 6.1 (m13s2)
Error has been reprodcued on Solaris and win2000.

Select tools, scripting add on's, assign script to event.
Select location user, langugae java, script - HighLightText.showForm
Choose event to assign to - Document, Save Document As.
Select Assign, OK.

Save the open document as e.g. testfile.The highlight text box is displayed.
Select tools, scripting add on's, assign script to event.

BUG -> the assignment has now disappeared, the user cannot unassign the script
to this event for this document, i.e. the assignment is still functioning but
the user cannot unassign it. Restarting StarOffice / OpenOffice does not fix the
problem.
Comment 1 robert.kinsella 2003-06-12 13:42:54 UTC
chaning priority to P3 as workaround is available. The user can
unassign the script to the event using the standard tools, configure
dialog.
Comment 2 noel.power 2003-06-13 15:35:39 UTC
Assign to duncan to investigate

Note: Had a quick look at this, there is an error handler in the
ReadEventsFromDoc() starbasic ScriptBinding.xba module. The behaviour
in previous releases was that if the doc had no bindings the line
"scriptProps = eventSupplier.getEvents().getByName( allEventTypes( n
).Name )" would fail and no bindings would be populated into the event
list, this is ok. If events were present in the doc each event that
had no binidng would return scriptProps with length ( or more
precisely ubound scriptProps() ) would return -1. 
Now it appears that this call will fail even if the doc has events but
event name supplied to getByName hasn't got a binding. May be
necessary to put "eventSupplier.getEvents().getByName( allEventTypes(
n ).Name )" in a seperate sub or method and return flag to indicate
whether binding exists.
Comment 3 duncan.foster 2003-06-13 16:48:50 UTC
Fixed as per NP suggestion. ie Added separate function handler to
check if ScriptProps is OK.
Comment 4 robert.kinsella 2003-06-16 16:39:34 UTC
verified fixed on:
solaris sparc SO 6.1beta
windows SO 6.1beat
windows OO 1.1beat2

closing issue