Anybody having issue with web-debugging?

Post

Posted
Rating:
#1 (In Topic #842)
Trainee
 Hello,

A couple of days ago I got an update for gambas. Since then, when I press "play" in my web-project, instead of opening the browser using gambas internal web server, it just shows me the html text in the debug window below in the IDE.
¿Is it not possible anymore to test web apps?

However, if I compile and place the .gambas file in my htdocs directory, it plays nicely and does what it is supposed to do.

I feel more lost than a penguin in Vegas…
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Guru
cogier is in the usergroup ‘Guru’
Can you post an example of your code?
Online now: No Back to the top

Post

Posted
Rating:
#3
Trainee
I used the pre-defined form that you get once you create a new web project. Nothing added.

Code

'Gambas class file
Export

Public Sub WebButton1_Click()
  Message("This is a message box.")
End

Public Sub WebTimer1_Timer()
  WebLabel1.Text = Format(Now, "hh:nn:ss")
End

Public Sub WebForm_Open()
  WebTimer1_Timer
End
Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Guru
cogier is in the usergroup ‘Guru’
You need to switch on the HTTP server. From the Debug Menu select Configuration.. and turn on the HTTP server.

<IMG src="https://www.cogier.com/gambas/WebServer.png"> </IMG>

I changed your code slightly: -

Code (gambas)

  1. ' Gambas class file
  2.  
  3.  
  4. Public Sub WebButton1_Click()
  5.  
  6.   Message("This is a message box.")
  7.  
  8.  
  9. Public Sub WebTimer1_Timer()
  10.  
  11.   WebLabel1.Text = Format(Now, "hh:nn:ss")
  12.  
  13.  
  14. Public Sub WebForm_Open()
  15.  
  16.   WebTimer1.Start
  17.  

Forum tip: - Use the 'gb' button when adding code, it looks better.
<IMG src="https://www.cogier.com/gambas/gb_button.png"> </IMG>
Online now: No Back to the top

Post

Posted
Rating:
#5
Trainee
 THANK YOU!

You are a life saver, and will do code button next time.
Online now: No Back to the top
1 guest and 0 members have just viewed this.