Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » CtrlLayoutOKCancel - detecting Cancel vs Bad input?
CtrlLayoutOKCancel - detecting Cancel vs Bad input? [message #1727] Thu, 16 March 2006 07:59 Go to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

Using a CtrlLayoutOKCancel, with some fields with restrictions, like non-null, or min&max (port).

When user inputs something bad, a OK dialog pops up to inform us of this, then the main dialog returns from Run() with IDCANCEL.

(One would have thought it should not return at this point?)

This means we've stuck Run() in a loop so they can input data correctly, until they push OK or Cancel.

But Cancel also returns IDCANCEL.

How do we detect the difference between user clicking Cancel, and user just typing in something invalid?

Advice pleace Smile


Re: CtrlLayoutOKCancel - detecting Cancel vs Bad input? [message #1731 is a reply to message #1727] Thu, 16 March 2006 18:58 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
lundman wrote on Thu, 16 March 2006 01:59


Using a CtrlLayoutOKCancel, with some fields with restrictions, like non-null, or min&max (port).

When user inputs something bad, a OK dialog pops up to inform us of this, then the main dialog returns from Run() with IDCANCEL.

(One would have thought it should not return at this point?)



It should not return - something is wrong. Please post the whole testcase...

Mirek
Re: CtrlLayoutOKCancel - detecting Cancel vs Bad input? [message #1833 is a reply to message #1731] Wed, 22 March 2006 07:59 Go to previous message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

Right, we were setting our own callbacks for OK and CANCEL during a lapse-in-sanity moment, which (correctly) would break the expected behavior.

Sorry for the noise.


Previous Topic: Why there are no SetParent() or SetOwner() ? [TOO DANGEROUS...]
Next Topic: What Label.WhenAction supposed to do? - nothing [PARTLY SOLVED :)]
Goto Forum:
  


Current Time: Sat May 04 04:18:05 CEST 2024

Total time taken to generate the page: 0.01532 seconds