我試圖透過使用一致引用更新腳本來糾正我編寫的腳本中以前的“罪過”,即,以便該腳本引用我(想要)告訴它的一個表,即使另一個表可能是當前的(或“幹擾”)表。 我嘗試重構下面的問題。
Names Default To Here( 1 );
// this is the table i want to work with
dt = New Table( "Target table", invisible,
Add Rows( 3 ),
New Column( "Name_1",
Character( 1 ),
"Nominal",
Set Values( {"A", "B", "C"} ),
Set Display Width( 45 )
),
New Column( "Name_2",
Character( 1 ),
"Nominal",
Set Values( {"X", "Y", "Z"} ),
Set Display Width( 45 )
),
New Column( "NumericRight",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 2, 3] ),
Set Display Width( 78 )
),
New Column( "NumericAlso",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [7, 8, 9] )
)
);
dt2 = New Table( "Interfering table", invisible,
Add Rows( 3 ),
New Column( "Name_1",
Character( 1 ),
"Nominal",
Set Values( {"D", "E", "F"} ),
Set Display Width( 45 )
),
New Column( "Name_2",
Character( 1 ),
"Nominal",
Set Values( {"U", "V", "W"} ),
Set Display Width( 45 )
),
New Column( "NumericInterference",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [4, 5, 6] )
),
New Column( "MoreNumeric",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [7, 8, 9] )
)
);
// get lists
lstName_1 = Associative Array( dt:Name_1 ) << Get Keys;
lstName_2 = Associative Array( dt:Name_2 ) << Get Keys;
colList = dt << Get Column Names( "Numeric" );
// window with radio buttons & col list box
New Window( "Select values",
Show Menu( 0 ),
Show Toolbars( 0 ),
Border Box( Top( 0 ), Bottom( 20 ), Left( 20 ), Right( 10 ),
H List Box(
Panel Box( "Name_1",
Radio Box(
Eval List( lstName_1 )
)
),
Panel Box( "Name_2",
Radio Box(
Eval List( lstName_2 )
)
),
Panel Box( "Numeric Columns",
clb = Col List Box( )
),
clb << Append( colList ); // making me cry ...
)
)
);
我想看什麼:

如果我的「目標表」不是目前表,我總是會看到什麼:

讓我完全困惑的是,當我更改名稱時dt2:數值幹擾到dt2:數字右,我得到這個結果:

為什麼 dt2 不讓我的腳本完成我想要它做的工作? 為什麼 dt2 中列的名稱變更會影響列列錶框中的內容? 我嘗試了幾種移動方法列列表變數並嘗試將其包裝到評估列表() ,沒有「運氣」。
再次在社區搜索,發現了這個需要有關填充列列錶框的協助。 如果有其他解決方案,謝謝您告訴我。 或者,這就是它本來的樣子嗎?如果是的話,這是什麼意思?