Page 1 of 1

Inappropriate Error Messages Using WPF?

Posted: Fri Oct 01, 2010 2:57 pm
by Dick Bowman
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).

Re: Inappropriate Error Messages Using WPF?

Posted: Fri Oct 01, 2010 5:47 pm
by MikeHughes
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