Apache OpenOffice (AOO) Bugzilla – Issue 5836
StarBasic IsObject()
Last modified: 2013-02-24 21:07:45 UTC
In the StarBasic IsObject() don't running and so I must use VarType() or TypeName() function. This i smy code: REM ***** BASIC ***** sub Test '*********************************************************** ' Se vNotObj viene dichiarata come qualunque tipo ' (tranne il tipo Object), la funzione IsObject(vNotObj) ' genera l'errore: "variabile dell'oggetto non impostata". ' Se la variabile non viene dichiarata l'errore NON ' viene generato ' Se la variabile non viene dichiarata ma punta effettivamente ad un oggetto, ' l'errore NON viene generato '*********************************************************** dim vNotObj dim bResult as boolean bResult = IsArray(vNotObj) print "Is Array? " & bResult ' ok bResult = IsEmpty(vNotObj) print "Is Empty? " & bResult ' ok bResult = IsNull(vNotObj) print "Is Null? " & bResult ' ok 'soluzione 1 bResult = (TypeName(vNotObj) = "Object") print "Is Object? " & bResult ' ok 'soluzione 2 bResult = (VarType(vNotObj) = 9) print "Is Object? " & bResult ' ok '*********************************************************** bResult = IsObject(vNotObj) print "Is Object? " & bResult 'ERROR !!! '*********************************************************** end sub
not an API issue - looks like StarBasic runtime
The problem is fixed in the meantime. (Basic/source/runtime/methods.cxx 1.41)
Closed