Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OpenText Builder - Unlock ospace

Status
Not open for further replies.

LivelinkHELP

Programmer
Aug 29, 2012
10
GB
Hi,

Just starting to try and understand the basics of OScript.

I was just trying to work through the standard tutorial for OpenText Builder (on our development server) to create an Addressbook. After installing the module I started the section 'Setting Up New Node Types' yet whenever I try and unlock my ADDRESSBOOK ospace, the Debugger starts and I receive the error 'A Wrong argument type was specified' in the function 'LockUnlockOSpace()' and I can no longer proceed, do I require a patch for this? or am I doing something wrong?


Any help on this greatly appreciated.

Many thanks
 
Here's the Script of the LockUnlockOSpace() function, when trying to unlock the ADDRESSBOOK ospace I get the error 'A wrong argument type was specified' on the 'if OS.IsFeature( OS.Root( spec ), "Startup" && ' line. the spec string points to the module on the drive i.e. "C:\\OPENTEXT\\module\\addressbook_9_1_0\\opspace\\addressbook.oll' any ideas?


function Void LockUnlockOSpace()

Boolean lockVal
Dynamic x
List data
String s

Boolean thisOSpace = False
Dynamic obj = .fObject


if $OSpaceTools.IsOSpace( obj )
obj = OS.Root( obj )
end

if OS.IsObject( obj )
data = OS.MapInfo( obj )

if data[ 3 ]
s = 'Lock'
lockVal = True
else
s = 'Unlock'
lockVal = False
end

if $DialogUtils.Confirm( Str.Format( '%1 OSpace %2?', s, Str.Upper( data[ 1 ] ) ) )
for x in Vis.gProgram().pWindows
if OS.IsObject( x.pContext ) && Str.CmpI( OS.Filename( x.pContext ), data[ 1 ] ) == 0
if x.pContext != this
Vis.Delete( x )
else
thisOSpace = True
end
end
end

string spec = OS.FileSpec( obj )

if thisOSpace
Vis.Delete( .window )
end

OS.CloseOSpace( spec )
OS.OpenOSpace( spec, True, lockVal )

// Run startup if it is there...
if OS.IsFeature( OS.Root( spec ), "Startup" ) && \ // XDBs have no startup feature
( Type( OS.Root( spec ).Startup ) == ScriptType )
OS.Root( spec ).Startup()
end

if !thisOSpace
.Post( 'UpdateOSpace', spec )
else
$BuilderProgram.Run()

$Browser.Create()
end
end
end

end

 
If you have a copy of everything before you started it would be easy otherwise here are things I would do.
manually uninstall the addressbook module and let livelink start up and then look at the source code of your addressbook module. In one of the objects you may have a code with error and you may have saved it anyways.When builder starts us it may not be able to go past your error.

Here's what I would do.
Make a backup of OTHOME
Go to opentext.ini and remove all traces of addressbook there and move the module out to staging
The above step will be pretty tiresome if the addressbook was not the last module installed on this.If
it was not then you will have to maintain the continuity of the numbers
Then open up your addressbook ospace sitting in staging,look at your code and see if any of them would not compile
Fix it and re-add it and continue working

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
which line in the script is the error on as the script looks like the original one, its likely that you have an issue with the value of OBJ etc.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 

The error is occurring on the if statement -

if OS.IsFeature( OS.Root( spec ), "Startup") && ( Type( OS.Root( spec ).Startup ) == ScriptType)

the spec is a string value = 'C:\\OPENTEXT\\module\\addressbook_9_1_0\\ospace\\addressbook.oll' which is where the ADDRESSBOOK module resides after running the install. The value of obj is #22000001 (unknown).

I'll try uninstalling the module and start again.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top