You are on page 1of 96

FML Forms ond

Menus
Ihe AVEVA Frogrommob|e Mocro Longuoge
Author: kome| E. Dogup|o
Emo||: rome|dhogzgmo||.com
Form Concepts Overv|ew
/ Iype cf cLjecI repre:enIec Ly c g|cLc| vcricL|e
Cwn: c :eI cf precefinec memLer vcricL|e: cnc Lui|I-in
meIhcc:
lI ccn c|:c hcve u:er-cefinec memLer:
Fcrm vcricL|e:, fcrm gccgeI:
lI ccn c|:c hcve u:er-cefinec meIhcc:
Fcrm memLer: cre c|wcy: ccce::ec u:ing Ihe

Excmp|e:
!!MyForm.Textfield
Form nome Form member
Form Concepts Overv|ew
GccgeI: cwn c :eI cf precefinec memLer vcricL|e: cnc
Lui|I-in meIhcc: cnc ccn Le ccce::ec u:ing Ihe

Excmp|e:
!!MyForm.Textfield.Val
Co||bocks cre u:er-cefinec ccIicn: c::ignec Ic c fcrm
cnc iI: gccgeI: cnc IhcI cre execuIec when Ihe
cpercIcr inIerccI: wiIh Ihe fcrm
Vantage Plant Design Software Customization Reference Manual contains
a list of all the members and methods of forms and gadget types
Godget os o member Member vor|ob|e
Nom|ng Forms ond
the|r Members
FcrmcI:
!!MyForm $* name of the form
!!MyForm.GadgetName $* name of a gadget on a form
!!MyForm.GadgetName.Val $* data value held by that
gadget
WiIhin Ihe fcrm cefiniIicn, Ihe memLer: :hcu|c Le referrec Ic Ly
u:ing IIh|s Ic rep|cce Ihe fcrm ncme pcrI cf Ihe gccgeI ncme.
frcm Ihe cLcve excmp|e:
!This.GadgetName $* just equal to !!Myform.GadgetName
!This.GadgetName.Val $* just equal to !!Myform.GadgetName.Val
FML 1 {cL:c|eIe meIhcc LuI :Ii|| :uppcrIec):
_GadgetName $* just equal to !!Myform.GadgetName
Forms
SynIcx:
setup form !!formname

exit
Excmp|e:
setup form !!hello
paragraph .Message text Hello world
button .Bye Goodbye OK
exit
porogroph ccmmcnc ccc: c pcrcgrcph gccgeI
Messoge i: Ihe ncme cf Ihe gccgeI cnc Ihe ccI{.) inciccIe: IhcI Ihe gccgeI i: c
memLer cf Ihe fcrm
buffon ccmmcnc ccc: c LuIIcn gccgeI ncmec .8ye. Ihe IexI cn Ihe LuIIcn wi||
Le 'GcccLye
Ihe keywcrc OK i: c |orm contro| ottr|bute IhcI :pecifie: IhcI Ihe ccIicn cf Ihi: LuIIcn i: Ic
remcve Ihe fcrm frcm Ihe :creen
Form Attr|butes
Fcrm Iype::
MAIN
DOCbMENI
DIALOG
8LOCKINGDIALOG
Excmp|e::
setup form !!MyForm dialog dock left - crecIe: c re:izcL|e cccking cic|cg
setup form !!MyForm dialog resizeable - crecIe: c re:izcL|e f|ccIing cic|cg
setup form !!MyForm dialog - crecIe: c ncn-re:izcL|e f|ccIing cic|cg
setup form !!MyForm - crecIe: c ncn-re:izcL|e f|ccIing cic|cg
setup form !!MyForm document - crecIe: c re:izcL|e MDl chi|c cccumenI
setup form !!MyForm block - crecIe: c ncn-re:izcL|e L|ccking cic|cg
setup form !!MyForm block resizeable - crecIe: c re:izcL|e L|ccking cic|cg
Form Attr|butes
Minimum Size cnc Fe:izcLi|iIy
/ fcrm wi|| cuIcmcIicc||y :IreIch Ic fiI Ihe gccgeI: ycu
ccc Ic iI
Ycu ccn u:e Ihe SIIE keywcrc Ic give minimum :ize in
mu|Iip|e: cf Ihe chcrccIer wicIh cnc |ine heighI
setup form !!MyForm size 25.5 10
Ihe kESIIEA8LE ccmmcnc mecn: IhcI Ihe fcrm wi|| Le
ci:p|cyec wiIh re-:izing ccnIrc|: cI iI: ccrner:
setup form !!MyForm resizeable
setup form !!MyForm size 25.5 10 resizeable
Form I|t|e ond Icon I|t|e
Ihe IIILE :uL-ccmmcnc i: u:ec Ic :upp|y c :Iring IhcI i: ci:p|cyec in
iI: Lcnner cI Ihe Icp cf Ihe fcrm: winccw
Ihe ICONIIILE :uL-ccmmcnc i: u:ec Ic :upp|y c :Iring IhcI i: u:ec
when c fcrm i: iccnizec
setup form !!MyForm

TITLE My Form Title


ICONTITLE Short Title

exit
Cr
setup form !!MyForm

!This.FormTitle = My Form Title


!This.IconTitle = Short Title

exit
Form Co||bocks [In|tco||}
Ihe fcrm: iniIic|izcIicn cc||Lcck c||cw: Ihe fcrm: gccgeI: Ic Le
iniIic|izec Ic ref|ecI Ihe currenI :IcIe cf Ihe cpp|iccIicn
Ycu ccn :eI Ihe cc||Lcck Ly c::igning Ic Ihe fcrm: |n|tco|| memLer:
setup form !!MyForm

INITCALL !this.init()

exit
Cr
setup form !!MyForm

!!Myform.InitCall = !this.init()

exit
Form Co||bocks [OK}
Ihe OKCALL cc||Lcck c||cw: Ihe cpercIcr Ic
cpprcve Ihe currenI gccgeI :eIIing:
Ycu ccn c::ign Ic Ihe fcrm: OKCALL memLer Ly:
setup form !!MyForm

OKCALL !this.approveData1()

exit
Ycu ccn mccify Ihe CK cc||Lcck cI cny Iime u:ing,
!this.OKCall = !this.approveData2()
Form Co||bocks [Conce|}
Ihe CANCELCALL cc||Lcck c||cw: Ihe cpercIcr
ncI Ic prcceec wiIh Ihe funcIicn cf Ihe fcrm
Ycu ccn c::ign Ic Ihe fcrm: CANCELCALL
memLer Ly:
setup form !!MyForm

CANCELCALL !this.cancelForm1()

exit
Ycu ccn mccify Ihe Ccnce| cc||Lcck cI cny Iime u:ing,
!this.CancelCall = !this.cancelForm2()
Form Co||bocks [Qu|tco||}
Ihe QbIICALL cc||Lcck i: execuIec whenever Ihe u:er
pre::e: Ihe QbIIJCLOSE |con [X} cn Ihe IiI|e Lcr cf fcrm:
Ycu ccn c::ign Ic Ihe fcrm: QbIICALL memLer Ly:
setup form !!MyForm

