Página 1 de 3

Warning sobre a Xhb

Enviado: 08 Jun 2017 17:40
por asimoes
WARNING for XHB contrib users

Mais um com os dias contados!

Quem não trocou funções/comandos xHarbour chegou a hora de trocar

Warning sobre a Xhb

Enviado: 08 Jun 2017 18:11
por JoséQuintas
Essa notícia é ótima.
xhb causa problemas.
só assim pra não usarem mais.

Mas aonde viu isso?

Warning sobre a Xhb

Enviado: 08 Jun 2017 18:17
por JoséQuintas
Achei, o warning.txt na pasta xhb.
Foi o que sempre comentei por aqui.... rs
Agora as LIBs gráficas devem se consertar também, porque adoram usar isso.... rs
WARNING for XHB contrib users
=============================

This contrib is deprecated and not maintained anymore.

This was originally meant as a temporary stop-gap solution to help migrating
existing code written for xHarbour to Harbour, plus a means of documenting
the differences between the these two branches of the language. The
recommended path is to gradually migrate to use native core Harbour functions
and core language elements, then finalize that process by dropping the need
for this library.

Linking this library and/or using its headers (`hbcompat.ch` and `xhb.ch` in
particular) may cause various unintended side-effects both at compilation
and runtime.

Most of this code is also never tested by this fork, and none of it is ever
used, so the chances of bugs is higher than in other parts of Harbour.

If you can't do without some parts of this code, feel free to fork it locally
or publicly and continue maintaining it there, otherwise try switching to
core Harbour functionality ASAP.

-Viktor

Warning sobre a Xhb

Enviado: 08 Jun 2017 18:27
por JoséQuintas
Só reforçando o que o Viktor disse, pra ninguém ficar desesperado:

Ela não está sendo atuaiizada, e causa problemas.

TUDO que entra no Harbour continua existindo pra sempre, porque TODA história do Harbour fica gravada no GITHUB.

Significa que mesmo que a XHB seja retirada, ela pode ser "ressuscitada".

Lógico, o melhor é deixar de usar de vez, e fica resolvido.

Warning sobre a Xhb

Enviado: 08 Jun 2017 18:56
por Itamar M. Lins Jr.
Ola!
O X só deu problemas... atrapalhou mais do que ajudou. Escrevi minha opinião lá do forum da Hwgui esses dias.
Como diria o Raul!
$$$$ Muita estrela pouca constelação. $$$$
A festa é boa tem alguém que tá bancando
Que lhe elogia enquanto vai se embriagando
E o tal do ego vai ficar lá nas alturas
Usar brinquinho pra romper as estruturas
...
Eu sei até que parece sério, mas é tudo armação
O problema é: muita estrela, prá pouca constelação
...
Saudações,
Itamar M. Lins Jr.

Warning sobre a Xhb

Enviado: 08 Jun 2017 19:25
por fladimir
Removi o xhb.hbc e apresentou falta de várias funções.

algumas estou pesquisando na web e localizando exemplo GetPrinters()......... Win_PrinterList()

Agora outras como hb_dumpvar() não sei por qual substituir...

Alguém tem um manual ou link ou algo q auxilie na correlação das funções?

pesquisando via hbmk2 -find dump aparece StrDump() q pertence a hbmisc.hbc... mas não sei exatamente se seria o mais indicado.

Alguém poderia auxilar? abaixo lista do q terei q mudar tb
Lista do q terei q mudar
Lista do q terei q mudar

Warning sobre a Xhb

Enviado: 08 Jun 2017 20:10
por asimoes
Para mim deu isso

hbmk2: Hint: Add input file 'xhb.hbc' for missing Harbour function(s):
hb_IsNIL(), Occurs(), ValToPrg(), IsAscii(), IsDirectory(),
hb_osNewLine(), hb_osPathSeparator()
hbmk2: Hint: Add input file 'hbfoxpro.hbc' for missing Harbour function(s):
Occurs()

No changelog descobri isso sobre hb_IsNil:

2014-02-25 19:15 UTC+0100 Viktor Szakáts (vszakats users.noreply.github.com)
* contrib/xhb/xhb.hbx
* include/harbour.hbx
* updated after turning off HB_LEGACY_LEVEL5.
to recap:
- HB_ISNIL() moved to xhb.hbc

Vai ter que resolver também as libs que ainda não estão com WARNING

Warning sobre a Xhb

Enviado: 08 Jun 2017 20:29
por asimoes
Tem mais coisa pra resolver:


- HB_ISNIL() moved to xhb.hbc

