Hi Ariel, > Just to add a point: we are talking about the URI to be used by the > scripting framework. > There is also another problem: > what will happen when calling a subroutine/function from within the > odb/forms? > will we be able to call a function located in an embedded form-document > from another embedded form-document (both embedded in the same odb), or > just from form-document to its parent - the DatabaseDocument?
I'd say the latter. I don't really see the need for calling from form A into form B: If you have code needed in both forms, put it into the database document. I think cross-document calling would a) make things a lot more complex, b) make this inconsistent with the other apps (you cannot call from text document A into text document B, can't you) and c) open yet another can of worms by making well-defined concepts such as "ThisComponent" meaningless. > and the other way around: calling from the parent a function within its > child? I tend to say no. Again, if you have a macro which is *not* needed in the form only, the put it into the database, where everybody can use it. Which brings me to another idea I had: Just disallow macros in forms/reports, only allow them in the database. This would solve most of the problems :) > what will be the behavior when calling a macro with the same name > existing in three different places at the time: a module in the > DatabaseDocument, in a form, in the user's library? We have to distinguish here between the actual Basic runtime and the script provider. When you click onto a button which is bound to some script URI, then the script provider comes into play, very much like Andrew described: It is used to resolve the URI, and to invoke the script. When you're inside a running Basic macro, and call some routine "Foo", then AFAIK the script provider is not involved anymore (and be it just because the Basic runtime is much older than, and had to solve this problem long before there were, the scripting framework). So, I'd say the Basic runtime should behave as today with macros in documents: If you call, within a document, a routine which is in both the application and the document Basic, then the latter is found first. For forms, this implies that if you call a routine from within a form, then the versions in a) the form b) the database c) the application Basic are found, in this order. Ciao Frank -- - Frank Schönheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Base http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]