QUITCALL !this.quitForm1()

exit
Ycu ccn mccify Ihe CuiI cc||Lcck cI cny Iime u:ing,
!this.QuitCall = !this.quitForm2()
Form Contro| Attr|butes
/ LuIIcn mcy cpIicnc||y hcve c fcrm ccnIrc|
cIIriLuIe which Icke: effecI cfIer Ihe cc||Lcck
ccmmcnc i: invckec
CcnIrc| /IIriLuIe::
CK
/FFLY
C/NCEL
FESEI
HELF
Form Contro| Attr|butes
Excmp|e::
button .Ok OK callback !!MyOKFunction OK
button .Apply Apply callback $
!!MyApplyFunction APPLY
button .Cancel Cancel callback $
!!MyCancelFunction CANCEL
button .Reset Reset RESET
button .Help Help HELP
Ycu ccn cn|y hcve cne cf ecch Iype cf ccnIrc|
cIIriLuIe cn cny fcrm excepI fcr /FFLY which mcy
Le u:ec cn :everc| LuIIcn:
A S|mp|e Form
Excmp|e {:imp|eFcrm.pm|frm):
setup form !!simpleForm
title My Form
icontitle Myform
paragraph .message text Hello world!
button .bye Goodbye ok
exit
Ihe Form De||n|t|on F||e
Shcu|c Le he|c cne per fi|e
Ihe fi|e :hcu|c Le :Icrec in c cirecIcry pcinIec Ic Ly Ihe FMLLI8
envircnmenI vcricL|e
Fi|encme mu:I hcve :uffix .pm||rm
IIMYFOkM cr IIMyForm cr IImy|orm c|| ccrre:pcnc: Ic my|orm.pm||rm
8egin: wiIh setup |orm cnc enc: wiIh ex|t
/ny meIhcc cefiniIicn: :hcu|c fc||cw Ihe ex|t ccmmcnc
Ecch meIhcc Legin: wiIh de||ne method cnc enc: wiIh endmethod
ln pcrIicu|cr, iI wi|| ccnIcin Ihe fcrm: de|ou|t constructor method
Ihi: meIhcc hc: Ihe :cme ncme wiIh Ihe fcrm cnc nc crgumenI:
Ihe cn|y meIhcc cc||ec cuIcmcIicc||y when Ihe fcrm i: |cccec
U:ec Ic :eI cefcu|I vc|ue: fcr Ihe gccgeI: cf Ihe fcrm
Ihe fcrm mcy Le given cn |n|t|o||sot|on method
Which i: run whenever Ihe fcrm i: :hcwn
Nc execuIcL|e :IcIemenI: :hcu|c cppecr in Ihe fi|e cuI:ice Ihe fcrm
cefiniIicn cr fcrm meIhcc:
8uI ccmmenI: ccn Le puI cnywhere in Ihe fi|e
Lood|ng ond D|sp|oy|ng
Forms
FML wi|| cuIcmcIicc||y |ccc cn cLjecI cr fcrm frcm fi|e
when fir:I u:ec
Ic ci:p|cy c fcrm {ccn eiIher Le free-:Icncing cr c: c memLer cf
c fcrm fcmi|y):
show !!formname $* default is a child form
show !!formname free
Femcving cr hicing frcm Ihe :creen:
hide !!formname
Fecefining c fcrm cnce |cccec:
pml reload form !!formname
Lcccing c fcrm:
loadform !!formname
Lood|ng ond D|sp|oy|ng
Forms
Note: If you show the form again, it will appear on
the screen but its definition is already known so it
will not be loaded again
Femcving c fcrm cefiniIicn:
kill !!formname
Some 8u||t-|n Methods
|or Forms
/ vcrieIy cf u:efu| meIhcc cc||: hcve Leen
prcvicec:
Ic :hcw c fcrm:
!!MyForm.Show()
!!MyForm.Show(FREE)
!!MyForm.Show(At,0.3,0.5) $* automatically FREE
Ic hice c fcrm:
!!MyForm.Hide()
Ic uery wheIher c fcrm i: currenI|y :hcwn:
if (!!MyForm.Shown()) then

endif
Form Member Vor|ob|es
U:ec Ic :Icre ccciIicnc| infcrmcIicn cn c fcrm which wi||
ncI Le ci:p|cyec Ic Ihe u:er
Ihe:e cre vcricL|e: which ccn Le cny cf Ihe FML ccIc Iype:,
inc|ucing /FF/YS cnc C8JECIS
setup form !!MyForm

member .MyNumber is REAL


member .MyString is STRING
member .MyArray is ARRAY

exit
Ihe vc|ue cf c fcrm memLer ccn Le :eI cnc u:ec in ju:I Ihe
:cme wcy c: cn cLjecI memLer
!this.MyNumber = 42
!this.MyString = Gadz
!Num = !this.MyNumber
Form Godgets
Ihere cre mcny kinc: cf fcrm gccgeI:
Iwc ccmmcn cim: in cefining gccgeI: cn Ihe
fcrm
Define Ihe crec Ic Le Icken up cn Ihe fcrm
Define Ihe ccIicn Ic Le Icken if Ihe gccgeI i:
:e|ecIec
Ecch gccgeI :ize cnc pc:iIicn ceIermine: Ihe
crec Icken up
Ihe ccIicn i: cefinec Ly Ihe gccgeI: CALL8ACK
Co||bocks
/ny :e|ecIcL|e gccgeI hc: c cc||Lcck which
i: cefinec cI Ihe Iime Ihe gccgeI i: crecIec
Ihe cc||Lcck ccn cc cne cf Ihe Ihree Ihing::
Shcw c fcrm
ExecuIe c ccmmcnc cirecI|y
Fun c funcIicn cr meIhcc
Co||bocks
Excmp|e:
setup form !!MyForm
paragraph .Message text Hello world
button .Change Change Message callback $
|!this.Message.Val = Modified|
button .Bye Goodbye OK
exit
c gccgeI cc||Lcck i: cefinec Ly Ihe co||bock ccmmcnc fc||cwec Ly c
ccmmcnc cr FML funcIicn: enc|c:ec in IexI ce|imiIer:
fcr cefining ccmp|iccIec cc||Lcck, iI i: reccmmencec Ic u:e c |orm
method
Co||bock Exomp|e
Fcr c cc||Lcck Ic cc|| c funcIicn
setup form !!MyForm

button .Query Query callback !!queryCatalogueDetails()

exit
Fcr c cc||Lcck Ic cc|| c meIhcc
setup form !!MyForm

button .Query Query callback !this.queryDetails()

exit
Co||bock Exomp|e
Sncw|ng cnctne| |c|n ||cn c |c|n gccget
setup form !!MyForm

button .Gadz Show Gadz Form callback show !!gdzMainForm

exit
c|
setup form !!MyForm

