2018-01-07

38: We Begin to List Dispatch Command Specifications

<The previous article in this series | The table of contents of this series |

Main Body START

Here Is a Link to a List (Under Construction) of Dispatch Command Specifications That Can Be Used for Invoking Dispatch Commands

About: UNO (Universal Network Objects)

About: LibreOffice

About: Apache OpenOffice

About: Java Programming Language

About: Java Programming Language

About: LibreOffice Basic Programming Language

Necessity for a List of Dispatch Command Specifications That Can Be Used for Invoking Dispatch Commands

Here are -Hypothesizer and -Rebutter sitting in front of a computer screen in a room on a brook among some mountains on the Bias planet.

-Hypothesizer

As we investigate how to trace the movement of the current cell, a haunting suspicion is "Aren't there some dispatch commands we can use for this purpose?" However, as we can't find any satisfactory list of dispatch command specifications, that suspicion is left haunting us.

-Rebutter

Satisfactory?

-Hypothesizer

Well, there is a list of dispatch commands, but that isn't satisfactory . . . for our purposes.

-Rebutter

Let me see that list?

-Hypothesizer

Here it is.

-Hypothesizer shows the document in a web browser. -Rebutter scans the document.

-Rebutter

'Commands that are accessible through the GUI'?

-Hypothesizer

That seems to imply that commands that can't be accessed through the GUI aren't included, which is a reason of its being unsatisfactory . . . for our purposes: whether a command can be accessed through the GUI or not isn't any our concern.

-Rebutter

The column titles of the list are 'Commands', 'GUI Elements', 'Internal definitions of commands ID', 'Short Description', and 'ID' . . .

Why aren't the first characters of 'definitions' and 'commands' capitalized?

-Hypothesizer

How should I know?

-Rebutter

Does 'Commands' mean URLs?

-Hypothesizer

Actually, the 'Command' prefixed by '.uno:' is the URL.

-Rebutter

There is a dispatch command, 'StatusDocPos', whose 'GUI Elements' is 'S'. What does that mean?

-Hypothesizer

'S' seems to mean the status bar.

-Rebutter

I know that, but how can we invoke the 'StatusDocPos' command from the status bar?

-Hypothesizer

Well, I guess, we can't invoke that command from the status bar, but the result of an internal invocation of the command is displayed on the status bar.

-Rebutter

I wouldn't say that such a command is "accessible through the GUI", but that results of such a command is accessible.

-Hypothesizer

Whatever.

-Rebutter

And how are 'Internal definitions of commands ID' and 'ID' different?

-Hypothesizer

I guess, what they mean is this, for example.

@C++ Source Code
#define SID_AVMEDIA_PLAYER 6694

-Rebutter

So, does 'ID' also mean 'commands ID'?

-Hypothesizer

That's my guess.

-Rebutter

I wondered, "ID? ID of what?"

-Hypothesizer

I guess, the writer thought, "As I said it 'commands ID' once, I will be allowed to leave the qualification, 'commands', out hereafter."

-Rebutter

I thought, "As one is called 'commands ID' and the other is called just 'ID', the two must be different things."

-Hypothesizer

Well, I understand that misunderstandings happen that way.

-Rebutter

And 'Short Description'? Aren't these short descriptions too short?

-Hypothesizer

Well . . .

-Rebutter

For example, 'Absolute Record'? What is an absolute record? What does the command do with an absolute record?

-Hypothesizer

Well, that list is really an internal document, which isn't supposed to be understood by general users.

-Rebutter

Not knowing what are absolute records may be just our insufficiency of knowledge, but I wonder, how do internal people know what does the command do with an absolute record . . .

-Hypothesizer

Probably, that's obvious for internal people who share a certain mindset.

Anyway, that list is written in a secret language for internal people, which is another reason why that list is unsatisfactory . . . for our purposes, and as there is no explanation of command arguments, we can't call commands based on that list, which is the biggest reason why that list is unsatisfactory . . . for our purposes.

