Após conseguir compilar uma aplicação inteira com o xHarbour (precisei apenas alterar as chamadas para a função DBEdit que diferiam do Clipper 5.3c), quase tudo funcionou corretamente...
Meu maior problema está na mensagem de erro que aparece ao se clicar com o mouse (ou mesmo usar a tecla Alt+tecla definida) em um simples PushButton em um edit normal...
O Código a seguir ilustra isso:
Código: Selecionar todos
Function Main()
// ************************************* Apenas para teste aqui...
// Constantes
False := .F.
True := .T.
cr := chr(13)
lf := chr(10)
esc := chr(27)
Clear Screen
sNome := ' '
sEnde := ' '
bBotao1 := False
bBotao2 := False
bBotao3 := False
bBotao4 := False
bBotao5 := False
bSaveBtn := False
bExitBtn := False
@ 15, 10 Say 'Nome....:' Get sNome Picture '@!'
@ 16, 10 Say 'Endereco:' Get sEnde Picture '@!'
@ 17, 10 Get bSaveBtn PUSHBUTTON ;
Caption 'Sal&var' ;
Color 'BG+/B, N/W+, BG+/B+, GR+/N+' ;
State{ || bBtn(1) .and. ReadKill(True) } ;
Style '()' ;
Message 'Clique neste botão para salvar ou tecle ALT+V'
@ 17, 20 Get bExitBtn PUSHBUTTON ;
Caption 'Sai&r' ;
Color 'BG+/B, N/W+, BG+/B+, GR+/N+' ;
State{ || bBtn(2) .and. ReadKill(True) } ;
Style '()' ;
Message 'Clique neste botão para sair ou tecla ALT+R'
Read
If bBotao1
Alert('Ok... salvar os dados...')
ElseIf bBotao2
Alert('Sair sem salvar...')
Else
Alert('Nao foram pressionados os botoes Salvar ou Sair...')
EndIf
// *************************************
AbreFat()
Quit
Function bBtn
Parameter iButton
bBotao1 := False
bBotao2 := False
bBotao3 := False
bBotao4 := False
bBotao5 := False
If iButton=1
bBotao1 := True
ElseIf iButton=2
bBotao2 := True
ElseIf iButton=3
bBotao3 := True
ElseIf iButton=4
bBotao4 := True
ElseIf iButton=5
bBotao5 := True
EndIf
Return .t.
Mas se pressionamos Alt+v ou Alt+r, ou mesmo clicamos com o botão do Mouse em uma dessas opções, recebemos esta mensagem de erro:
Error BASE/1604 Argument error: SWITCH Arguments: ( [ 1]
= Type: U)
Quit
Error at ...: HBGETLIST:SETTLE(778) in Module: tgetlist.prg
Called from : READMODAL(144) in Module: getsys.prg
Called from : MAIN(57) in Module: FATNTX.PRG
Então... o que é preciso fazer para usar o PushButton em um Edit? (ou isso não é possível?)...
Grato por qualquer ajuda!
