Issue 107070 - direct singleton support in Basic
Summary: direct singleton support in Basic
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: joerg.skottke
QA Contact: issues@api
Depends on:
Reported: 2009-11-20 07:47 UTC by jsc
Modified: 2017-05-20 09:32 UTC (History)
1 user (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---

Test macro (517 bytes, text/plain)
2010-02-19 13:27 UTC, ab
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
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() 
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
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