Ksp reference Manual



Download 0,99 Mb.
Pdf ko'rish
bet119/187
Sana10.02.2022
Hajmi0,99 Mb.
#441108
1   ...   115   116   117   118   119   120   121   122   ...   187
Bog'liq
KONTAKT 610 KSP Reference Manual

Load/Save Commands
133
KSP Reference Manual


$count := 0
while($count < 8)
%preset[$count] := %table[$count]
inc($count)
end while
end on
on ui_control ($Load)
$load_arr_id := load_array(%preset,0)
end on
on ui_control ($Save)
$save_arr_id := save_array(%preset,0)
end on
on async_complete
if ($NI_ASYNC_ID = $load_arr_id)
$load_arr_id := -1
$Load := 0
if ($NI_ASYNC_EXIT_STATUS = 1)
$count := 0
while($count < 8)
%table[$count] := %preset[$count]
inc($count)
end while
end if
end if
if ($NI_ASYNC_ID = $save_arr_id)
$save_arr_id := -1
$Save := 0
end if
end on
Exporting and loading the contents of a UI table
See Also 
$NI_ASYNC_ID
$NI_ASYNC_EXIT_STATUS
on async_complete
save_array()
15.4. load_array_str()
load_array_str(,
)
Loads an array from an external file (.nka file) using the file's absolute
path
Load/Save Commands
134
KSP Reference Manual



The array variable. This name must be
present in the .nka file
The absolute path of the .nka file
Remarks
• The behaviour is similar to 
load_array()
with mode set to 0, but instead of manually choos-
ing an .nka file you can specify it with an absolute path.
• Can be used in init (synchronous), 
persistence_changed
, UI and pgs callbacks.
Example
(see next page)
on init
set_ui_height(2)
declare @basepath_browser
{set browser path here, for example
@basepath_browser := "/Users//Desktop/Arrays"}
declare @file_path
make_persistent(@file_path)
declare @file_name
make_persistent(@file_name)
declare ui_file_selector $file_browser
declare $browser_id
$browser_id := get_ui_id($file_browser)
set_control_par_str($browser_id,$CONTROL_PAR_BASEPATH,@basepath_browser)
set_control_par($browser_id,$CONTROL_PAR_WIDTH,112)
set_control_par($browser_id,$CONTROL_PAR_HEIGHT,68)
set_control_par($browser_id,$CONTROL_PAR_COLUMN_WIDTH,110)
set_control_par($browser_id,$CONTROL_PAR_FILE_TYPE,$NI_FILE_TYPE_ARRAY)
move_control_px($file_browser,66,2)
declare ui_table %table[8] (2,2,100)
make_persistent(%table)
move_control(%table,3,1)
declare %preset[8]
declare $load_arr_id
$load_arr_id := -1
declare $count
end on
on async_complete

Download 0,99 Mb.

Do'stlaringiz bilan baham:
1   ...   115   116   117   118   119   120   121   122   ...   187




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish