I have a spreadsheet that I've constructed by hand, making it more and more functional and complex over time. I'm now trying to write Basic macros to build it from scratch.
I was trying to do a particular job and it occurred to me that it would be much easier if I could create an object which inherited the XNameAccess interface so I could use hasByName and getByName methods on it (I was actually on the point of writing my own module to implement what I needed). I've done a lot of googling, I've searched Andrew Pitonyak's book, I have the Xray tool installed ... I can't find what I need.
The best I have come up with so far is to create an array of com.sun.star.beans.PropertyValue objects and assign that array to the value property of a parent PropertyValue object. Then I can write some functions to implement similar methods to hasByName etc. This all seems horrendous!
I've worked with objects in Perl and JavaScript before and they're pretty nice to work with because both languages have first-class functions and a flexible object model. As far as I'm aware, OO Basic lacks both first class functions and the facility for user-created classes/objects. Does OO JS retain these features of other JS implementations?
Thanks in advance for any and all suggestions

Rich