Web workflow steps

So I preface this in that I have already watched the beginning how to on building a web app. So I have started my app and have it somewhat functional - simple timer running to read a mySQL db and update the screen. Trying to do some resizing of rectangles not he screen with height being reflective of the contents of one fo the db fields. Seems simple enough but my resizing with .top .width .height doesn’t do anything to my rectangles. The coloring seems to work however. So that is my problem to solve but I am really wanting to understand on how the web workflow works with regard to development. What events are fired and when and when does the screen refresh take place. How to close the app and stop the app from running in Xojo…hoping to find some additional instructional video to fill in the gaps that I have for the web perspective.

Thank in advance.

I haven’t been able to reproduce an issue with the framework setting the height of a rectangle by means of a timer. Here’s a demo project that might help: Timer Test.xojo_xml_project

As I haven’t been able to reproduce an issue with timer + rectangle, I think you might want to review your database reading code before diving down the path of WebControl.UpdateBrowser

Your last posts were about CGI, are you still wondering this about CGI and a shared host or are you looking at Web 2.0?

WebApplication.Quit will quit the application from code. If you’re using CGI or have configured something to automatically re-start your application, you’ll need to stop those configurations too.

I make an app called Lifeboat which can help simplify the deploy process. I even offer short 3 minute videos on how to deploy. Lifeboat can manage multiple web apps on one server, start and stop them with a click, and many more cool things.

Perhaps if you post your project another set of eyes might spot an error?

Tim, you just need to add this line:

ctlRect.BackgroundColor = color.Blue

to your Run event and you will see that the rectangle doesn’t change size because it reverts back to the defaults set in the IDE.

Same happens with Label, and other controls like Buttons, etc. See Bug while trying to move text? and case 61757

Edit: as mentioned by Hector Marroquin, you can add another line:

ctlRect.UpdateBrowser

but sometimes you can see it “refresh or glitch” because the rectangle is resized to the IDE settings and then again to the new height set by your timer.

1 Like

Interesting turn of events! Thanks for the update :slight_smile:

1 Like

To answer your question, there is a bug in Xojo Web for several controls, you can change the position, width, height as long as you don’t change other properties like color, text, caption. If you change one or more of those properties the position, width, height will return to the values set in the IDE.

You can use the line .UpdateBrowser to force the change and maybe the users will not mind the fast change to the default position and the new position (or height).

Awesome - It did feel like a bug - seems a significant one at that. I will have to try the .updatebrowser - That will be an acceptable workaround for now.

So per the original question - not CGI or at least I am aware that CGI is no longer supported. I tried Xojo’s test app. I was able to get it to run on Mac via MAMP - I figured out my Hosting Provider doesn’t allow SSH access for my account type. I will revisit that at some point or find someone who does. This app is for me and the idea is to be able to use away from home on my Android phone. A workaround until Xojo provides this capability. Plus I am learning something new in the process. Hence why I was looking for more than just resolving my problem. Thanks for the quit method - also looking for best practices on the proper way to use and approach the system design.

Also I was Incorrect in stating my rectangles weren’t working. The first one, I used was a simple black rectangle that I resize to the window so I can change to a black background. That worked cause I wasn’t changing the color. As pointed out that is the cause of the bug. Which is why you couldn’t replicate. Thanks going to the extra effort.