delay not working as expected
Re: delay not working as expected
Right, I forgot to add a delay(1). Fixed the code with waitwindowevent(1).
Re: delay not working as expected
there is not a single 'WindowEvent()' in any of the code suggestions.
Re: delay not working as expected
I'm sorry. It was in my code, I fixed it already. I wrote some explanation that I did that, to not to confuse the forum readers. So I'm sorry again, there was a windowevent(), but now its gone, I replaced it as a correction.
Last edited by miso on Wed Apr 02, 2025 5:35 pm, edited 1 time in total.
Re: delay not working as expected
I like this most in this weird thread
:

Marc56us wrote: Wed Apr 02, 2025 7:57 amCode: Select all
Until WaitWindowEvent = #PB_Event_CloseWindow
{Home}.:|:.{Dialog Design0R}.:|:.{Codes}.:|:.{History Viewer Online}.:|:.{Send a Beer}
Re: delay not working as expected
Bold move, correcting the one who creates, maintained and develops PureBasic.
However, yes, it's a typo: Fred meant to replace WaitWindowEvent() with WaitWindowEvent(1).
Also, you should learn the basics first...
Edit: Yeah, my post was a bit late.
However, yes, it's a typo: Fred meant to replace WaitWindowEvent() with WaitWindowEvent(1).
Also, you should learn the basics first...
Edit: Yeah, my post was a bit late.
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Re: delay not working as expected
Hi,HeX0R wrote: Wed Apr 02, 2025 5:27 pm I like this most in this weird thread:
Marc56us wrote: Wed Apr 02, 2025 7:57 amCode: Select all
Until WaitWindowEvent = #PB_Event_CloseWindow
This line comes from the initiator of the subject.


Re: delay not working as expected
Just for clarification, with gadgets and windows, the windowtimer is the logical solution.
Managing a windowed application might be confusing at first for someone new. It needs some experimenting and testing (with failures) to get some understanding before it starts to work. Small examples included with pb should be the best to analyze first.
Managing a windowed application might be confusing at first for someone new. It needs some experimenting and testing (with failures) to get some understanding before it starts to work. Small examples included with pb should be the best to analyze first.
Last edited by miso on Wed Apr 02, 2025 6:38 pm, edited 1 time in total.
- Mindphazer
- Enthusiast
- Posts: 456
- Joined: Mon Sep 10, 2012 10:41 am
- Location: Savoie
Re: delay not working as expected
Are you sure this guy, "solo" is real, made of flesh and blood ?
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
...and unfortunately... Windows at work...
Re: delay not working as expected
97.7341865% percent sure. Or I'm an April's Fool, I take it 

Re: delay not working as expected
i appreciate your and everyone else's help. I am new to PB, but i spent the last 20 yrs as a medical research programmer. some of my programs are licensed by the NIH and used by retinal researchers around the world. and i AM completely new to 'windowed' application, every language i used before DELAY put a delay where it was written.miso wrote: Wed Apr 02, 2025 5:53 pm Just for clarification, with gadgets and windows, the windowtimer is the logical solution.
Managing a windowed application might be confusing at first for someone new. It needs some experimenting and testing (with failures) to get some understanding before it starts to work. Small examles included with pb should be the best to analyze first.
that's where i started, w/ PB examples, and wrote a lovely Sierpinsky triangle generator. what i'm trying trying to do is slow down the steps so people can see the process.
Re: delay not working as expected
Well, in your first post, the delay is indeed where it's written. Drawing is done when StopDrawing is used. Also the message handling is not PB specific, this is nearly the same for every OS. You would need an extra CPU to redraw everything on screen after each change.
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Re: delay not working as expected
@Solo
The delay works in PB as you expect. It is possible to use delay though, when you have unfinished processes left, like drawing. If you delay when draws are unfinished, you wont see the image.
The delay works in PB as you expect. It is possible to use delay though, when you have unfinished processes left, like drawing. If you delay when draws are unfinished, you wont see the image.