Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #1815 > unrolled thread
| Started by | Bob Latham <bob@sick-of-spam.invalid> |
|---|---|
| First post | 2012-06-22 11:55 +0100 |
| Last post | 2012-07-04 12:28 +0100 |
| Articles | 5 — 3 participants |
Back to article view | Back to comp.sys.acorn.programmer
Wimp report error oddity Bob Latham <bob@sick-of-spam.invalid> - 2012-06-22 11:55 +0100
Re: Wimp report error oddity Jeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk> - 2012-06-23 16:09 +0100
Re: Wimp report error oddity Bob Latham <bob@sick-of-spam.invalid> - 2012-07-04 10:02 +0100
Re: Wimp report error oddity Martin Wuerthner <spamtrap@mw-software.com> - 2012-07-04 13:02 +0200
Re: Wimp report error oddity Bob Latham <bob@sick-of-spam.invalid> - 2012-07-04 12:28 +0100
| From | Bob Latham <bob@sick-of-spam.invalid> |
|---|---|
| Date | 2012-06-22 11:55 +0100 |
| Subject | Wimp report error oddity |
| Message-ID | <52a3c84aabbob@sick-of-spam.invalid> |
Hi, Getting something I don't understand and would appreciate enlightenment. My Wimp application waits for an icon click within the program and then tries to load a file. If the file doesn't load or contains no data I call wimp_report_error with the flags set to 1. After return from the swi I simply go back to the main loop and wimp_poll. All seems well, the error box pops up with the correct text and if you press return or escape the window closes perfectly. However, if you click the OK button in the error window, the window closes and opens again. A second click of the OK button closes the window properly. It looks to me as though the previous mouse click is being picked up a second time. I made sure my mouse click code checks the window handle and unless it is from MY main window it cannot call the file load a second time. Got me going this one. Anyone care to point out my no doubt obvious mistake? Cheers, Bob.
[toc] | [next] | [standalone]
| From | Jeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk> |
|---|---|
| Date | 2012-06-23 16:09 +0100 |
| Message-ID | <mpro.m62ssl0037yqn009s@wingsandbeaks.org.uk.invalid> |
| In reply to | #1815 |
Bob Latham <bob@sick-of-spam.invalid> wrote: > Got me going this one. Anyone care to point out my no doubt obvious > mistake? No idea, but if you run !reporter you'll be able to see the flow of control through the program, and issue diagnostic messages to yourself. -- Jeremy C B Nicoll - my opinions are my own. Email sent to my from-address will be deleted. Instead, please reply to newsreplyaaa@wingsandbeaks.org.uk replacing "aaa" by "284".
[toc] | [prev] | [next] | [standalone]
| From | Bob Latham <bob@sick-of-spam.invalid> |
|---|---|
| Date | 2012-07-04 10:02 +0100 |
| Message-ID | <52a9ec0298bob@sick-of-spam.invalid> |
| In reply to | #1815 |
In article <52a3c84aabbob@sick-of-spam.invalid>, Bob Latham <bob@sick-of-spam.invalid> wrote: > My Wimp application waits for an icon click within the program and then > tries to load a file. If the file doesn't load or contains no data I > call wimp_report_error with the flags set to 1. After return from the > swi I simply go back to the main loop and wimp_poll. > All seems well, the error box pops up with the correct text and if you > press return or escape the window closes perfectly. However, if you click > the OK button in the error window, the window closes and opens again. A > second click of the OK button closes the window properly. > It looks to me as though the previous mouse click is being picked up a > second time. I made sure my mouse click code checks the window handle and > unless it is from MY main window it cannot call the file load a second > time. Really, really stumped by this, I don't understand what is happening or why. I've spent hours and hours on it. Having put test points in my code I can confirm that the original mouse click does get resent to my application after a Wimp_ReportEerror *if* I close the error window with a mouse click, use the escape key and no problems. Is this expected behaviour? Do I have to flush some buffer or something? Can anyone give me a clue please? TIA Bob.
[toc] | [prev] | [next] | [standalone]
| From | Martin Wuerthner <spamtrap@mw-software.com> |
|---|---|
| Date | 2012-07-04 13:02 +0200 |
| Message-ID | <8206f7a952.martin@bach.planiverse.com> |
| In reply to | #1868 |
In message <52a9ec0298bob@sick-of-spam.invalid>
Bob Latham <bob@sick-of-spam.invalid> wrote:
> In article <52a3c84aabbob@sick-of-spam.invalid>,
> Bob Latham <bob@sick-of-spam.invalid> wrote:
>> My Wimp application waits for an icon click within the program and then
>> tries to load a file. If the file doesn't load or contains no data I
>> call wimp_report_error with the flags set to 1. After return from the
>> swi I simply go back to the main loop and wimp_poll.
> Really, really stumped by this, I don't understand what is happening or
> why. I've spent hours and hours on it.
> Having put test points in my code I can confirm that the original mouse
> click does get resent to my application after a Wimp_ReportEerror *if* I
> close the error window with a mouse click, use the escape key and no
> problems.
Very odd. I presume the window handle in that message is the one of
the original window? Check the button type of the icon in question. It
could be of a type that notifies both on click and on release.
--
Martin
---------------------------------------------------------------------
Martin Wuerthner MW Software http://www.mw-software.com/
RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------
[toc] | [prev] | [next] | [standalone]
| From | Bob Latham <bob@sick-of-spam.invalid> |
|---|---|
| Date | 2012-07-04 12:28 +0100 |
| Message-ID | <52a9f95d6ebob@sick-of-spam.invalid> |
| In reply to | #1869 |
In article <8206f7a952.martin@bach.planiverse.com>, Martin Wuerthner <spamtrap@mw-software.com> wrote: > Check the button type of the icon in question. It could be of a type > that notifies both on click and on release. Spot on! You're a genius. Somehow the icon had got set to Click/Drag and all the other icons were just Click. It would never have occurred to me to check this, convinced as I was that I'd done something stupid in my code. It's funny (now) but that button must have been set wrong for months if not years and it never gave a problem until I started to add error messages. Thank you Martin, much appreciated. Cheers, Bob.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.acorn.programmer
csiph-web