FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour GET with ACTION not Jumping to the desired GET Object
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
GET with ACTION not Jumping to the desired GET Object
Posted: Tue Mar 24, 2009 11:32 AM
Hi Friends,

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 (fw): Select all Collapse
*--------------------------------------------*
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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: GET with ACTION not Jumping to the desired GET Object
Posted: Tue Mar 24, 2009 11:54 AM
Code (fw): Select all Collapse
@1,16 GET oGetFile VAR cXlsFile SIZE 130,12 ;
      ACTION (cXlsFile:=cGetFile( "*.xls", "Please select a Excel file" ), ;
              oGetStartRow:PostMsg( WM_SETFOCUS ) )


EMG
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: GET with ACTION not Jumping to the desired GET Object
Posted: Tue Mar 24, 2009 12:03 PM

Dear Mr.EMG,

Thankyou. With the PostMsg( WM_SETFOCUS ) It is working fine now. Is it the ACTION button associated with the GET that is blocking the regular oGet:oJump and oGet:SetFocus(). I am bit confused regarding where to use what, I mean oGet:SetFocus() or oGet:PostMsg( WM_SETFOCUS )

Regards

Anser

Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: GET with ACTION not Jumping to the desired GET Object
Posted: Tue Mar 24, 2009 12:09 PM

Dear EMG,

Now another problem, after the PostMsg( WM_SETFOCUS ) is executed the cursor is getting displayed at the desired get ie the 3rd one ie oGetStartRow , but whatever I type using the keyboard is appearing on the 1st GET.

The hair (EDIT) cursor is on the 3rd GET and whatever I type using the keyboard is appearing in the 1st GET

Regards

Anser

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: GET with ACTION not Jumping to the desired GET Object
Posted: Tue Mar 24, 2009 12:34 PM
Code (fw): Select all Collapse
@1,16 GET oGetFile VAR cXlsFile SIZE 130,12 ;
      ACTION (cXlsFile:=cGetFile( "*.xls", "Please select a Excel file" ), ;
                   oGetFile:oBtn:oJump:=oGetStartRow )


EMG
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: GET with ACTION not Jumping to the desired GET Object
Posted: Wed Mar 25, 2009 04:42 AM
Dear Mr.EMG

oGetFile:=oGetStartRow solved the problem

Thankyou

Regards

Anser

Continue the discussion