Bug 146069 - Property Let multiple arguments ignored
Summary: Property Let multiple arguments ignored
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.2.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-06 00:03 UTC by Leslie
Modified: 2022-11-26 03:42 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leslie 2021-12-06 00:03:39 UTC
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
Comment 1 Buovjaga 2022-11-25 13:09:41 UTC
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.
Comment 2 Leslie 2022-11-26 02:16:41 UTC
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.
Comment 3 QA Administrators 2022-11-26 03:42:55 UTC Comment hidden (obsolete)