Issue 96200 - Unable to Edit Macros with Error in Base Form
Summary: Unable to Edit Macros with Error in Base Form
Status: CONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: Mac All
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needmoreinfo
Depends on:
Blocks:
 
Reported: 2008-11-14 03:54 UTC by dyrcona
Modified: 2013-02-24 21:00 UTC (History)
2 users (show)

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


Attachments
A small database I was using for practice. (34.99 KB, application/vnd.sun.xml.base)
2008-11-14 03:55 UTC, dyrcona
no flags Details
modified version of the first document, with the "Init" method already assigned to the "Open Document" event (35.00 KB, application/vnd.sun.xml.base)
2008-11-14 09:04 UTC, Frank Schönheit
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
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