Issue 96200

Summary: Unable to Edit Macros with Error in Base Form
Product: App Dev Reporter: dyrcona <jason>
Component: scriptingAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, mechtilde
Version: 3.3.0 or older (OOo)Keywords: needmoreinfo
Target Milestone: ---   
Hardware: Mac   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
A small database I was using for practice.
none
modified version of the first document, with the "Init" method already assigned to the "Open Document" event none

Description dyrcona 2008-11-14 03:54:31 UTC
I added a subroutine called Init to a form in base. I assigned this subroutine
to the When Loading event of the form. The subroutine has an error in it, and I
now cannot edit the macros for the form to fix it. Even when opening the form as
Edit from the context menu, the subroutine is executed and stops on the error.
The form and basic editor both show being a read-only status. I now have to
delete the form and recreate if from scratch if I want it to work.

I will attach the database showing this problem.

I think the fix should be to allow the editing of scripts with errors whenever
the form or document is open for editing.
Comment 1 dyrcona 2008-11-14 03:55:46 UTC
Created attachment 57988 [details]
A small database I was using for practice.
Comment 2 dyrcona 2008-11-14 04:02:20 UTC
Found a workaround simpler than recreating the form:

I removed this database from a Trusted Sources directory and opened it with
macros disabled. This allowed me to edit the macro and fix the error (missing
globalscope. before basiclibraries).

However, I still think this is a problem that deserves some attention.
Comment 3 kay.ramme 2008-11-14 08:10:19 UTC
Frank, please have a look ...
Comment 4 Frank Schönheit 2008-11-14 09:03:24 UTC
Cannot reproduce. I used your database, and added the "Init" method to the "Open
Document" in "Tools / Options / Customize / Events".

Now, opening the form for editing ("Edit" in its context menu) opens it, then
opens the Basic IDE, jumps to the Init method, and displays the error. Both the
Basic IDE and the form are perfectly writable.
Comment 5 Frank Schönheit 2008-11-14 09:04:20 UTC
Created attachment 57992 [details]
modified version of the first document, with the "Init" method already assigned to the "Open Document" event
Comment 6 dyrcona 2008-11-14 13:56:29 UTC
I'll look at your modified version to see what happens on my system, but I was
seeing this with the event in the When Loading of the "Gems" forms. I don't
think I made that as clear as I might have.

It looks like When Loading runs even when editing a form, and I'm not sure that
is desirable behavior.
Comment 7 Mechtilde 2010-07-05 20:21:51 UTC
Please test it in our latest version 3.2.1

there you can save Macros also in the *.odb files