Ask Your Question
0

enable code completion (basic)

asked 2015-08-06 20:14:34 +0200

michalprog gravatar image

updated 2015-08-23 11:18:08 +0200

Alex Kemp gravatar image

LibreOffice 4.4.3.2 pl_PL, Calc

Hello, I'm trying to enable the code completion in BASIC code editor embded in Calc. I found that option in: Tools -> Options (maybe Settings) -> LibreOffice -> BASIC IDE options.

There is such an option, but I cannot check it, because it is grayed. How can I enable the code completion?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2015-08-07 16:45:20 +0200

Alex Kemp gravatar image

updated 2015-08-07 16:48:46 +0200

  1. Go (menu):ToolsOptionsAdvanced
    (place a tick in Enable experimental features + press OK)
  2. Go (menu):ToolsOptionsBASIC IDE Options
    (all options are now available for selection)

"BASIC IDE options" were introduced in 4.2. The current Fresh release is 5.0.0.5. The procedure to make them available is the same now as then: enable "Enable experimental features". They were marked under Advanced as '(unstable)' in 4.2 & are so-marked in 5.0. Use at your own risk, it seems.

If this helps then please tick the answer (✔).

edit flag offensive delete link more

Comments

Thank you very much!

michalprog gravatar imagemichalprog ( 2015-08-08 09:39:08 +0200 )edit
1

answered 2015-08-07 13:13:21 +0200

peterwt gravatar image

updated 2017-01-13 11:28:33 +0200

Using LO 4.4.1.2 on Windows 8.
I noticed that all the options in Basic IDE Options are greyed out. I found that by going to Advanced Options and enabling the option Enable experimental features the options in Basic IDE Options become available.
I am concerned however it states that these are experimental features marked as being unstable. Has anyone any experience of allowing this feature?

EDITED 13/01/2017

@EasyTrieve I set all the options on for the Basic IDE Options and had some success. All the options other than Enable code completion work. There appears to be no code completion. Looking at Help it says -

"Code Completion

This feature helps the Basic programmer to complete the code, saves extensive typing and helps to reduce coding errors. Enable code completion

Display methods of a Basic object. Code completion will display the methods of a Basic object, provided the object is a UNO extended type. Its does not work on a generic Object or Variant Basic types.

When a variable is a UNO interface or structure, a list box appears when pressing the dot after a variable's name (like aVar. [list box appears] ). Its methods and variables are listed in the list box, displayed just below. You can navigate between the suggested methods and variables with the arrow keys. To insert the selected entry, press the Enter key or double click on it with the mouse. To cancel the list box, press the Esc key.

When typing the method's name, and pressing the Tab key once, it will complete the selected entry, pressing the Tab key again will cycle through the matches with the longest prefix. For example, when aVar.aMeth is typed, it will cycle through aMeth1, aMethod2, aMethod3 entries, and other entries are not hidden.

Example:

Dim aPicker As com.sun.star.ui.dialogs.XFilePicker

is a valid variable definition, its methods can be accessed via the dot (".") operator:

aPicker.getDisplayDirectory()"

The sample code shown here does work. As it says in Help it only applies to Methods and to objects of a UNO extended type and does not work on a generic Object or Variant Basic type so I guess that it is working as specified.

edit flag offensive delete link more

Comments

@peterwt, Did you ever get this to work? I tried to enable it in 5.2.3.3 on linux with: Tools | Options | LibreOffice | Advanced | check Enable experimental features | Ok, followed a reboot, then Tools | Options | LibreOffice | Basic IDE Options | check Enable code completion | Ok, but I can't see any changes in the basic IDE editor.

EasyTrieve gravatar imageEasyTrieve ( 2017-01-09 04:21:06 +0200 )edit

@EasyTrieve I have edited my original posting as it is too long for a comment.

peterwt gravatar imagepeterwt ( 2017-01-13 11:30:00 +0200 )edit

It seems this feature is strictly limited to Interfaces and Structs That's poor… :-(

karolus gravatar imagekarolus ( 2017-01-13 16:42:03 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-08-06 20:14:34 +0200

Seen: 3,870 times

Last updated: Jan 13 '17