I don't know where I have went wrong. The oJump of the GetObject is not functioning as expected.
In my DIALOG I have 5 GET Objects. In my 1st GET Object I have an ACTION clause.
When the user clicks on the BUTTON associated with the 1st GET object , I am calling cGetFile function to select a file. After the file is selected, I need to jump/set focus to the 3rd get object in the Dialog.
Unfortunately even after giving the oJump and SetFoucs, the cursor is remaining at the 1st GET itself
Here is the Sample code
- Code: Select all Expand view
- *--------------------------------------------*
Function Main()
*--------------------------------------------*
Local oDlg,oBtnSend,oBtnStop,oGetFile,oGetNoIds,oGetStartRow,oGetAttachments,oGetHtml,oGetProcessOnly
Local cXlsFile:=spac(100),nNoIds:=0,nStartRow:=2,nProcessOnly:=250,cAttachment:=spac(100),cHtmlFile:=spac(100)
SetBalloon(.T.)
DEFINE DIALOG oDlg TITLE "Regal Bulk Mail Sender" FROM 1,1 to 35,120 TRANSPARENT
@0.9,1 say "Excel File containing Email Id's"
@1.8,1 say "No of Email Id's found in the Excel File"
@2.7,1 Say "Please specify the starting row in Excel"
@3.5,1 SAY "No of email id's to be processed from the start row"
@4.4,1 SAY "Attachments"
@5.3,1 say "Mail HTML File"
@1,16 GET oGetFile VAR cXlsFile SIZE 130,12 ;
ACTION (cXlsFile:=cGetFile( "*.xls", "Please select a Excel file" ), ;
oGetFile:oJump:=oGetStartRow,oGetStartRow:SetFocus() )
@2,16 GET oGetNoIds VAR nNoIds PICTURE "999999" RIGHT WHEN .F. UPDATE
@3,16 GET oGetStartRow VAR nStartRow PICTURE "999999" RIGHT UPDATE
@4,16 GET oGetProcessOnly VAR nProcessOnly PICTURE "999999" RIGHT UPDATE
@5,16 GET oGetAttachments VAR cAttachment SIZE 130,12 ACTION (cAttachment:=cGetFile( "*.*", "Please select the file to be attached" ) )
@6,16 GET oGetHtml VAR cHtmlFile size 130,12 ACTION (cAttachment:=cGetFile( "*.html", "Please select the Email Draft file" ) )
@7,10 BUTTONBMP oBtnSend PROMPT "Start Sending" SIZE 56,20 ACTION oBtnSend:Disable()
@7,22 BUTTONBMP oBtnStop PROMPT "Stop Sending" SIZE 56,20 ACTION oBtnSend:Enable()
ACTIVATE DIALOG oDlg
Return NIL
Any Idea where I have went wrong. I have also tries oDlg:Update(), Sysrefresh() in the ACTION clause of the 1st GETbut found no difference.
Regards
Anser