button .Gadz Show Gadz Form form !!gdzMainForm

exit
Co||bocks: Form Methods
Mc:I cc||Lcck: reuire mcre Ihcn c :ing|e ccmmcnc, :c invcking c meIhcc
cr funcIicn cr mccrc i: cn e::enIic| reuiremenI
Excmp|e:
setup form !!MyForm
title Display Your Message
paragraph .Message width 15 height 1
text .Capture Enter message: width 15 is STRING
button .Bye Goodbye OK
exit
define method .MyForm()
$* default constructor set gadget default values
!this.Message.Val = Hello world!
!this.Capture.Callback = !this.Message.Val = !this.Capture.Val
!this.OKcall = !this.Success()
endmethod
define method .Success()
!this.Message.Val = Hello again!
!this.Capture.Val =
endmethod
Co||bocks: Form Methods
Ihe grecI ccvcnIcge cf meIhcc: i: IhcI ycu ccn pc::
vcricL|e: c: crgumenI: Ic Ihe meIhcc cnc iI ccn c|:c
reIurn c re:u|I ju:I |ike c FML funcIicn
Excmp|e:
define method .Success(!output is GADGET, !input is GADGET)
!output.Val = Hello again!
!input.SetFocus()
endmethod
define method .setGadget(!output is GADGET) is BOOLEAN
!output.Val = Gadget initialized!
handle any
return FALSE
endhandle
return TRUE
endmethod
FML Open Co||bocks
When Ihe cpercIcr inIerccI: wiIh c GUl, cn evenI cccur:
Excmp|e:
Iype: :cmeIhing inIc c fie|c cn c fcrm
Mcve: Ihe cur:cr inIc c winccw
Fre::e: ccwn c mcu:e LuIIcn
EIc.
/pp|iccIicn :cfIwcre cefine: c :eI cf meto-events fcr
fcrm: cnc gccgeI:
When c meIc-evenI cccur:, Ihe cpp|iccIicn :cfIwcre
check: fcr u:er-cefinec cc||Lcck: cnc execuIe Ihem
FML Open Co||bocks
Simp|e c::ignec cc||Lcck i: in:ufficienI Ic fu||y exp|ciI Ihe
gccgeI: pc::iL|e Lehcvicr:
Ic cverccme Ihi: :hcrIccming, we ccn u:e OFEN CALL8ACKS Ic
c||cw Ihe /ppWcre Ic Le infcrmec whenever c meIc evenI i:
enccunIerec
Cpen Cc||Lcck:
define method .Control(!object is GADGET, !action is STRING)
!object i: c Forms ond Menus cLjecI {i.e. c fcrm, gccgeI, cr
menu)
!action i: Ihe meIc-evenI IhcI cccurrec cn Ihe cLjecI cnc
repre:enI: Ihe ccIicn Ic Le ccrriec cuI Ly Ihe meIhcc
FML Open Co||bocks
Ihe cpen cc||Lcck i: c :Iring cf Ihe fcrm:
!this.MethodName(
NcIe Ihe cpen LrcckeI '(' {nc crgumenI: cnc
nc c|c:ing LrcckeI).
Ihe cc||Lcck i: Ic cn open meIhcc cr funcIicn
FML Open Co||bocks Exomp|e
/n cpen cc||Lcck Ic c mu|Ii-chcice |i:I gccgeI:
setup form !!Open
title Test Open Callbacks
list .Choose callback !this.Control( multi width 15 height 8
exit
define method .Open()
do !i from 1 to 10
!fields[!i] = list field $!i
enddo
!this.Choose.Dtext = !fields
endmethod
define method .Control(!object is GADGET, !action is STRING)
if (!action eq SELECT) then
-- find out all about our gadget object
!form = !object.Owner()
!type = !object.Type()
!name = !object.Name()
!field = !object.PickedField
!fieldtext = !object.Dtext[!field]
$P Selected $!form$n.$!name $!type Field $!field Dtext{$!fieldtext}
elseif (!action eq UNSELECT) then
!field = !object.PickedField
$P Unselect field $!field
endif
endmethod
FML Open Co||bocks
lI i: c|:c Le e::enIic| if we u:e FML funcIicn: c:
cpen cc||Lcck:
define function !!Control(!object is GADGET, !action is
STRING)

endfunction
Li:I cf cLjecI: IhcI ccn hcve cpen cc||Lcck: i:
fcunc Vantage Plant Design Software Customisation Guide
Section 14.3.4
Godgets ond the|r Attr|butes
Iype: cf GccgeI::
FkAME
FAkAGkAFH
8bIION
IOGGLE
kGkObF
OFIION
LISI
DAIA8ASE SELECIOk
IEXI
IEXIFANE
VIEW
SLIDEk
kIOGGLE
Godget De||n|t|on Commonds
Ccn cn|y Le cefinec wiIhin Ihe fcrm cefiniIicn :euence
setup form

exit
FcrmcI:
type name {common prop.} {specific prop.}
Excmp|e:
list .List1 at XY width 10 lines 3
Ccmmcn prcperIie::
pos|t|on - /|| gccgeI: hcve Ihi:
tog
too|t|p
co||bock
onchor
dock|ng
Specific prcperIie:: Ihe crcer cf ccmmcnc: generc||y mcIIer:
See :ynIcx grcph in VANTAGE Plant Design Software Customisation
Reference Manual
}
Mc:I LuI ncI c|| gccgeI:
hcve Ihe:e
Godget S|ze Monogement
U:er SpecificL|e Iogw|dth fcr IEXI, ICGGLE, CFIlCN
cnc FGFCUF GccgeI:
IEXI, IOGGLE, OFIION cnc kGkObF gccgeI: :uppcrI Ihe
Iogw|dth :ynIcx
Iogw|dth :pecifie: Ihe :ize cf Ihe gccgeI: Icg fie|c in gric
wicIh uniI:
option .ELLIST tagwid 7 |Element Id| width 4
Ihe ccIuc| Icg mcy hcve mcre chcrccIer: Ihcn Ihe
cec|crec Iogw|dth cnc :Ii|| fiI in Ihe Icg fie|c
Godget S|ze Monogement
Specifying GccgeI Size Fe|cIive Ic CIher GccgeI:
Excmp|e:
frame .fr1 Frame 1 at x0 y0 width 10 height 10

exit
frame .fr2 Frame 2 at xmin ymin width.fr1 height 15

exit
Godget thot Support F|xmops
Scme gccgeI: :uppcrI pixmcp: c: ccnIenI c: cn c|IerncIive Ic IexI
e.g. 8uttons, Iogg|es, cnc Forogrophs
Fixmcp: cre pixe|cIec picIure: he|c in fi|e: cf Iype .png
Defcu|I :ize fcr pixmcp: i: c::umec Ic Le 32x32 pixe|:
When pixmcp: cre reuirec, ycu wi|| neec Ic :pecify
pcIhncme: Ic Ihe pixmcp fi|e
Mcximum reuirec :ize cf Ihe imcge
button .But1 pixmap /C:\pic.png width 26 height 26
U:ing AddF|xmop[} MeIhcc:
button .But1 pixmap width 26 height 26
ln Ihe ccn:IrucIcr meIhcc:
!this.but1.AddPixmap(C:\pic.png)
Godget Members
MemLer: CcnIcinec Ly /|| GccgeI:
V|s|b|e
Act|ve
Co||bock
Iog
Mcking gccgeI: vi:iL|e cnc invi:iL|e
!!MyForm.List1.Visible = FALSE $* Invisible
!!MyForm.List1.Visible = TRUE $* Visible
/cIivcIing cnc ce-ccIivcIing gccgeI:
!!MyForm.List1.Active = FALSE $* De-activate
!!MyForm.List1.Active = TRUE $* Activate
Godget Members
SeIIing KeyLccrc Fccu:
Ihe keyboord |ocus cefine: which gccgeI wi|| receive key:Ircke:
!!MyForm.KeyboardFocus = !!MyForm.Gadget
Ihi: ccn Le mcvec cI cny Iime Ic cncIher gccgeI u:ing Ihe
SetFocus[} meIhcc
!!MyForm.Textfield.SetFocus()
Frome Godgets
Frcme gccgeI: prcvice vi:uc| grcuping cf gccgeI: cn c
fcrm
Frcme DefiniIicn:
frame .MyFrame at x0 y3 My Frame

exit
Frcme Size:
/uIcmcIicc||y expcnc: ccwnwcrc: cnc Ic Ihe righI when gccgeI i:
cccec LuI ycu ccn :pecify cefcu|I :ize
frame .MyFrame at x0 y3 My Frame width 25 height 5

exit
Iobset Fromes
/ frcme wiIh IcL pcge:
IcL:eI Frcme DefiniIicn:
frame .MyFrame tabset width 25 height 5
frame .Tab1 Tab 1

exit
frame .Tab2 Tab 2

exit
exit
Forogroph Godgets
Fcrcgrcph gccgeI: cre :imp|e ncmec gccgeI: which
c||cw piece cf IexI cr c pixmcp Ic Le ci:p|cyec cn Ihe
fcrm
IexIuc| Fcrcgrcph GccgeI::
paragraph .Message text Text String
paragraph .Message at text Text String width 16 lines 7
paragraph .Message at background 2 width 20 lines 2
Fixmcp Fcrcgrcph GccgeI::
paragraph .Picture at pixmap /C:\pic.png
paragraph .Picture at pixmap /C:\pic.png width 30 height 30
Fixmcp mcy Le chcngec cny Iime Ly c::igning c new vc|ue Ic Ihe
.Vo| memLer:
!!MyForm.Picture.Val = /C:\newpic.png
8utton Godgets
/|:c cc||ec contro| button , u:uc||y ci:p|cy: c chi|c fcrm cr invcke c
cc||Lcck {Iypicc||y c FML Fcrm meIhcc)
Icg, pixmcp, cc||Lcck, cnc chi|c fcrm cre c|| cpIicnc|
button .SubForm More form !!ChildForm
button .SubForm pixmap /C:\pic.png form !!ChildForm
button .Calculate Calculate callback !this.Calculate()
button .But1 More at width 10 height 1
Iogg|e Mode 8uIIcn::
button .But1 toggle pixmap /C:\unselectpic.png
/C:\selectpic.png /C:\inactivepic.png width 16 height 16
tooltip This is a toggle button
Iogg|e Godgets
/re u:ec fcr incepencenI onJo|| :eIIing:
cppc:ec Ic c rccic grcup
Excmp|e:
toggle .Bold Bold
toggle .Italic Italic
toggle .Underline Underline
U:ing Fixmcp:
toggle .GridOn pixmap /C:\gridon.png callback
!this.enableGrid()
kGroup Godgets
U:ec Ic c||cw :e|ecIicn cf cne cf c :mc|| fixec numLer cf chcice:
Excmp|e:
rgroup .MyRGroup Choices: horizontal callback !this.Select()
add tag Red select RED
add tag Blue select BLUE
add tag Green select GREEN callback !this.RadAction()
exit
Ihe SELECI keywcrc in Ihe odd ccmmcnc cefine: iI: rep|ccemenI
IexI :Iring [kIEXI}
When uerying currenI :e|ecIicn u:ing Se|ect|on[} meIhcc, iI wi||
reIurn Ihe kIEXI :Iring cf Ihe :e|ecIec LuIIcn
if (!!MyForm.MyRGroup.Selection() eq RED) then

endif
kIogg|e Godgets
Very :imi|cr Ic IOGGLE gccgeI, LuI i: c||cwec cn|y in
FkAMES, where Ihey cpercIe IcgeIher Ic fcrm c :eI cf
rccic LuIIcn: :imi|cr Ic kGkObF gccgeI
Excmp|e:
frame .MyFrame Frame at xmin ymin
rtoggle .Rad1 Radio Button 1 callback !this.Control(
rtoggle .Rad2 Radio Button 2 callback !this.Control(
rtoggle .Rad3 Radio Button 3 callback !this.Control(
exit
Opt|on Godgets
Cffer: c :ing|e chcice frcm c |i:I cf iIem:
Ihe iIem: cn Ihe |i:I ccn Le eiIher pixmcp: cr
IexI :Iring: LuI ncI c mixIure
CcnIcin: Iwc pcrc||e| |i:I: cf Ihe :cme |engIh in
/FF/Y fcrmcI
Di:p|cy vc|ue: [DIEXI}
Fep|ccemenI vc|ue: [kIEXI}
Iextuo| Opt|on Godgets
WicIh cf c IexIuc| cpIicn gccgeI mu:I Le
:pecifiec
Excmp|e:
option .Colour Colours at callback !!MyFunc() width 10
!ColourDtext[1] = Color Black
!ColourDtext[2] = Color White
!ColourDtext[3] = Color Red
!ColourRtext[1] = Black
!ColourRtext[2] = White
!ColourRtext[3] = Red
!this.Colour.Dtext = !ColourDtext
!this.Colour.Rtext = !ColourRtext
F|xmop Opt|on Godgets
GccgeI :hcpe mu:I Le :pecifiec u:ing WIDIH
keywcrc cnc eiIher HEIGHI cr ASFECI
DIEXI memLer wi|| Le Ihe pixmcp: fi|encme
Excmp|e:
option .Circle Circles at callback !!MyFunc() pixmap
width 256 height 128
!CircleDtext[1] = C:\circle1.png
!CircleDtext[2] = C:\circle2.png
!CircleRtext[1] = Circle 1
!CircleRtext[2] = Circle 2
!this.Circle.Dtext = !CircleDtext
!this.Circle.Rtext = !CircleRtext
Opt|on Godgets
SeIIing cnc GeIIing Ihe CurrenI Se|ecIicn
SeIIing :e|ecIicn u:ing Se|ect[} MeIhcc:
!!MyForm.Colour.Select(Dtext,Color Black)
!!MyForm.Colour.Select(Rtext,Black)
!!MyForm.Circle.Select(Dtext,C:\circle1.png)
Feccing Ihe :e|ecIicn u:ing Se|ect|on[} MeIhcc:
!Selected = !this.Colour.Selection()
!Selected = !this.Colour.Selection(Dtext)
!Selected = !this.Colour.Selection(Rtext)
S||der Godgets
/||cw: ycu Ic inIerccIive|y Ic
genercIe vc|ue: in c :pecifiec
rcnge, cI :pecifiec :Iep:
SuppcrI: vert|co| cnc hor|zonto|
frame .fr1 Slider at xmin ymax width 10
text .txt width 3 is REAL
slider .sld horizontal callback !this.ControlSlide(
range -50 +50 step 5 val 0 width 5
exit
Fe:pcnc: Ic |efI-mcu:e SLIDEk SIAkI, MOVE, cnc SIOF
evenI:
L|st Godgets
/||cw: Ihe u:er Ic mcke
s|ng|e cr mu|t|p|e :e|ecIicn:
frcm mcny c|IerncIive:
/pprcpricIe fcr |cng |i:I chcice:
S|ng|e Cho|ce L|st Godgets
list .Components List single zeroselection width 25 lines 15
!ComponentDtext[1] = ELBO1
!ComponentDtext[2] = FLAN1
!ComponentRtext[1] = =1565/1543
!ComponentRtext[2] = =1565/1544
!this.Components.Dtext = !ComponentDtext
!this.Components.Rtext = !ComponentRtext
IEkOSELECIION mecn: nc cefcu|I fie|c :e|ecIicn
cn|y cpp|iccL|e Ic :ing|e chcice |i:I gccgeI
L|st Godgets
Mu|t|p|e Cho|ce L|st Godgets
list .Components List multiple width 25 lines 15
!ComponentDtext[1] = ELBO1
!ComponentDtext[2] = FLAN1
!ComponentRtext[1] = =1565/1543
!ComponentRtext[2] = =1565/1544
!this.Components.Dtext = !ComponentDtext
!this.Components.Rtext = !ComponentRtext
Cuerying :e|ecIec vc|ue:
Sing|e chcice |i:I gccgeI reIurn: c SIkING
Mu|Iip|e chcice |i:I gccgeI reIurn: cn AkkAY o| SIkINGS
Form Exerc|se 1
CrecIe Ihe fc||cwing fcrm.
Upcn Ihe fcrm i: |n|t|o||zed:
Defcu|I vc|ue in IexILcx: 0
Defcu|I frcme Icg: Sequence Frome
Upcn chcc:ing F|bonocc|
LuIIcn:
Frcme Icg: 'F|bonocc| Sequence
Ihe :euence i: :hcwn in:ice Ihe
frcme.
Upcn chcc:ing 'Ho||stone
LuIIcn:
Frcme Icg: 'Ho||stone Sequence
Ihe :euence i: :hcwn in:ice Ihe
frcme.
Form Exerc|se 1
U:e Ihe funcIicn: ycu crecIec in Ihe previcu: exerci:e: 3 & 4
fcunc in FcrI 1.
Hcnc|e invc|ic inpuI {0 cnc :t||ng). lnpuI :hcu|c Le c FE/L
cLjecI.
Define c ccn:IrucIcr meIhcc.
Mu|t|-Co|umn L|st Godgets
/ |i:I gccgeI wiIh c COLbMNS keywcrc
Cc|umn CrienIec - SEICOLbMNS[}
list .Components columns single zeroselection width 25 lines 15
!head[1] = Name
!head[2] = Type
!col[1][1] = Flange_B1
!col[1][2] = Elbow_B2
!col[2][1] = Type is Flange
!col[2][2] = Type is Elbow
!rtext[1] = =156/256
!rtext[2] = =157/257
!this.Components.SetHeadings(!head)
!this.Components.SetColumns(!col)
!this.Components.Rtext = !rtext
Ccn Le cpp|y Ic Mu|Iip|e Chcice Li:I gccgeI c|:c
Mu|t|-Co|umn L|st Godgets
Fcw CrienIec - SEIkOWS[}
list .Components columns single zeroselection width 25 lines 15
!head[1] = Name
!head[2] = Type
!row[1][1] = Flange_B1
!row[1][2] = Type is Flange
!row[2][1] = Elbow_B2
!row[2][2] = Type is Elbow
!rtext[1] = =156/256
!rtext[2] = =157/257
!this.Components.SetHeadings(!head)
!this.Components.SetRows(!row)
!this.Components.Rtext = !rtext
DIEXI :Iring i: he|c c: c 'hcrizcnIc| IcL chcrccIer :epcrcIec
:Iring cf cc|umn ccIc
Dotobose Se|ector Godgets
/ :pecic| kinc cf |i:I gccgeI
Frcvice: c mechcni:m fcr
ci:p|cying Ihe currenI ccIcLc:e
e|emenI c|cng wiIh iI: cwner
cnc memLer:
U:er ccn inIerccI wiIh c :e|ecIcr
Ic chcnge Ihe currenI e|emenI
selector .Sel Selector: single width 12 height 5 DATABASE
selector .Sel multiple width 12 height 5 DATABASE OWNERS
selector .Sel multiple width 12 height 5 DATABASE MEMBERS
selector .Sel single width 12 height 5 DATABASE AUTO
selector .Sel callback !this.Mylist( single width 12
height 5 DATABASE
Dotobose Se|ector Godgets
DAIA8ASE keywcrc i: mcnccIcry
OWNEkS cnc MEM8EkS cre cpIicnc|
AbIO cnc MbLIIFLE ccnncI Le u:ec IcgeIher
Ic geI cnc :eI vc|ue: fcr c :e|ecIcr:
Se|ect|on[} - geI vc|ue
Se|ect[} - :eI vc|ue
!element = !this.Sel.Selection()
kIEXI cnc DIEXI cre c|wcy: Ihe :cme c: cne
cncIher
AbIO mecn: Ihe :e|ecIcr gccgeI i: upccIec when
ycu cc ccIicn Ic Ihe des|gn exp|orer |orm
Iext Godgets
/ Lcx IhcI ccn ci:p|cy c
vc|ue cnc inIc which Ihe
u:er mcy Iype c vc|ue,
cr eciI cn exi:Iing vc|ue
text .Number at width 10 is REAL
text .Str Username: callback !!MyFunction width 10
scroll 100 is STRING
text .Bore Bore: width 10 is BORE format !!FormatBore
text .Passwd Password: at width 10 NOECHO is STRING
Specify ccIc Iype u:ing IS
Supp|y c FOkMAI cLjecI
Fc::wcrc Iype u:ing NOECHO keywcrc
Iext Godgets
Vo||dot|ng Input to Iext F|e|ds
Hc: cn cpIicnc| vc|iccIicn cc||Lcck memLer which
Ihe u:er ccn :pecify
!textField.ValidateCall = <callback string>
Excmp|e:
!!MyForm.Txt1.ValidateCall = !this.Validate()
VALIDAIECALL i: u:ec Ic cpp|y cny check:
if cn errcr i: enccunIerec Ihen Ihe cc||Lcck rci:e: Ihe errcr
cnc reIurn:
Iextpone Godgets
Frcvice: c Lcx cn c fcrm inIc which c u:er mcy Iype
cnc eciI mu|Iip|e |ine: cf IexI
textpane .Txt Text: at width 10 height 20
textpane .Txt Text: at height 20 aspect 0.5
lI: ccnIenI: i: cn orroy o| str|ngs
Ecch e|emenI cf Ihe crrcy ccrre:pcnc: Ic c |ine cf IexI in Ihe
gccgeI
SeIIing ccnIenI::
!Lines[1] = Hello World
!Lines[2] =
!Lines[3] =
!Lines[4] = Goodbye World
!this.Txt.Val = !Lines
Fost Access to L|sts, Se|ectors ond
Iextpones us|ng Do Loops
Ic c LISI gccgeI:
do !field list !!FormA.ListA

enddo
Ic c SELECIOk gccgeI:
do !field selector !!FormA.SelectorA

enddo
Ic c IEXIFANE gccgeI:
do !line pane !!FormA.TextpaneA

enddo
V|ew Godgets
U:ec Ic ci:p|cy cnc inIerccI wiIh c|phcnumeric cr grcphicc| view:
Iype: cf View GccgeI::
ALFHA
FLOI
2D Groph|co| V|ews
3D Groph|co| V|ews
Excmp|e {u:ing mu|Iip|e |ine:):
view .MyView at PLOT
height 10 width 20
cursortype pick
border on
setcolour 15
exit
Excmp|e {u:ing cne |ine):
view .MyView at PLOT height 10 width 20 bord on setc 15 exit
V|ew Godgets
De||n|ng ALFHA V|ews
View: fcr ci:p|cying IexI cuIpuI cnc/cr c||cwing ccmmcnc inpuI
view .Input at ALPHA
height 10 width 20
channel COMMANDS
exit
view .InputOutput at ALPHA
height 10 width 20
channel REQUESTS
channel COMMANDS
exit
chonne| COMMANDS - ccu:e: c|phc view Ic hcve c ccmmcnc inpuI
fie|c cnc ci:p|cy: ccmmcnc |ine: cnc errcr me::cge: in Ihe me::cge:
in Ihe :crc||cL|e cuIpuI regicn
chonne| kEQbESIS - ci:p|cy: Ihe cuIpuI re:u|Iing frcm ccmmcnc:, in
pcrIicu|cr, uerie: in Ihe :crc||cL|e cuIpuI regicn
V|ew Godgets
De||n|ng FLOI V|ews
View: fcr ci:p|cying ncn-inIerccIive
2D p|cIfi|e:
setup !!MyForm

view .Diagram at PLOT height 10 width 20 exit


!this.Diagram.Borders = false
!this.Diagram.Add(C:\plot1.plt)

exit
Ic cefine Ihe ccnIenI cf Ihe p|cI view, :pecify Ihe FLCIFlLE pcIh wiIh
Ihe Add[} meIhcc
V|ew Godgets
De||n|ng DkAFI's Areo [2D} V|ews
CcnIenI: cf Ihe view mcy Le cny vc|ic 2D grcphicc| e|emenI, :uch c:
DkAFI SHEEI, VIEW, LI8kAkY, eIc.
Ic cefine Ihe ccnIenI cf Ihe view, u:e Ihe FbI ccmmcnc
put CE - crcw: Ihe currenI e|emenI
put JSIIEJSHEEI - crcw: Ihe ncmec SheeI e|emenI
Excmp|e:
view .Drawing at AREA
height 10 width 20
put /MDS-ABA-3-VIEWS(METRIC)-PS00001-AREA
limits 200 100 to 600 500
exit
!this.Drawing.Background = beige
Fc| DFAF /ccu|e cn|y
V|ew Godgets
De||n|ng DESIGN's Comporotor [2D} V|ews
CcnIenI: cf Ihe view mcy Le cny vc|ic Frocess ond Instrument
D|ogrom :heeI reference
Excmp|e:
view .Pid at COMPARE
height 20 width 40
put /SHEET
cursortype pointer
exit
!this.Pid.Background = darkslate
V|ew Godgets
De||n|ng DESIGN's Vo|ume [3D} V|ews
Excmp|e:
setup form !!MyForm

view .Model at VOLUME


height 10 width 30
limits auto
iso 3
exit

exit
define method .MyForm()

!this.Model.Borders = false
!this.Model.Shaded = true

endmethod
Fu|| ||:t c| nence|: cnc netncc: |: |cunc |n VANAGF F|cnt De:|gn Sc|twc|e
Cu:tcn|:ct|cn Fe|e|ence /cnuc|
Form Loyout
Iypicc||y, gccgeI: cre |cic cuI cnIc Ihe fcrm
frcm Icp |efI Ic righI cnc frcm Icp Ic LcIIcm
Iwc Iype: cf fcrm LcycuI:
Stot|c Form Loyout
Comp|ex Form Loyout
Godget Fos|t|on|ng
Fcrm CccrcincIe Sy:Iem
GccgeI: cre pc:iIicnec cn c fcrm frcm Icp
|efI
0
0
1 2 3 4 5 6 7 8 9 X
1
2
3
4
5
6
7
8
9
Y
1 character width per unit
1 line height per unit
Godget Auto-F|ocement
Ihe FAIH ccmmcnc ccn Le u:ec Ic cefine Ihe |cgicc|
pc:iIicn cf :uL:euenI gccgeI:
FAIH DOWN mecn: IhcI Ihe nexI gccgeI wi|| Le Le|cw
Ihe currenI cne, FAIH kIGHI mecn: IhcI Ihe nexI gccgeI
wi|| Le Ic Ihe righI cf Ihe currenI cne
Ihe :pccing LeIween gccgeI: i: ccnIrc||ec Ly VDISI
cnc HDISI fcr verIicc| cnc hcrizcnIc| :pccing
lf ce:percIicn cc||:lll Ihere cre :eIIing: cf HALIGN cnc
VALIGN which ccn :eI Ihe c|ignmenI LEFI, kIGHI, IOF,
CENIkE, cnc 8OIIOM
Godget Auto-F|ocement
Excmp|e:
button .But1 $* default placement
PATH DOWN
HALIGN CENTRE
VDIST 4.0
para .Par2 width 4 height 2 $* auto-placed
toggle .Tog3 $* auto-placed
PATH RIGHT
HDIST 6.0
VALIGN BOTTOM
list .Lis4 width 5 height 4 $* auto-placed
PATH UP
HALIGN RIGHT
para .Par5 width 6 height 5 $* auto-placed
.8ut1
.For2
.Iog3
.L|s4
.For5
ke|ot|ve Godget F|ocement
Ecch gccgeI hc: fcur |cLe| pcinI:
XMIN
XMAX
YMIN
YMAX
Ihe:e ccn Le u:ec fcr pc:iIicning u:ing
Ihe AI keywcrc
paragraph .message at xmin ymax text Hello world!
gccgeI
YMIN
YMAX
X
M
A
X
X
M
I
N
ke|ot|ve Godget F|ocement
ke|ot|ve to the |ost godget
0
0
1 2 3 4 5 6 7 8 9 X
1
2
3
4
5
6
7
8
9
Y
XMIN
YMAX
YMAX + 2
paragraph .Msg Hello! at xmin ymax+2
prev|ous|y creoted godget used os
re|erence
new porogroph godget
.Msg
ke|ot|ve Godget F|ocement
ke|ot|ve to the |ost godget
0
0
1 2 3 4 5 6 7 8 9 X
1
2
3
4
5
6
7
8
9
Y
XMIN.Foro-5
YMAX.Foro
YMAX.Foro+5
paragraph .Msg Hello! at xmin.Para-5 ymax.Para+5
ex|st|ng porogroph godget
new porogroph godget
.Foro
.Frm ex|st|ng |rome godget
.Msg
M|x|ng Auto ond ke|ot|ve
F|ocement
Excmp|e:
toggle .t1 at xmin ymin
toggle .t2 at xmax ymax.t1+0.25
PATH DOWN
VDIST 2.0
toggle .t3 at xmin.t1
p|cce: .t3 wiIh re:pecI Ic XMIN cf gccgeI .t2, whi|:I Y cccrcincIe
fcr .t3 i: cuIc-p|ccec cI currenI VDISI vc|ue {which i: 2.0) Le|cw Ihe
|c:I p|ccec gccgeI {which i: .t2)
Abso|ute Godget Fos|t|on|ng
Excmp|e:
toggle .OnOff at 4 3.5
toggle .OnOff at x 4 y 3.5
0
0
1 2 3 4 5 6 7 8 9
X
1
2
3
4
5
6
7
8
9
Y
Nofe. Ac:c|ute pc:|t|cn|ng |: nct |eccnnencec wcy tc ce||ne ycu| gccget pc:|t|cn:.
u:e |e|ct|ve pc:|t|cn|ng
Inte|||gent Fos|t|on|ng ond kes|z|ng
Sc fcr, we hcve ccn:icerec Ihe :IcIic |cycuI cf
Ihe fcrm
Defining inIe||igenI pc:iIicning cnc re:izing
Lehcvicr cf gccgeI: i: ccn:icerec c: Comp|ex
Form Loyout
Ihe:e ce:criLe: gccgeI: wiIh DOCK cnc ANCHOk
cIIriLuIe:
Comp|ex Form Loyout
Define: fcrm wiIh inIe||igenI pc:iIicning cnc
re:izing Lehcvicur cf gccgeI: u:ing Ihe DOCK
cnc ANCHOk cIIriLuIe:
DOCK /IIriLuIe:
/||cw: ycu Ic ccck c gccgeI Ic Ihe |efI, righI, Icp, cr
LcIIcm ecge cf iI: ccnIciner, Iypicc||y c fcrm cr c
frcme: cr ycu ccn ccu:e Ihe gccgeI Ic ccck Ic c||
ecge:, cr Ic nc ecge:
ANCHOk /IIriLuIe:
/||cw: ycu Ic ccnIrc| Ihe pc:iIicn cf cn ecge cf Ihe
gccgeI re|cIive Ic Ihe ccrre:pcncing ecge cf iI:
ccnIciner
Comp|ex Form Loyout
DOCK /IIriLuIe Excmp|e::
Fcr fcrm::
setup form !!MyForm dialog dock bottom
Fcr gccgeI::
frame .MyFrame at width 50 heigth 10
button .But1 This is a button dock fill
path down
frame .Fr1 A Frame width 5 height 10 dock right
exit
exit
Comp|ex Form Loyout
ANCHOk /IIriLuIe Excmp|e::
Cn|y cpp|iccL|e Ic gccgeI:
frame .MyFrame My Frame at anchor all
textpane .Txt anchor all width 5 height 5
button .Apply Apply anchor bottom + right at
xmax-size ymax+0.5
path left
button .Cancel Cancel anchor bottom + right
exit
Menus
Menu: cre c|wcy: memLer: cf fcrm: LuI ccn
Le emp|cyec in vcricu: wcy: Ly Ihe fcrm cnc
iI: gccgeI:
Iwc Iype: cf menu::
Mo|n menu
Fopup menu
De||n|ng o 8or Menu Godget
Definec wiIhin c fcrm cefiniIicn
CrecIec wiIh bor :uLccmmcnc
U:e Ihe Lcr: Add[} meIhcc Ic
ccc cpIicn:
Excmp|e:
setup form !!MyForm dialog size 25 1
bar
!this.bar.Add(Choose,Menu1)
!this.bar.Add(Window,Window)
!this.bar.Add(Help,Help)
exit
De||n|ng o Menu Object
/ Menu i: c :eI cf menu fie|c:, ecch
repre:enIing cn ccIicn IhcI i: invckec
when Ihe fie|c i: :e|ecIec
/ menu fie|c ccn cc cne cf Ihree Ihing::
ExecuIe c cc||Lcck
Di:p|cy c fcrm
Di:p|cy c :uL-menu
De||n|ng o Menu Object
Excmp|e cf c ccmp|eIe
menu cefiniIicn:
-- Menu1 definition
!menu1 = !this.newMenu(MENU1,Main)
!menu1.Add(CALLBACK,Query Elbows,!!queryElbows())
!menu1.Add(SEPARATOR)
!menu1.Add(MENU,Pull-right,PULLR)
-- PULLR menu definition
!pullr = !this.newMenu(PULLR,Main)
!pullr.Add(CALLBACK,Menu 1,show !!MyForm)
!pullr.Add(FORM,Gadz Menu,gdzMainForm)
De||n|ng o Menu Object
Generc| SynIcx:
lmenu./cc{'<F|e|dtype>,<Dtext>,<ktext>, {'<F|e|dnome>})
<F|e|dtype>
CALL8ACK, IOGGLE, MENb, FOkM
<Dtext>
Di:p|cy IexI
<ktext>
C/LL8/CK - cc||Lcck :Iring
ICGGLE - cc||Lcck :Iring
MENU - menu ncme :Iring {ccnncI Le L|cnk)
FCFM - fcrm ncme :Iring wiIhcuI 'll {ccnncI Le L|cnk)
<F|e|dnome>
CpIicnc| crgumenI {uniue fie|c ncme)
Fopup Menus
Ycu ccn u:e cny cf ycur cefinec menu: c: pcpup menu:
fcr mc:I inIerccIive gccgeI: cnc fcr Ihe fcrm Lcckgrcunc
c: |cng c: ycu hcve :pecifiec Ihem c: Le|cnging Ic Ihe
pcpup menu :y:Iem
Iriggerec u:ing k|ght-c||ck
/ pcpup i: cccec Ic c gccgeI cr fcrm u:ing iI: SetFopup[}
meIhcc
Excmp|e {U:ing MENb keywcrc):
button .But1 A Button at
menu .pop1 popup
!this.pop1.Add(TOGGLE,Active/Inactive,)
!this.pop1.Add(CALLBACK,Clear,ALPHA REQUEST Clear)
!this.But1.SetPopup(!this.pop1)
Fopup Menus
/ncIher Wcy:
button .But1 A Button at
!popit = !this.newMenu(POPIT,Popup)
!popit.Add(TOGGLE,Active/Inactive,!this.Control()
!this.But1.SetPopup(!popit)
Iogg|e Menus
/ menu fie|c wiIh c cc||Lcck ccIicn cnc c Iick-Lcx Ic :hcw IhcI Ihe
fie|c hc: Leen :e|ecIec cr un:e|ecIec
8y cefcu|I, Ihe fie|c i: un:e|ecIec
Excmp|e:
setup form !!Myform Dialog size 30 5

!menu = !this.newMenu(Test,popup)
!menu.add(TOGGLE,Active/Inactive,!this.toggle(,OnOff)

exit
define method .toggle(!menu is MENU, !action is STRING )
!name = !menu.Fullname()
!field = !menu.PickedFieldName
$P menu $!name $!action field: $!field
endmethod
ALEkI Objects
Ihe ALEkI cLjecI prcvice: c :imp|e wcy cf giving c wcrning cr
geIIing c re:pcn:e frcm Ihe u:er, cvcicing Ihe nece::iIy cf
crecIing c :epcrcIe fcrm
/|erI: cre c|wcy: b|ock|ng: Ihey prevenI inIerccIicn wiIh cny cIher fcrm unIi|
Ihey hcve Leen ccIicnec
Excmp|e::
!!Alert.Error(You cannot do this!)
!!Alert.Message(Saving your data now)
!!Alert.Warning(Do not press this button again!)
!answer = !!Alert.Confirm(Are you sure?)
!answer = !!Alert.Question(OK to delete component?)
Con||rm /|erI reIurn::
'YES cr 'NO SIring:
Quest|on /|erI reIurn::
'YES cr 'NO cr 'CANCEL SIring:
ALEkI Objects
INFbI A|erts
c||cw: Ihe u:er Ic cLIcin IexIuc| inpuI frcm Ihe cpercIcr vic c
L|ccking c|erI which cverrice: c|| cIher inIerccIive ccIiviIie:.
Ihe c|erI ccn Le :ummcnec Ly Ihe c|erI meIhcc::
ll/|erI.lnpuI{ lprcmpI i: SIFlNG, lcefcu|I i: SIFlNG) i: SIFlNG
Excmp|e::
!!Alert.Error(You cannot do this!)
!!Alert.Message(Saving your data now)
!!Alert.Warning(Do not press this button again!)
!answer = !!Alert.Confirm(Are you sure?)
!answer = !!Alert.Question(OK to delete component?)
Con||rm /|erI reIurn::
'YES cr 'NO SIring:
Quest|on /|erI reIurn::
'YES cr 'NO cr 'CANCEL SIring:
Form Exerc|se 2
CrecIe Ihe fc||cwing fcrm. When :IreIchec:
Form Exerc|se 2
Ihe 'Choose Iemp|ote' |i:I gccgeI:
lI: ccnIenI: i: Lc:ec in cn cpIicn fi|e;
Fir:I rcw mecn: Ihe Nome cf Ihe Iemp|cIe
NexI rcw i: fcr Ihe ce:cripIicn
Ihirc rcw i: Ihe p|cI fi|e:
FcrIh rcw i: Ihe mccrc fi|e cf Ihe Iemp|cIe
Lc:I rcw mecn: hcw mcny crgumenI: cre neecec cf Ihe Iemp|cIe
Ihe |i:I cn|y :hcw: Ihe ncme cnc Ihe ce:cripIicn cf Ihe Iemp|cIe
Upcn chcc:ing ecch iIem cn Ihe |i:I:
Ihe p|cI fi|e wi|| chcnge Lc:ec cn Ihe p|cI fi|e cefinec in Ihe cpIicn fi|e
Ihe Icg cf Ihe frcme in Ihe pcrcmeIer: frcme wi|| c|:c chcnge Lc:e cn Ihe ncme
Di:cL|ing cnc encL|ing cf Ihe pcrcmeIer fie|c: cre c|:c hcnc|ec
Excmp|e {lf Ihe :e|ecIec Iemp|cIe: reuirec crgumenI: cre cn|y 2, Ihen pcrcmeIer fie|c 3 wi|| Le
ci:cL|ec cnc pcrcmeIer 1 cnc 2 wi|| Le encL|ec. Scme ccncepI: cpp|y Ic c||.)
Form Exerc|se 2
Ihe 'Creote' LuIIcn:
Upcn c|icking Ihi: LuIIcn:
Check vc|iciIy cf Ihe ncme :upp|iec {lf c|reccy exi:I:, eIc.)
Check vc|iciIy cf Ihe hiercrchy
Check if c|| reuirec fie|c: cf Ihe chc:en Iemp|cIe cre :upp|iec Ly Ihe u:er
lf :ucce::fu| Ic c|| checking, crecIe Ihe euipmenI cnc reverI Ihe fcrm:
mcce Ic iniIic|izcIicn mcce.
Fcrm c: iniIic|izec:
Ihe fir:I iIem i: Ihe cefcu|I :e|ecIicn cf Ihe fcrm
Ihi: mecn:, Ihe p|cI fi|e, pcrcmeIer frcme Icg cnc encL|ec/ci:cL|ec
pcrcmeIer fie|c: cre c|:c Lc:ec cn Ihe cefcu|I iIem :e|ecIec
Supp|iec fi|e::
Ihe cpIicn fi|e, p|cI fi|e:, cnc mccrc fi|e: wi|| Le :upp|iec.
lI i: ce|iverec IcgeIher wiIh Ihi: mcnuc| uncer Form Fxerc|se 2 fc|cer
Ihot's A|| Fo|ksI
DISCLAIMEk:
Ihi: guice i: fcr infcrmcIicn purpc:e cn|y. lI i:
reccmmencec IhcI u:er: fc||cwing Ihi: guice hcve
uncergcne Ircining fir:I.
Ycu mcy u:e Ihi: mcnuc| cI ycur cwn ri:k. ln nc
evenI :hc|| Ihe wriIer Le |icL|e fcr cny cirecI,
incirecI, incicenIc|, exemp|cry cr ccn:euenIic|
ccmcge:.
/|| excmp|e: in Ihi: guice cre Ie:Iec in FDMS 11.
SF3 cnc SF5.
Author: kome| E. Dogup|o
Emo||: rome|dhogzgmo||.com

You might also like