DC_MergeGetLists()

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

DC_MergeGetLists()

#1 Post by unixkd »

Hi Roger

In the program below, when I use @ ... DCSAY.. , the program execute without error, but when I use @ ... DCSAY ... GET the program gives error as indicated in the attachments.

#include "dcbitmap.ch"
#include "dcicon.ch"
#include "dcdialog.ch"
*
PROCEDURE Main()
Local GetList[0], Getoptions, cName := Space(40)
@ 1,1 DCSAY "My Name:" GET cName

GetList := PPS_Address(3,1,GetList)

DCGETOPTIONS NOMINBUTTON NOMAXBUTTON
DCREAD GUI OPTIONS GetOptions SETAPPWINDOW FIT MODAL ADDBUTTONS TITLE "Testing Merge Getlist"
Return
*
Function PPS_Address(nRow,nCol,aGetList)
Local GetList[0], aContactAddress[8], oGroup, aPrompt
aFill(aContactAddress, Space(50))
DEFAULT nRow := 1, nCol := 1
aPrompt := {"Street/Area","City/Town","State","Telephone Number", "E-Mail Address", "Fax Number", "Zip Code", "Web Site"}
@ nRow,nCol DCGROUP oGroup CAPTION "Contact Address" SIZE 62,10 FONT '12.Arial Bold'
nRow := 1
nCol := 15
For I := 1 To 8
@ nRow++,nCol DCSAY aPrompt+":" GET aContactAddress[1] ALIGNRIGHT RESIZE DCGUI_RESIZE_AUTORESIZE PROPER PARENT oGroup
// @ nRow++,nCol DCSAY aPrompt PARENT oGroup SAYSIZE 30 SAYFONT '10.Arial'
Next
aGetList := DC_MergeGetLists(aGetList, GetList )
Return(aGetList)
*
PROCEDURE APPSYS
RETURN

MergeGetlist1.png
MergeGetlist1.png (25.53 KiB) Viewed 8774 times
MergeGetlist2.png
MergeGetlist2.png (22.14 KiB) Viewed 8774 times

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC_MergeGetLists()

#2 Post by rdonnay »

DC_MergeGetLists() was not intended to be used for what you are trying to do.

This can be done much more simply.
Look at the below code.

Code: Select all

#include "dcbitmap.ch"
#include "dcicon.ch"
#include "dcdialog.ch"
*
PROCEDURE Main()
Local GetList[0], Getoptions, cName := Space(40)
@ 1,1 DCSAY "My Name:" GET cName

PPS_Address(3,1,GetList)

DCGETOPTIONS NOMINBUTTON NOMAXBUTTON

DCREAD GUI OPTIONS GetOptions SETAPPWINDOW FIT MODAL ADDBUTTONS ;
   TITLE "Testing Merge Getlist"

Return

* -------------

Function PPS_Address(nRow,nCol,GetList)

Local aContactAddress[8], oGroup, aPrompt

aFill(aContactAddress, Space(50))

DEFAULT nRow := 1, nCol := 1

aPrompt := {"Street/Area","City/Town","State","Telephone Number", "E-Mail Address", "Fax Number", "Zip Code", "Web Site"}
@ nRow,nCol DCGROUP oGroup CAPTION "Contact Address" SIZE 62,10 FONT '12.Arial Bold'
nRow := 1
nCol := 15

For I := 1 To 8
  @ nRow++,nCol DCSAY aPrompt[I]+":" GET aContactAddress[1] ;
   ALIGNRIGHT RESIZE DCGUI_RESIZE_AUTORESIZE PROPER PARENT oGroup
Next

RETURN nil


*
PROCEDURE APPSYS
RETURN
The eXpress train is coming - and it has more cars.

User avatar
hz_scotty
Posts: 107
Joined: Thu Jan 28, 2010 8:20 am
Location: Wr.Neustadt / Österreich

Re: DC_MergeGetLists()

#3 Post by hz_scotty »

Code: Select all

For I := 1 To 8
  @ nRow++,nCol DCSAY aPrompt[I]+":" GET aContactAddress[1] ;
   ALIGNRIGHT RESIZE DCGUI_RESIZE_AUTORESIZE PROPER PARENT oGroup
Next
i think ;)

Code: Select all

@ nRow++,nCol DCSAY aPrompt[I]+":" GET aContactAddress[I] ;
aContactAddress

thats right - or?
best regards
Hans

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC_MergeGetLists()

#4 Post by rdonnay »

Yes, that was a typo. Should be I.
The eXpress train is coming - and it has more cars.

Post Reply