ManagedMessageBox() - RC1 released July 5

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

This (bug?) took me a while to track down...

Code: Select all

MessageRequester(blah$,"an undefined string works okay")
ManagedMessageBox(0,0,blah$,"an undefined string in the title crashes it",0,0,0,"","")
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Also there is something slightly different about the refreshing after ManagedMessageBox than after the normal MessageRequester. Not all areas seem to get repainted. I've tried it on a few programs as a replacement for messagerequester and the refresh thing is pretty strange.

The refresh problem only occurs if you have the timed feature enabled (not zero) and you let it run down to zero, else it works fine.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Fixed.
BERESHEIT
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Confirmed fixed for the title problem. :D

But the refresh problem is still there... :cry:
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

I can't reproduce a refresh problem. Could you possibly mock up a little test program that shows the behaviour? I'd appreciate it very much as I've tried many scenarios without seeing it. Thanks for your help!
BERESHEIT
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

I think I found something that may help. I made a change, could you download and test please?
BERESHEIT
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Its not a "little" test program - but you will see what I mean with it...

http://www.applepanic.com/downloads/rb/beta.exe

Install, then run the ReportBuilder app (you can uninstall afterwards if you like).

To see the problem you need to do a few things to get to where it occurs 100% of the time, so...

Click a few pupils in the 'pupil list' with the ctrl button pressed, then double-click on a statement in the 'subject tree'. The program will enter "multimode" and enter your statement into the pupils reports.

Now (to see the refresh problem), click a single pupil name in the 'pupil list', a timed message saying that multimode will be turned off will appear (using your message requester).

If you click ok, no refresh problem.
If you leave it to count down to zero, there is a refresh problem.
(on my XP system at least)

Sorry about the long way to get to it, its just the easiest way of showing you were it occurs 100% of the time. :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Thanks for the "snippet!" (Very nice work, btw) I see the behaviour now, hopefully I can figure out what's different between ending on a real buttonpress and ending on a program-generated one. I'll certainly try, anyhow.
BERESHEIT
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Very nice work, btw
Thanks, its been getting really good reviews. :D GedB seems to like it, I think it saved his wife (she is a teacher) quite a bit of time.

I think I can work around the refresh problem if you can't fix it (windows is just plain strange sometimes) - its only one section thats not refreshed, so I can just refresh that bit after all calls to your routine.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

I think I got it. Could you download and try again?
BERESHEIT
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Works great now! Thanks. :D
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Excellent. I can go to bed now. Thanks for all your help!
BERESHEIT
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

RC1 of this lib is ready for testing. It contains a couple of enhancements:

1) No variables are used in the threaded portion of the library at all, making threadsafety unnecessary. ( :wink: PBBF!)

2) A new behaviour option is available. By leaving the 3 elements of the status string null, you can now have a timed messagebox with no height change or status line shown. It will appear as a normal messagebox, except that it will push the default button and go away at the specified timeout.

Please do your best to break this thing and let me know if you can. Thanks for all your help!
BERESHEIT
White Eagle
Enthusiast
Enthusiast
Posts: 215
Joined: Sun Jan 04, 2004 3:38 am
Location: Maryland

Post by White Eagle »

Thank you very much for the 3.94 version :wink:
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

No problems at all with RC1. :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Post Reply