Hi,
when running this macro:
<BASIC>
global doc as object
sub LockerCheck
dim args(1) as new com.sun.star.beans.PropertyValue
doc = ThisComponent
args(0).Name = "xInstance"
args(0).Value = doc
args(1).Name = "nActions"
args(1).Value = 1 'com.sun.star.embed.PREVENT_CLOSE
psm = GetProcessServiceManager()
lck =
psm.createInstanceWithArguments("com.sun.star.embed.InstanceLocker", args())
if NOT IsNull(lck) then lck.dispose()
end sub
</BASIC>
the answer is not 42 but a messagebox saying:
css.lang.IllegalArgumentException
Nonempty reference is expected as the first argument!
In parallel to the IDE there is only one writer doc opened for filling
"ThisComponent" with something useful.
What's going wrong here?
TIA,
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]