[Libreoffice-bugs] [Bug 59327] BASIC: A missing optional argument is treated as a not declared variable.

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Apr 30 02:23:54 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=59327

--- Comment #13 from Rowland <RowlandHolden7 at gmail.com> ---
Is this bug still being worked on? I just ran into this bug like a race car
doing 150 MPH and hitting the wall. What I got is a macro that will open a form
based on the event sent by the button. But being a good programmer I also call
it from other methods using just a form name, therefore both arguments, the
event param and the form name string are both optional. The issue I have is
when I call it to open a form by a name string in stead of an event object I am
getting an "Object Variable not set" error. I understand this is due to this
bug as it is not marking the first argument as missing.

This may not be a bug either, I was supprised that all arguments can be
optional, most other languages require at least the first argument to be
required. 

At any rate if it is a bug I would love to see it fixed because I hate
redundant code. lol

Thanks in advance.

Here is my method declaration.

Sub OpenForm(Optional oEvent as object, Optional sFormName as string)

The idea is that it will open a form based on the event that a button click
would pass in, or by a name passed directly to it from some other method.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190430/b08ee14d/attachment.html>


More information about the Libreoffice-bugs mailing list