Página 1 de 1

Alert() no Harbour nao aceita o delay?

Enviado: 23 Fev 2015 18:20
por ANDRIL
Me deparei com isso.

Tenho o código abaixo funcionando ok no xharbour 1.0.0 aguardando os 5s e fechando automaticamente, no Harbour 3.0 e 3.2 o mesmo não funciona fica aguardando que tecle algo.

Código: Selecionar todos

Alert("Alert usando 5 segundos de pausa!",nil,"w+/b",5)
ou 
Alert("Alert usando 5 segundos de pausa!",,"w+/b",5)
Coloquei o #include "hbcompat.ch", mesmo assim, não consertou. Tem que linkar algo para que funcione como no xharbour?
ALERT()
Display a dialog box with a message

Syntax
ALERT( <xMessage>, [<aOptions>], [<cColorNorm>], [<nDelay>] ) --> nChoice or NIL

Argument(s)
<xMessage> Message to display in the dialog box. <xMessage> can be of any Harbour type. If <xMessage> is an array of Character strings, each element would be displayed in a new line. If <xMessage> is a Character string, you could split the message to several lines by placing a semicolon (;) in the desired places.

<aOptions> Array with available response. Each element should be Character string. If omitted, default is { "Ok" }.

<cColorNorm> Color string to paint the dialog box with. If omitted, default color is "W+/R".

<nDelay> Number of seconds to wait to user response before abort. Default value is 0, that wait forever.
fonte:http://www.fivetechsoft.com/harbour-docs/api.html#alert
Ate+

Alert() no Harbour nao aceita o delay?

Enviado: 23 Fev 2015 18:22
por Pablo César
Você experimentou com HB_Alert ?

HB_Alert( <xMessage>, [<aOptions>], [<cColor>], [<nDelay>] ) --> nChoice

Alert() no Harbour nao aceita o delay?

Enviado: 23 Fev 2015 19:36
por ANDRIL
Pablo César escreveu:Você experimentou com HB_Alert ?
Grande Pablo, deu certo. Muito obrigado.
:)Pos

Alert() no Harbour nao aceita o delay?

Enviado: 23 Fev 2015 22:45
por alxsts
Olá!

Só um adendo: o primeiro parâmetro aceito pela função Hb_Alert() é do tipo array. Cada elemento deste array se torna uma linha no box de mensagem exibido.

Código: Selecionar todos

HB_Alert( <aMessage>, [<aOptions>], [<cColor>], [<nDelay>] ) --> nChoice

Alert() no Harbour nao aceita o delay?

Enviado: 23 Fev 2015 22:59
por Pablo César
alxsts escreveu:Só um adendo: o primeiro parâmetro aceito pela função Hb_Alert() é do tipo array.
Legal, não tinha notado.

Mais outro adendo: o primeiro parâmetro aceito pela função Hb_Alert() tambem pode ser do tipo array (ou não).

Mas bem observado Alexandre !

Alert() no Harbour nao aceita o delay?

Enviado: 23 Fev 2015 23:24
por alxsts
Olá!

Bem observado (não testei). Agora entendi o porque do x em <xMessage>. O tratamento é feito internamente, dependendo do tipo de dados passado, permitindo assim várias linhas de mensagem ou apenas uma.