COnsider the following code .. I have two prompts ( say ) on a dialog and I am using those as markers to click on to open an intranet link. For some reason The oSay1 object is not being evaluated .. bLclicked is always returning the oSay object .. the cManual link line is not being run .. however if I rem out the oSay:bLclicked line .. the second shellexecute containing cManual fires and works fine.
Rick Lipkin
here is the code
- Code: Select all Expand view
//-------------------------
Static Func _Webhelp( cOLDDEFA, dEXE )
LOCAL oDLG, cSQL, oERR, oRsUser, cLINK, cMANUAL
LOCAL oBRU, oSAY,oSAY1,oSAY2
cLINK := " "
cMANUAL := " "
oRsOwn := TOleAuto():New( "ADODB.Recordset" )
oRsOwn:CursorType := 1 // opendkeyset
oRsOwn:CursorLocation := 3 // local cache
oRsOwn:LockType := 3 // lockoportunistic
cSQL := "SELECT HELP_URL, MANUAL_URL FROM OWNER"
TRY
oRSOwn:Open( cSQL,'Provider='+xPROVIDER+';Data Source='+xSOURCE+';Initial Catalog='+xCATALOG+';User Id='+xUSERID+';Password='+xPASSWORD )
CATCH oErr
MsgInfo( "ERROR Opening Table OWNER" )
END TRY
IF oRsOwn:eof
ELSE
cLINK := oRsOwn:Fields("help_url"):Value
cMANUAL := oRsOwn:Fields("manual_url"):Value
IF EMPTY( cLINK )
cLINK := " "
ELSE
cLINK := ALLTRIM( cLINK )
ENDIF
IF EMPTY( cMANUAL )
cMANUAL := " "
ELSE
cMANUAL := ALLTRIM( cMANUAL )
ENDIF
ENDIF
oRsOwn:Close()
DEFINE BRUSH oBru FILENAME ( cOLDDEFA+"\SPLASH.BMP" )
DEFINE DIALOG oDLG ;
TITLE "About" ;
SIZE 500, 320 BRUSH oBRU TRANSPARENT
@ 3,2 SAY oSay PROMPT "Click here for PMO Help on the Intranet" ;
PIXEL of oDLG COLOR "W+/W"
oDlg:aControls[ 1 ]:lTransparent = .t.
@ 3,165 SAY oSay1 PROMPT "Click here for On-Line User Manual" ;
PIXEL of oDLG COLOR "W+/W"
oDlg:aControls[ 2 ]:lTransparent = .t.
@ 150,2 SAY oSay2 PROMPT "Revision Date "+dtoc( dEXE )+;
" "+FWVERSION+" "+VERSION() PIXEL of oDLG COLOR "W+/W"
oDlg:aControls[ 3 ]:lTransparent = .t.
oSay1:lWantClick = .T.
oSay1:bLClicked = { || SHELLEXECUTE(nil,"open", cMANUAL,0,0,1) }
oSay:lWantClick = .T.
oSay:bLClicked = { || SHELLEXECUTE(nil,"open", cLINK,0,0,1) }
ACTIVATE DIALOG oDLG CENTERED
RETURN(NIL)