You are on page 1of 4

6/26/2017 arraycollectionandappendingPage2

Welcome, SSGUNAM Notifications MyProfile Settings LogOut

Forum

NewPosts PrivateMessages FAQ Calendar Community ForumActions QuickLinks AdvancedSearch

Forum PDMS/E3DForum PMLandPML2 arraycollectionandappending

Results11to20of20 Page2of2 First 1 2


+ReplytoThread
Thread:arraycollectionandappending

ViewFirstUnread ThreadTools SearchThread Display

3DaysAgo #11

lippy Higuys,
IhavecreatedaformwithagadgetlistandabuttonADDCE.
PipeLevel
EachtimewhenADDCEbuttonispressedIwanttostorethe
lippy'sAvatar nameofcurrentelementinaarrayvar.butuntilnowIcan'tstore
JoinDate: Mar2010 inaarrayvariablemorethenonename.
Location: europe
Posts: 90 Thisishowmycodelookslike

definemethod.AddCe()

!listmembers=array()
!Result=array()
!elem=array()

ifTYPEofCEneq'STRU'then
!!Alert.Message('PleaseSelectaSTRU')

else

!elem[1][1]=NAMN
!elem[1][2]=NAMNOFZONE

do!ifrom1to!elem.size()
qvar!elem[$!i]
!Result.append(!elem[!i])

enddo

!listmembers.append(!Result[$!i])

!this.Lst.setRows(!listmembers)

endif
endmethod

WhatI'mdoingwrong???

Reply ReplyWithQuote

http://www.avevaworldforum.com/showthread.php?t=11546&page=2 1/4
6/26/2017 arraycollectionandappendingPage2

3DaysAgo #12

L HiLippy,
BranchMember
Whenyoudo!listmembers.append(!Result[$!i]),youaddonly
L'sAvatar thelastmemberofResult(youareoutofyourloop,sotheivalue
JoinDate: Mar2017 isequaltohislastvalue).
Location: FRANCE
Posts: 7 IfyouwanttoaddtheResultarrayinsidetheListmembersarray,
youhavetodo!listmembers.append(!Result)
LEO

Reply ReplyWithQuote

3DaysAgo #13

lippy HiLeo,
PipeLevel
Thanksforyouradvicebuttheresultisthesame
lippy'sAvatar

JoinDate: Mar2010
Location: europe
Posts: 90

Reply ReplyWithQuote

3DaysAgo #14

L Eachtimeyoucallthemethod".AddCe",youdefineyourarray:
BranchMember
!listmembers=array()
L'sAvatar

JoinDate: Mar2017 Whenyoudothis,yourarrayisemptied.


Location: FRANCE
Posts: 7 Trytodefineyourarrayintheformmethod:

member.listmembersisARRAY

Andworkwiththisarrayinyour"AddCe"method.

!this.listmembers.append(!Result[$!i])

Reply ReplyWithQuote

3DaysAgo #15

lippy definemethod.AddCe()
PipeLevel
member.listmembersisARRAY
lippy'sAvatar
!Result=array()
JoinDate: Mar2010 !elem=array()
Location: europe
Posts: 90 ifTYPEofCEneq'STRU'then
!!Alert.Message('PleaseSelectaSTRU')

else

!elem[1]=NAMN
!elem[1][2]=NAMNOFZONE

do!ifrom1to!elem.size()
qvar!elem[$!i]
!Result.append(!elem[!i])
qvar!Result
enddo

!this.listmembers.append(!Result[$!i])
!this.Lst.setRows(!listmembers)

http://www.avevaworldforum.com/showthread.php?t=11546&page=2 2/4
6/26/2017 arraycollectionandappendingPage2

endif
endmethod

ThisishowitlooksnowbutIreceivetheerror
(46,93)PML:Noobjectdefinitioninprogress.
Inline62ofPMLfunctionaeposnr.ADDCE
member.listmembersisARRAY
Calledfromline1ofCommand/FormCallbackCommand
!this.ADDCE()

Reply ReplyWithQuote

3DaysAgo #16

L Thecreationofthemembermustbeintheformdefinition.
BranchMember
Example:
L'sAvatar

JoinDate: Mar2017 setupform!!testdialogdockingR


Location: FRANCE
Posts: 7 gadgetsdefinition...

member.listmembersisARRAY

exit

Then,usethismemberinyourmethod.AddCe():

!this.listmembers.append(!Result[$!i])
!this.Lst.setRows(!this.listmembers)

Reply ReplyWithQuote

3DaysAgo #17

lippy (61,616)F&M:Arrayinvalid:heterogeneous,wrongtypeorsparse
Inline84ofPMLfunctionaeposnr.ADDCE
PipeLevel
!this.posnoLst.setRows(!this.listmembers)
lippy'sAvatar
Calledfromline1ofCommand/FormCallbackCommand
JoinDate: Mar2010 !this.ADDCE()
Location: europe
Posts: 90 ThisiswhatIgetnow,butlistmembersvarispopulatedwithall
elementsonwhichIclickedADDCE

Reply ReplyWithQuote

3DaysAgo #18

L Trythis:
BranchMember
definemethod.addCe()
L'sAvatar

JoinDate: Mar2017 !elem[1]=NAMN


Location: FRANCE !elem[2]=NAMNOFOWNER
Posts: 7
!this.listmembers.append(!elem)

!this.Lst.setRows(!this.listmembers)

endmethod

Reply ReplyWithQuote

3DaysAgo #19

lippy Itworked!!!Thankyouverymuch,cheers!!!!
PipeLevel

http://www.avevaworldforum.com/showthread.php?t=11546&page=2 3/4
6/26/2017 arraycollectionandappendingPage2

lippy'sAvatar

JoinDate: Mar2010
Location: europe
Posts: 90

Reply ReplyWithQuote

2DaysAgo #20

L Perfect!
BranchMember
EachvalueofthearrayyoucallinsetRows()mustbeanarray
L'sAvatar thatcontainsthedifferentsvaluesofyourrow.
JoinDate: Mar2017
Location: FRANCE
Posts: 7

Reply ReplyWithQuote

+ReplytoThread Page2of2 First 1 2

QuickNavigation PMLandPML2 Top

QuickReply

PostQuickReply GoAdvanced Cancel

PreviousThread|NextThread

PostingPermissions
Youmaypostnewthreads BBcodeisOn
Youmaypostreplies SmiliesareOn
Youmaypostattachments [IMG]codeisOn
Youmaynotedityourposts [VIDEO]codeisOn
HTMLcodeisOff
ForumRules

English(US) ContactUs AvevaWorldForum Archive TermsofService Top

AlltimesareGMT+6.5.Thetimenowis12:22.

PoweredbyvBulletinVersion4.2.4
Copyright2017vBulletinSolutions,Inc.Allrightsreserved.

ThisforumwebsiteisoperatedbyAVEVAemployees.

http://www.avevaworldforum.com/showthread.php?t=11546&page=2 4/4

You might also like