No Veo El Resultado En La Clase Resultado.ReadOnly


Subject: No Veo El Resultado En La Clase Resultado.ReadOnly
Este código lo llevo haciendo dende domingo, hoy le he vuelto a meter mano pero me esta llevando buen tiempo, yo quiero poner el resultado del comando curl para http en una text area, el programa no me esta dando error sin embargo en donde tengo la textarea no me salen las lineas publicas del comando.

Ya le he dado tantas vueltas que ya no se bien que cambios hice pero ya lo reescribi varias veces, para la linea de resultado del comando y asignancion de texto.

Aver si lo termino, (sino voy haciendo algo lo que aprendo me olvido por eso voy viendo tutos y haciendo algo siempre y cuando tenga una idea de que hacer)




Public Sub Form_Open()

TextAreaResultado.ReadOnly = True
End


Public Sub Button1_Click()
Dim resultado As Process
resultado To TextAreaResultado.ReadOnly = Exec ["curl", "https://www.kernel.org/finger_banner"] As "resultado"
End
Private Sub resultado_Read(resultado As String) 'saida de leitura correcta
Print "resultado_Read & resultado"
End

Private Sub resultado_Error(resultado As String) 'se houver erro em leitura
Print "resultado_Error & resultado"
End

Public Sub resultado_Kill()
Print "Terminado"
End


Public Sub TextAreaResultado_ReadOnly()


End

Profile PM  
Subject: Re: No Veo El Resultado En La Clase Resultado.ReadOnly
Portaro:

Si miras la documentación estas mezclando cosas ( ver http://gambasdoc.org/help/lang/exec?v3 )

Para que recoga la informacion o lo haces por procesos o por "to".

Si usas "to" deberia de funcionarte asi:
dim salida as string
Exec ["curl", "https://www.kernel.org/finger_banner"] To salida
TextAreaResultado.text=salida


Saludos

Subject: Re: No Veo El Resultado En La Clase Resultado.ReadOnly
Gracias me funciono

' gambas class file

Public Sub Form_Open()
TextAreaResultado.ReadOnly = True
End


Public Sub Button1_Click()
Dim resultado As String
Exec ["curl", "https://www.kernel.org/finger_banner"] To resultado
TextAreaResultado.text = resultado
End
Private Sub resultado_Read(resultado As String) 'saida de leitura correcta
Print "resultado_Read & resultado"
End

Private Sub resultado_Error(resultado As String) 'se houver erro em leitura
Print "resultado_Error & resultado"
End

Public Sub resultado_Kill()
Print "Terminado"
End


Public Sub TextAreaResultado_ReadOnly()

End

Profile PM  
Subject: Re: No Veo El Resultado En La Clase Resultado.ReadOnly
portaro:

Esta parte de tu codigo no hace nada:
Private Sub resultado_Read(resultado As String) 'saida de leitura correcta
Print "resultado_Read & resultado"
End

Private Sub resultado_Error(resultado As String) 'se houver erro em leitura
Print "resultado_Error & resultado"
End

Public Sub resultado_Kill()
Print "Terminado"
End


Public Sub TextAreaResultado_ReadOnly()

End

Lo debes quitar, para no confundirte.


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Design by DiDiDaDo

Generation Time: 0.1088s (PHP: -19% SQL: 119%)
SQL queries: 22 - Debug Off - GZIP Enabled