Page 2 of 3

Posted: Tue Jul 04, 2006 10:48 pm
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,"","")

Posted: Tue Jul 04, 2006 11:03 pm
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.

Posted: Tue Jul 04, 2006 11:16 pm
by netmaestro
Fixed.

Posted: Tue Jul 04, 2006 11:36 pm
by DoubleDutch
Confirmed fixed for the title problem. :D

But the refresh problem is still there... :cry:

Posted: Tue Jul 04, 2006 11:41 pm
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!

Posted: Wed Jul 05, 2006 12:10 am
by netmaestro
I think I found something that may help. I made a change, could you download and test please?

Posted: Wed Jul 05, 2006 12:18 am
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. :)

Posted: Wed Jul 05, 2006 12:29 am
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.

Posted: Wed Jul 05, 2006 12:35 am
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.

Posted: Wed Jul 05, 2006 12:52 am
by netmaestro
I think I got it. Could you download and try again?

Posted: Wed Jul 05, 2006 1:42 am
by DoubleDutch
Works great now! Thanks. :D

Posted: Wed Jul 05, 2006 1:44 am
by netmaestro
Excellent. I can go to bed now. Thanks for all your help!

Posted: Wed Jul 05, 2006 5:04 pm
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!

Posted: Thu Jul 06, 2006 1:10 pm
by White Eagle
Thank you very much for the 3.94 version :wink:

Posted: Thu Jul 06, 2006 6:06 pm
by DoubleDutch
No problems at all with RC1. :)