HB_ISNIL é usada em muitos fontes, qual é a função equivalente ?

Warning sobre a Xhb

Enviado: 08 Jun 2017 20:53
por JoséQuintas
IF HB_ISNIL( var )
IF var == NIL

Não dá praticamente no mesmo?

Warning sobre a Xhb

Enviado: 08 Jun 2017 21:09
por cl@udio
Boa noite
Para mim foram estas.
Sera que existe algum arquivo em que consta as equivalentes em harbour.
Vamos a procura para alterar estas funcoes.
[]s

Warning sobre a Xhb

Enviado: 08 Jun 2017 21:39
por JoséQuintas
O hbmk2 pode ajudar.
hbmk2 -find process

Harbour core (installed):
hb_processClose()
hb_processOpen()
hb_processRun()
hb_processValue()
__pp_Process()
hbmk2 -find inet

Harbour core (installed):
hb_inetAccept()
hb_inetAddress()
hb_inetCleanup()
hb_inetClearError()
hb_inetClearPeriodCallback()
hb_inetClearTimeLimit()
hb_inetClearTimeout()
hb_inetClose()
hb_inetCompress()
hb_inetConnect()
hb_inetConnectIP()
hb_inetCount()
hb_inetCreate()
hb_inetCRLF()
hb_inetDataReady()
hb_inetDGram()
hb_inetDGramBind()
hb_inetDGramRecv()
hb_inetDGramSend()
hb_inetErrorCode()
...

Warning sobre a Xhb

Enviado: 08 Jun 2017 21:46
por JoséQuintas
Talvez até melhor pensar em trocar a rotina, e não apenas a função.

Estranhei:

hb_ToLogFile()
hb_backgroundActive()
hb_OpenProcess()
hb_ThreadSleep()

E ExcelWriterXml() não é de xhb, pelo menos não está mostrando aí como sendo parte de shb.

Warning sobre a Xhb

Enviado: 08 Jun 2017 22:00
por cl@udio
Acho que seria este arquivo para ajudar.
hbcompat.ch

JoseQuintas
Algumas coisas vou verificar, pois antes nao acusava nada.

[]s

Warning sobre a Xhb

Enviado: 09 Jun 2017 00:46
por fladimir
retirando o hbcompat.ch e o xhb.hbc conforme a imagem algumas funções não foram localizadas

Segue o q já identifquei através de pesquisas e tb usando o hbmk2 - find partedonome.... e tb o q ainda falta

Código: Selecionar todos

PrinterPortToname() ==> win_printerPortToName()    
GetDefaultPrinter() ==> win_printergetdefault()   
PrintFileRaw()      ==> win_printeFileRaw()  
ThreadSleep()       ==> hb_idleSleep()            
TToS()              ==> hb_TToS()               
NumToHex()          ==> hb_NumToHex()            
IsDirectory()       ==> hb_DirExists()            
CStr()              ==> hb_CStr()   
inetGetHosts()      ==> hb_inetGetHosts() 
inetClose()         ==> hb_inetClose()  
inetCleanup()       ==> hb_inetCleanup() 
inetErrorCode()     ==> hb_inetErrorCode()
inetConnectIP()     ==> hb_inetConnectIP() 
inetTimeOut()       ==> inetSetTimeout() 
inetCreate()        ==> hb_inetCreate()
inetInit()          ==> hb_inetInit()
hb_WriteIni()       ==> hb_iniWrite() 
hb_ReadIni()        ==> hb_IniRead()          
HGetValues()        ==> hb_HValues() 
HGet()              ==> hb_HGet() 
HGetKeys()          ==> hb_HKeys() 
HDelAt()            ==> hb_HDelAt()    
HGetPos()           ==> hb_HPos()      
HHasKey()           ==> hb_HHasKey()   
Hash()              ==> hb_Hash()      
Win32Bmp()          ==> win_BMP()      
TOleAuto()          ==> win_oleAuto()  
CreateObject()      ==> win_oleCreateObject() 
GetActiveObject()   ==> win_oleGetActiveObject() 

FALTAM:
=======
TXMLIterator()
TXMLDocument()
hb_DumpVar() 
hb_QWith() 
ValToPrg() 
hb_Crypt() 
hb_Decrypt()
hb_osNewLine() 
HB_ISNIL()
hb_osPathSeparator()
hb_backgroundDel() 
hb_backgroundRun()
hb_backgroundAdd()


Warning sobre a Xhb

Enviado: 09 Jun 2017 08:23
por rubens
Tô bonito então... !!!
O Fladimir já fez minha lição de casa ....
X:)