1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
puts "TODO OCC12345 ALL: OCC1395 Error : There is not the integer attribute on the label 0:2"
puts "TODO OCC12345 ALL: OCC1395 Error"
puts "================"
puts "OCC1395"
puts "================"
puts ""
#######################################################################################
# Wrong behaviour of Undo Redo and SetUndoLimit methods in TDocStd_Document
#######################################################################################
# Case 3 (SetUndoLimit)
#######################################################################################
# Create a new document and set UndoLimit
NewDocument D MDTV-Standard
UndoLimit D 100
# Create a label
set aLabel 0:2
Label D ${aLabel}
# Open a transaction
OpenTran D
# Set integer attribute
set anInteger 5
SetInteger D ${aLabel} ${anInteger}
# Commit transaction
CommitTran D 1
# Set UndoLimit
UndoLimit D 10
# Set real attribute
set aReal 8.8
SetReal D ${aLabel} ${aReal}
# Undo
DFUndo D 1
# Check integer and real attributes
set IsGood 1
if [catch { set Integer [GetInteger D ${aLabel}] } message] {
set IsGood 0
puts "OCC1395 Error : There is not the integer attribute on the label ${aLabel}"
} else {
puts "OCC1395 OK : There is the integer attribute on the label ${aLabel}"
}
if [catch { set Real [GetReal D ${aLabel}] } message] {
set IsGood 0
puts "OCC1395 Error : There is not the real attribute on the label ${aLabel}"
} else {
puts "OCC1395 OK : There is the real attribute on the label ${aLabel}"
}
if { ${IsGood} == 1 } {
puts "OCC1395 OK"
} else {
puts "OCC1395 Error"
}
|