How come when I move a slider, my app stops?

BlitzPlus Forums/BlitzPlus Programming/How come when I move a slider, my app stops?

sswift(Posted 2005) [#1]
When I move a slider in my app, all animation stops occuring.

I think I have traced this to the fact that Blitzplus goes into some kind of special state when a user moves a slider.

How this works exactly is a mystery, but I know this... When I move a slider, the canvases move as they are supposed to, but all draw operations either do nothing, or the results simply do not become visible until I stop moving the slider. Everyhting else apparently works fine?

Why does Blitz stop the canvases from flipping when scrolling like this? It's obviously not neccessary from a Windows limitations standpoint because I can view a page in Mozilla with lots of animation going on, and that animation does not stop while I am scrolling the page.

Is there some reason for this? And more importantly, is there a way to disable it?

It's not a huge priority for me, but I just thought it was odd when all my marching ants selection lines stopped marching while I was scrolling the window.


Kuron(Posted 2005) [#2]
The majority of bugs you have been posting could easily be cured if you stopped using Blitz Plus. Blitz Plus is riddled with bugs and "improper" API use and makes it near impossible to create a properly functioning program. However if you are dedicated to using Blitz Plus, much of the GUI related issues you have been having, could be cured by using a third party GUI system like BlitzUI.

It has been said that Skid was working on B+ updates, but after over 9 months of waiting since the last big bug-fix, most people have given up and moved on. B2D was awesome, and so was B3D for the most part, but B+ dove head first into Lee Bamber's toilet and stayed there. It would be nice if they could pull it out of the toilet, clean it up a bit, but at this point, I wouldn't hold my breath. All support seems to be directed at BMax.


sswift(Posted 2005) [#3]
"The majority of bugs you have been posting could easily be cured if you stopped using Blitz Plus."

Uh huh... And then I'd be posting on the Visual Basic forums saying "How do I access Direct X? Visual Basic's graphics commands are so SLOOOOW!"

I programed in VB at one time. Blitzplus is much more fun to work with and easier to understand, even with the issues.

And these are minor issues. Even with all the bugs I've posted, my app is currently running exactly how I want it to run. I had to access a windows DLL for three or four different minor things, like changing the mouse cursor (hardly a neccessity considering I've only ended up using it for displaying a magnifying glass, and an hourglass) and removing highlights on tabs I didn't like.

The only really important thing was not being able to tell when the mouse was over a panel. In retrospect though I can't even think of a good reason I even needed to be able to do that.

Granted, I'm not writing a major application here. But I don't think Blitzplus was ever intended to compete with Visual Basic or Visual C. It was designed for making editors for games, and 2D games with windows interfaces, and fairly simple applications, like my own. And there is succeeds greatly.

I just post all these bugs because I am nitpicky and want my app to work in a very specific way because I am a control freak and want the highest level of quality. I mean I posted a bug about tabs getting hihglighted in blue for crying out loud. That's hardly important, except from an aesthetics point of view. :-)

Oh and your assertation that B2D is awesome but Blitz+ is terrible is a stupid one. Blitplus does everything B2D ever did. If Blitz2D is awesome, then Blitzplus must also be awesome by default. Just because Blitzplus doesn't have enough additional windows GUI stuff for your tastes doesn't mean anything.


Kuron(Posted 2005) [#4]
Just because Blitzplus doesn't have enough additional windows GUI stuff for your tastes doesn't mean anything.
My main complaint remains that what GUI stuff is there often does not work properly (I can live with the other bugs). However, I use BlitzUI and am content, although I wish the OGL issues with B+ would get fixed. :c/


Beaker(Posted 2005) [#5]
B+ opengl was never anything more than a test. I agree with sswift, altho I understand peoples complaints, B+ does work really well for small apps and utils.


Kuron(Posted 2005) [#6]
B+ opengl was never anything more than a test.
Keyword "was". It is now marketed on the site as using DX and OGL.

OGL seems to work fine as long as you are using a Window & Canvas. My need for OGL arises because on many of the MOBO video chips, like SiS, Savage, my B+ program will get around 3 FPS in Window mode using DX, but will perform fine in Window Mode using OpenGL. Many of the cheapo cards seem to crap out on Windowed DX, but will do fine on Windowed OGL. Since these are "desktop" games, they need to be "Windowed".

Just kinda bummed out waiting for so long for some bug fixes...


Kevin_(Posted 2005) [#7]
I just wish that BlitzPlus had more windows stuff built in so that I dont have to fanny around with userlibs all of the time to get what I want. I'm not bothered if the .exe will be much bigger as a result.


Cold Harbour(Posted 2005) [#8]
You’re just going into a modal event loop.
Luckily there’s an event generated to handle this. I had to laugh at the B+ docs though:

“You shouldn't generally have to worry about modal event loops.”

So my advice is this - just don’t worry about it, it will all be OK.


sswift(Posted 2005) [#9]
" You’re just going into a modal event loop."

Yes, I ead that in the docs, that's part of how I figured out why what was occuring was occuring.

But I don't know what a "modal event loop" is. I only know that it stops my canvases from flipping.


"Luckily there’s an event generated to handle this."

How is that lucky? If my canvases don't flip when I'm in this modal event loop, knowing I'm in it really isn't much help.


"So my advice is this - just don’t worry about it, it will all be OK."

It's not really that important to me, but if there were a simple one or two line fix, I'd probably turn it off.


JoshK(Posted 2005) [#10]
BlitzPlus seems like it was just kind of a proof-of-concept. I use it for some pretty advanced stuff, but I tweak the hell out of it with PureBasic and win32.

If it had more gadget styles, more events, and got rid of the known bugs, it would be perfect.


Wiebo(Posted 2005) [#11]
I hear ya, I'm waiting in anticipation for the next update. It's not a coincidence I've spent most of my time in B+ creating custom gadgets and events.


CS_TBL(Posted 2005) [#12]
custom gadgets, ok ... uhm, but how do you create custom events? (or do you simply refer to a function to be placed in the mainloop to handle the custom gadgets activities?)


Kuron(Posted 2005) [#13]
If it had more gadget styles, more events, and got rid of the known bugs, it would be perfect.
Agree 100%


Wiebo(Posted 2005) [#14]
CS_TBL: yup. It did sound interesting, yes? :)


sswift(Posted 2005) [#15]
Hey Wiebo, is there anyhting special you need to do in Blitzplus when you make a custom gadget to access it? Can you show an example? What about the events it generates? Will those be picked up by waitevent?


/Wiebos wobble but they don't fall down!


Wiebo(Posted 2005) [#16]
Many times a custom gadget contains a canvas so the mouseover event catches movement on it. I then call a search function to find that canvas so I can identify the corresponding gadget and call the update function. Normally, checking movement and mousekey events from the previous update is enough to get the information i need... I can post code but I'm at work now. ahum.


CS_TBL(Posted 2005) [#17]
see my tut in 'blitzplus tutorials' .. da'z all

Wiebo: do you use banks for those gadgets? (like I do in that tut)


sswift(Posted 2005) [#18]
Wiebo:

Yucky!

Erm, no thanks. I'll just stick with the standard gadgets for now. :-)


CS_TBL:
I'll take alook at that.


Wiebo(Posted 2005) [#19]
CS_TBL: Up until now I can do all I want without banks. I'll be taking a look at your tutorial though!


CS_TBL(Posted 2005) [#20]
Well, I don't see how to make those gadgets somewhat independant and self-containing without having to use types (without types it looks uniform with B+'s own gadgets/style, besides: not everyone likes types :) ) or globals. So, if there's a method of doing gadgets in another way ... please share the idea ^_^


Wiebo(Posted 2005) [#21]
no, i'm using types :)) It's THE way to do it imho.


BlitzSupport(Posted 2005) [#22]
From the GetScrollPos/GetScrollInfo/WM_VSCROLL/WM_HSCROLL references (in M$ Win32.hlp, missing from MSDN):


The limitation on this technique applies to real-time scrolling of a window's content. An application implements such scrolling by processing the WM_HSCROLL or WM_VSCROLL messages that carry the SB_THUMBTRACK notification message, thereby tracking the position of the scroll box, also known as the thumb, while the user moves it. Unfortunately, there is no function to retrieve the thumb's 32-bit position while the user moves it. GetScrollPos provides static position data only; an application can therefore only obtain 32-bit position data before or after a scroll has taken place.




sswift(Posted 2005) [#23]
BlitzSupport:
I'm not sure what you're trying to convey.

A) Realtime scrolling works just fine, it's just the canvases that stop flipping.

B) Mozilla and other apps scroll just fine with canvas flipping going on.


Obviously Blitz is getting these events and moving the canvases, so what dies that mean it can't flip the canvases?


skidracer(Posted 2005) [#24]
You don't get TimerEvents for one thing which may be able to be fixed.


sswift(Posted 2005) [#25]
I don't use timerevents to move my canvases, but I didn't know those weren't triggered either.