pp [k] <<設置選定的結果錯誤發送預期腳本對象{1} @Craige_Hales 我有一個類似的問題,最近從JMP 10升級到JMP 13。該
在腳本中多次部署以下內容以壓縮選定的列。
pp=dt<<GET column="" names=""></GET>
這在JMP 10中工作正常但是使用JMP 13並且我收到以下錯誤:
Send Expects Scriptable Object{1} in access or evaluation of 'Send' , pp[k] << /*###*/Set Selected( 1 ) /*###*/
我可以從上面看到我需要將它分成兩個步驟,但不能完全解決語法 - 你能幫忙嗎?非常感謝
Re:pp [k] <<設置選定的結果錯誤發送預期腳本對象{1}吉姆有答案。原因如下:
height=7;
dt=open("$sample_data/big class.jmp");
pp=dt<<GETCOLUMNNAMES></GETCOLUMNNAMES>
JMP全局命名空間中有一個變量,其名稱與表的列之一相同。運用 ascolumn 告訴JMP使用當前數據表解析名稱。您還可以在中指定數據表 ascolumn(dt,pp [k]) (如果您可能打開多個表,強烈推薦!)
Re:pp [k] <<設置選定的結果錯誤發送預期腳本對象{1}完美 - 非常感謝!
Re:pp [k] <<設置選定的結果錯誤發送預期腳本對象{1}如果將As Column()添加到列引用,它應該可以工作
Names Default To Here( 1 );
dt = Current Data Table();
pp = dt << Get Column Names();
Show( pp );
ncols = N Items( pp );
For( k = 1, k <= ncols, k++,
As Column( pp[k] ) << Set Selected( 1 )
);
dt << Compress Selected Columns();
dt << Clear Column Selection;
Re:pp [k] <<設置選定的結果錯誤發送預期腳本對象{1}添加了show(pp);日誌確實顯示返回列名稱,但列仍未被選中 - 請參閱下面的完整日誌。有任何想法嗎?非常感謝。
//:*/
dt=current data table();
pp=dt<<Get Column Names();
show (pp);
ncols = N Items(pp); for(k=1, k<=ncols, k++, pp[k] << Set Selected(1));
dt << Compress Selected Columns();
dt << Clear Column Selection;
/*:
pp = {id, yr, rgC, rtC, ptC, cmdC, qtC, TdeQ, NetW, TdeV};
Send Expects Scriptable Object{1} in access or evaluation of 'Send' , pp[k] << /*###*/Set Selected( 1 ) /*###*/
In the following script, error marked by /*###*/
dt = Current Data Table();
pp = dt << Get Column Names();
Show( pp );
ncols = N Items( pp );
For( k = 1, k <= ncols, k++,
pp[k] << /*###*/Set Selected( 1 ) /*###*/
);
dt << Compress Selected Columns();
dt << Clear Column Selection;Re:pp [k] <<設置選定的結果錯誤發送預期腳本對象{1}你的腳本在JMP 10,11,12,13中看起來很好,我認為其他的東西已經改變了。也許添加show(pp);並檢查日誌,看看發生了什麼。 當我使用Big Class.jmp為dt運行時,pp [k]是一列(全部5次)。