-Rebutter

And isn't that list old?

-Hypothesizer

Judging from the title of the document, it's old, which is another reason why that list is unsatisfactory . . . for our purposes.

-Rebutter

Does the nonexistence of any list that is indispensable for calling dispatch commands imply that we aren't supposed to call dispatch commands?

-Hypothesizer

I wonder. We might be supposed to know specifications of dispatch commands by reading source files.

Anyway, As we try to use some functionality of LibreOffice from our programs, we have to know specifications of dispatch commands: as we discussed before, we can access only part of the functionality of LibreOffice in the way we have mostly relied on (getting references to UNO objects and calling methods of those UNO objects). The dispatch mechanism is the other way of accessing the functionality of LibreOffice.

-Rebutter

We can use the 'macro recording' feature to know some information of some dispatch commands, can't we?

-Hypothesizer

Some . . . yes. However, that feature isn't particularly perfect.

-Rebutter

How 'not particularly perfect' is it?

-Hypothesizer

It does not record every possible command, not record every possible command argument, or not explain command arguments.

-Rebutter

Ah, the last part is undeniable.

-Hypothesizer

We want to know what each command argument means and what are options for each command argument, but we can't do that by a single macro recording.

-Rebutter

Can we do that by multiple recordings?

-Hypothesizer

In some cases, we would be able to do that by recording all of the possible argument patterns, but maybe, the GUI doesn't represent all the possibilities. And if we would be able to do that, that would be a tedious task.

-Rebutter

And you say, not every command or command argument is recordable?

-Hypothesizer

Yes, I say so, based on some tries. It seems that arguments that can't be prepared easily or commands that require such arguments won't be recorded.

-Rebutter

Ah, an argument may not be a string or a number, but a UNO object that can't be gotten easily.

-Hypothesizer

An example is the certificate argument of the command that exports the specified document as a PDF file.

We Begin to List Dispatch Command Specifications

The same with the previous scene.

-Hypothesizer

So, we need a list of dispatch command specifications, and we will have to list them ourselves.

-Rebutter

You say "we will have to", but there are very many commands, according to that list. Are we going to list all the commands?

-Hypothesizer scans that list.

-Hypothesizer

. . . As we are dealing with only Calc right now, first we will concentrate on commands that can be invoked on Calc.

-Rebutter

All commands for Calc?

-Hypothesizer scans that list, again.

-Hypothesizer

. . . Honestly speaking, there are many commands that we will never be interested in. In fact, we aren't interested in commands that do what we can do by handling UNO objects.

-Rebutter

For example?

-Hypothesizer

For example, . . . 'Add'.

-Rebutter

What a vague name is that? Add what?

-Hypothesizer

The 'Short Description' says, "Append Sheet", which I understand as "This command appends a spread sheet."

-Rebutter

So, we aren't interested in that command because we can append spread sheets by handling UNO objects?

-Hypothesizer

Exactly. We might list also such commands in the future, but their priorities are low.

So, we don't declare that we are going to list all the commands, but will pick up commands that interest us, one by one.

-Rebutter

Will we pick them up based on the very 'Short Description's of that list?

-Hypothesizer

Actually, we won't rely much on that list. That list is old and only includes commands that are accessible through the GUI. We will have to pick up URLs from a source file. As we have to wildly infer what those commands do, some commands picked up that way may turn out to be useless for our purposes.

-Rebutter

What will be our first command?

-Hypothesizer

Let's begin with a command we already know: '.uno:GoToCell'.

-Rebutter

Where will be our list?

-Hypothesizer

Here. From each command in the list, we can go to the command specifications page, which explains command arguments and the return.

Main Body END

References

  • Apache OpenOffice Wiki. (2010/12/13). Framework. Retrieved from https://wiki.openoffice.org/wiki/Framework

<The previous article in this series | The table of contents of this series |