原創(chuàng)|其它|編輯:郝浩|2012-11-29 10:08:21.000|閱讀 564 次
概述:若要從腳本中訪問組件,首先需要在腳本系統(tǒng)中對組件類,屬性和方法進(jìn)行注冊。本文就主要介紹如何在腳本系統(tǒng)(Script System)中進(jìn)行構(gòu)件注冊。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
若要從腳本中訪問組件,首先需要在腳本系統(tǒng)中對組件類,屬性和方法進(jìn)行注冊。你可以將注冊碼存放在一個與組件碼同名的后綴名為 'RTTI'的文件夾中。本文就主要介紹如何在腳本系統(tǒng)(Script System)中進(jìn)行構(gòu)件注冊。
uses fs_iinterpreter, frxBitBtn, frxClassRTTI;
type
TFunctions = class(TfsRTTIModule)
public
constructor Create(AScript: TfsScript); override;
end;
constructor TFunctions.Create(AScript: TfsScript);
begin
inherited Create(AScript);
with AScript do
begin
{ register class and then define its parent }
AddClass(TfrxBitBtnControl, 'TfrxDialogControl');
{ if there are several common controls in your unit,
they can be registered here;
for example, AddClass(TfrxAnotherControl, 'TfrxDialogControl'); }
end;
end;
initialization
fsRTTIModules.Add(TFunctions);
end.
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn