1

Topic: Absolutely a sediment?

... var combo = view. ActiveEditor as ComboBoxEdit; Debug. Assert (combo! = null, "Column editor supposed to be a ComboBoxEdit"); if (combo == null) return;... It absolutely @ or not? Just in case: it not in model and not in the logician, i.e. anything and not , and in a silent way for the user does not become / not . Motive to check: in implementation "view" someone something to change (or it already now not always works how I assume). Motive in release not to throw : it will not be simple to work for the user one  but all remaining will be accessible also will be lost nothing And if to add broad gulls and  in release?

2

Re: Absolutely a sediment?

Hello, ylem, you wrote: Y> Y>... Y> var combo = view. ActiveEditor as ComboBoxEdit; Y> Debug. Assert (combo! = null, "Column editor supposed to be a ComboBoxEdit"); Y> if (combo == null) Y> return; Y>... Y> Y> Motive to check: in implementation "view" someone something to change (or it already now not always works how I assume). Y> Motive in release not to throw : it will not be simple to work for the user one  but all remaining will be accessible also will be lost nothing For the given motives is quite comprehensible, in my opinion. Y> and if to add broad gulls and  in release? Why is not present. To get any broad gull for errors and to write there similar situations.

3

Re: Absolutely a sediment?

Hello, ylem, you wrote: Y> Y>... Y> var combo = view. ActiveEditor as ComboBoxEdit; Y> Debug. Assert (combo! = null, "Column editor supposed to be a ComboBoxEdit"); Y> if (combo == null) Y> return; Y>... Y> Y> It absolutely @ or not? Any checks on null are specified by that the object has  a state and as a matter of fact is created should not be would be (RAII, aha). Here at you or  behavior, - you made it intentionally and here there should be a logic any, or you are reinsured, then here it is necessary to deliver simply assert, easy falls and to catch it at a stage . The question why here became such (, such should not be, it assert) it is necessary to address object to the one who creates it.

4

Re: Absolutely a sediment?

Hello, ylem, you wrote: Y> Motive to check: in implementation "view" someone something to change (or it already now not always works how I assume). Y> Motive in release not to throw : it will not be simple to work for the user one  but all remaining will be accessible also will be lost nothing We for such things we write var combo = view. ActiveEditor as ComboBoxEdit; DebugCode. BugIf (combo == null, "Bug: combo is not ComboBoxEdit");... I.e. for the debug code - we fall with the clear message, for release - any checks and (most likely) we fall with NRE. It in a typical case "the code from the loaded section, is covered by tests, errors are basically cannot, for secure - here to you ". If the situation another it is possible or to leave  and in  assembly or to check combo on null (more low) and to operate on circumstances. The similar variant not so attracts me, since such crutches explicitly hint at a jamb in design of application. It is better to write normally and not to leave a rake on then.

5

Re: Absolutely a sediment?

S> such crutches explicitly hint at a jamb in design of application. It is better to write normally and not to leave a rake on then. Thanks! Naturally, it is a jamb in design.

6

Re: Absolutely a sediment?

7

Re: Absolutely a sediment?

8

Re: Absolutely a sediment?

Hello, ylem, you wrote: Y> It absolutely @ or not? Y> Motive in release not to throw : it will not be simple to work for the user one  but all remaining will be accessible also will be lost Depends nothing on significance , certainly. Is  if they miss it is impossible to continue operation. In this case - clear . If  optional (for example, it will be inaccessible to the user the part of a noncritical functional), in this case to beat all I twist certainly not a reason. Y> and if to add broad gulls and  in release? I lately come to that (and ) that in such cases when absence something not especially important or depends on exterior factors, but it is not necessary to interrupt application operation, I do event system. I.e. it is necessary to inform, the problem should be somehow shown. Whether there will be it at the last stage the provider of handling of messages in the form of a broad gull, or record in basis, or display on the screen, depends on application, but informing should be.

9

Re: Absolutely a sediment?

10

Re: Absolutely a sediment?

11

Re: Absolutely a sediment?

12

Re: Absolutely a sediment?

13

Re: Absolutely a sediment?

14

Re: Absolutely a sediment?

Hello, ylem, you wrote: Y> Y>... Y> var combo = view. ActiveEditor as ComboBoxEdit; Y> Debug. Assert (combo! = null, "Column editor supposed to be a ComboBoxEdit"); Y> if (combo == null) Y> return; Y>... Y> Y> It absolutely @ or not?  yes. If the user case  in release it should be  and in the test. Otherwise a penny the price to your testing. Y> and if to add broad gulls and  in release?  if such problem arises in release, means all of you missed at a testing stage.

15

Re: Absolutely a sediment?

16

Re: Absolutely a sediment?

Hello, ylem, you wrote: Y> Motive to check: in implementation "view" someone something to change (or it already now not always works how I assume). Y> Motive in release not to throw : it will not be simple to work for the user one  but all remaining will be accessible also will be lost nothing Only so  and write. The user interface - the intermediary between the user and the program, in itself he does nothing, in case of problems (with itself(himself)) - is silent. Y> and if to add broad gulls and  in release? What any  broke?

17

Re: Absolutely a sediment?

Y> Motive in release not to throw : it will not be simple to work for the user one  but all remaining will be accessible also will be lost nothing For years of weighing such here "pro and contra" came to a conclusion that finally better for all - both for  and for users - the distinct contract, i.e. to throw an exception and to catch as soon as possible such at least in release, than to produce in the code such here "graceful dead"

18

Re: Absolutely a sediment?

Hello, ylem, you wrote: Y> Y>... Y> var combo = view. ActiveEditor as ComboBoxEdit; Y> Debug. Assert (combo! = null, "Column editor supposed to be a ComboBoxEdit"); Y> if (combo == null) Y> return; Y>... Y> Y> It absolutely @ or not? Y> Just in case: it not in model and not in the logician, i.e. anything and not , and in a silent way for the user does not become / not . Y> Motive to check: in implementation "view" someone something to change (or it already now not always works how I assume). Y> Motive in release not to throw : it will not be simple to work for the user one  but all remaining will be accessible also will be lost nothing Y> And if to add broad gulls and  in release? And why not to make invalid  which to palm off on the user and  an error?

19

Re: Absolutely a sediment?

Hello, ylem, you wrote: Y> Y>... Y> var combo = view. ActiveEditor as ComboBoxEdit; Y> Debug. Assert (combo! = null, "Column editor supposed to be a ComboBoxEdit"); Y> if (combo == null) Y> return; Y>... Y> While muzhiks in the neighbourhood tensely argue on a subject , I want to note that the problem with this code is deeper, than a method of check of result. What for you in the application-oriented code use ?

20

Re: Absolutely a sediment?

Y>> Y>>... Y>> var combo = view. ActiveEditor as ComboBoxEdit; Y>> Debug. Assert (combo! = null, "Column editor supposed to be a ComboBoxEdit"); Y>> if (combo == null) Y>> return; Y>>... Y>> SAS> What for you in the application-oriented code use ? Application-oriented it it is a little conditional, i.e. this any "bizness-logicians"  does not represent. "view" it is some part putting-express . When it got to me, in this place already there was this "". Which that around to me  to change. To unwinding to invent situations when  does not work, neither under old circumstances nor at new I could not invent. Storage any more that, but like is the output agent of event,  about editing of a specific column,  the specific type  is assigned. And, if I correctly remember, from the output agent of access to the column/cell was not present, therefore it   here in such a way. And just in case: it Windows. Forms, not WPF.