Issue 59592 - Basic IDE: pressing F5 or F8 to run the macro where is the cursor
Summary: Basic IDE: pressing F5 or F8 to run the macro where is the cursor
Status: ACCEPTED
Alias: None
Product: udk
Classification: Code
Component: code (show other issues)
Version: OOo 2.0
Hardware: All All
: P3 Trivial with 1 vote (vote)
Target Milestone: 4.x
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
: 84804 (view as issue list)
Depends on:
Blocks:
 
Reported: 2005-12-20 13:04 UTC by paolomantovani
Modified: 2017-05-20 11:29 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description paolomantovani 2005-12-20 13:04:38 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.
Comment 1 paolomantovani 2005-12-20 13:10:14 UTC
sorry for the P3, my mistake... 
-- paolo 
Comment 2 kay.ramme 2006-01-02 08:39:02 UTC
Andreas, what do you think?
Comment 3 ab 2006-03-20 16:22:08 UTC
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
Comment 4 paolomantovani 2006-03-20 18:32:22 UTC
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  
 
Comment 5 ab 2006-03-21 09:18:52 UTC
> 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

Comment 6 ab 2006-03-21 09:26:00 UTC
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.
Comment 7 maison.godard 2006-03-21 09:30:54 UTC
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
Comment 8 ab 2009-02-25 16:31:05 UTC
Setting back to P3 / OOo 3.x as I found the duplicate i84804
and don't want to change its priority and target indirectly.
Comment 9 ab 2009-02-25 16:32:29 UTC
*** Issue 84804 has been marked as a duplicate of this issue. ***
Comment 10 Marcus 2017-05-20 11:29:55 UTC
Reset assigne to the default "issues@openoffice.apache.org".