Description: It looks to me like the argument list aspect of the property setter is being ignored yielding unexpected results. I have this class (CTest) with an array member that I want to set using an indexed property let statement [code] option Compatible option ClassModule option Explicit private _n() as integer private sub class_initialize() redim _n(1 to 10) end sub public property let item(byval index as integer, byval value as integer) _n(index) = value end property [/code] This is the code I am using to set the value: [code] sub m() dim n as ctest set n = new ctest n.item(1) = 12 end sub [/code] I get this error: BASIC runtime error. Object variable not set. LibreOffice 7.1.5.2 on Windows 8 Steps to Reproduce: 1. Create a class 2. Add a property setter (Property Let) 3. Give the property let more than 1 parameter 4. Try to access all the property parameters Actual Results: All parameters are ignored except the value being assigned the class member Expected Results: Parameters should be accessible within the property let procedure Reproducible: Always User Profile Reset: No Additional Info: Version: 7.2.3.2 (x64) / LibreOffice Community Build ID: d166454616c1632304285822f9c83ce2e660fd92 CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win Locale: en-US (en_US); UI: en-US Calc: threaded
I tried to reproduce this, but got BASIC syntax error. Option not allowed within a procedure. Can you please attach an example file with the macro, so we can quickly test? Set to NEEDINFO. Change back to UNCONFIRMED after you have provided the document.
Well its been almost a year since I reported this. I tried tonight to remember how to get code running in Libre and I was not successful. The interface is abysmally unintuitive and after multiple crashes and restarts I could not get the code to recognize the class therefore I cannot reproduce the error for you in a project. All I can suggest is that the version of Libre you are using may have corrected the flaw. I do remember posting this bug to a forum and that can be found here: https://ask.libreoffice.org/t/possible-bug-in-basic-class-setter-implementation/71185 Maybe there is something there that can help.
[Automated Action] NeedInfo-To-Unconfirmed