Issue 107070

Summary: direct singleton support in Basic
Product: App Dev Reporter: jsc
Component: apiAssignee: joerg.skottke
Status: CLOSED FIXED QA Contact: issues@api <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Test macro none

Description jsc 2009-11-20 07:47:36 UTC
With OOo 3.2 we have made the concept of service constructors available in
Basic. That means it is possible to use the contractor methods directly.

The requested feature is to provide a similar shortcut for singletons as well.
In C++ or Java the user can use the generated "get" function with a component
context directly. We should provide this shortcut for singletons as well. The
context should be optional for potential later use. Currently only the default
context is used.     

This would simplify the access to singletons a lot because today the user have
to use something like this

oContext = ....
oA = oContext.getValueByName("/singletons/my.own.special.TestSingleton")

easier would be

oA = my.own.special.TestSingleton.get() 
or
oA = my.own.special.TestSingleton.get(oContext) 

This feature should be available for well defined singletons only who have an
IDL type definition (and are well documented)
Comment 1 ab 2009-12-18 07:50:54 UTC
STARTED, -> ab76
Comment 2 ab 2010-02-19 13:27:03 UTC
Created attachment 67914 [details]
Test macro
Comment 3 ab 2010-02-19 13:30:14 UTC
FIXED
Comment 4 ab 2010-02-19 13:31:42 UTC
ab->jsk: Please verify
Comment 5 joerg.skottke 2010-03-05 11:38:05 UTC
Test has been added to f_basic_issues.bas