Inappropriate Error Messages Using WPF?

Using (or providing) Microsoft.NET Classes

Inappropriate Error Messages Using WPF?

Postby Dick Bowman on Fri Oct 01, 2010 2:57 pm

Wondering whether m'learned colleagues concur...

Try setting a ReadOnly property for a WPF object, for example IsVisible. I get LENGTH ERROR, which seems misleading. Wondering whether it's desirable or possible to have this changed to something like DOMAIN ERROR?

And - presumably way out of Dyalog's control - my illhumour regarding most things to do with WPF didn't improve when I found that I had to set Visibility to 0 to make something visible (and to 1 to make it invisible).
Visit http://apl.dickbowman.com to read more from Dick Bowman
User avatar
Dick Bowman
 
Posts: 235
Joined: Thu Jun 18, 2009 4:55 pm

Re: Inappropriate Error Messages Using WPF?

Postby MikeHughes on Fri Oct 01, 2010 5:47 pm

I have just tried IsVisible←1 and I get an exception with an error message in the stastus message as expected (though the message is a little cryptic).

You should not really be setting Visibility to 1 or 0 but to Visibility.Hidden, Visibility.Collapsed or Visibility.Visible.
The differences are whether space is reserved for the hidden object or whether the space reserved collapses to 0 (ie not reserved).

I suspect that as there is more than 1 value for different types of "Hidden" then it is like the usage of return codes.
rc=0 Means no error, non zero rc is the error code

so :if rc=0 being Ok is perhaps equally non boolean
User avatar
MikeHughes
 
Posts: 86
Joined: Thu Nov 26, 2009 9:03 am
Location: Market Harborough, Leicestershire, UK


Return to Microsoft.NET

Who is online

Users browsing this forum: No registered users and 1 guest