Apache OpenOffice (AOO) Bugzilla – Issue 59592
Basic IDE: pressing F5 or F8 to run the macro where is the cursor
Last modified: 2017-05-20 11:29:55 UTC
Currently if you are in the Basic IDE and press F5 or F8 or the corresponding toolbar buttons you launch th macro on top of the module. This is not handy when you develop, because very often you need to verify the macro that you are writing So it would be better if F5/F8 (and corresponding toolbar buttons) would run the macro where actually is the cursor.
sorry for the P3, my mistake... -- paolo
Andreas, what do you think?
I tend to disagree: Often the subs/functions in a module depend on each other and are no collection of independend functionality. In this case the proposed be- haviour would be confusing and annoying. A Basic programmer editing the sub ConvertData() called by CheckData() called by SetData() called by main surely will not be very enthusiastic if he always has to move the cursor to main to let his program run and back afterwards. So this is only usefull in a special scenario. I prefer the current behaviour as I consider it to be simpler and well-defined. VB behaves not equally (not the first sub is called but always main), but similar and also independent from the cursor position. Besides this the "Run macro..." and "Organise Macros / OOo Basic..." dialogs allow to run the selected sub. I think this is sufficient. -> WONTFIX
VB behaves differently because is an IDE for standalone programs. It makes no sense to launch a single routine in a standalone program. In the other hand VBA behaves exactly as I described: pressing f5 or f8 or the corresponding toolbar buttons launch the macro where the cursor is standing. This is a good behaviour, simply because is very handy and confortable: click the macro and press f5 : very handy! Another thing: almost macros in VBA and StarBasic are written by the macro recorder or by low skilled developers/users so, in effect, almost VBA and StarBasic modules that you can find are simply a collection of independent subroutines, so IMHO it would make sense to have the feature I requested. Finally: Wouldn't be a nice thing to have a flag in the configuration for this? I think that VBA users would really appreciate that, and who disagree can keep the current behaviour
> VB behaves differently because is an IDE for standalone programs. > It makes no sense to launch a single routine in a standalone program. > In the other hand VBA behaves exactly as I described: > This is a good behaviour, simply because is very handy and confortable: You're right, I missed this difference between VB and VBA > click the macro and press f5 : very handy! Depends on what you're working on... :-) > Another thing: > almost macros in VBA and StarBasic are written by the macro recorder or by low > skilled developers/users so, in effect, almost VBA and StarBasic modules that > you can find are simply a collection of independent subroutines, so IMHO it > would make sense to have the feature I requested. I think this strongly depends on the environment. I've just talked to a colleague who works with lots of "real life" MS office documents containing macros and he told me that most of them contain complex programs started from a single entry routine. Concerning recorded macros I don't see your point at all: If a user only _uses_ previously recorded macros why should he open the IDE at all? He can use the "Run macro..." dialog or assign the macros to own toolbar items or buttons on a document. > Finally: > Wouldn't be a nice thing to have a flag in the configuration for this? > I think that VBA users would really appreciate that, and who disagree can keep > the current behaviour Ok, finally: You've got me concerning the behaviour of VBA, but... ;-) nevertheless I don't like this behaviour at all. The colleague I've mentioned above told me that this behaviour of VBA just turns him mad and I would assume the same for me. So yes, a flag to turn this on/off would be nice or to phrase it differently: I'll never build in this without a way to turn it off... :-) -> Reopen
Started, OOo later, -> P4 as I really don't see this as an urgent problem. Even now users can easily access a special sub using "Run macro..." or by assigning it to buttons or toolbar items.
I agree with paolo that this feature is usefull but understand that it is a matter of habbits. Btw, this feature is usefull when developping large sets of modules so that you can write your macro foirst as standalone and then enhance it. Then doing a F5 at the current cursor positon makes sense Moreover, newcommers from VBA world would find some functionality they already know Voting Laurent
Setting back to P3 / OOo 3.x as I found the duplicate i84804 and don't want to change its priority and target indirectly.
*** Issue 84804 has been marked as a duplicate of this issue. ***
Reset assigne to the default "issues@openoffice.apache.org".