Options

Return value Warning, what do you think

Johannes_NielsenJohannes_Nielsen Member Posts: 206
edited 2013-04-08 in NAV Three Tier
Hi all

Something I don't get.

When compiling a page in NAV 2013 I receive a warning.

Warning <Action22> - OnAction Line 2 Property call without using return value
SomeRec.MARKEDONLY;

Why is this code elligble for a warning? The return value is optional.

It's not bad practice as far as I know.

It is just a warning, but I still think it should'nt be even that.

And the next wierd thing is, that this code:
SomeRec.MARKEDONLY = TRUE;
SomeRec.MARKEDONLY(TRUE);

Does not produce any warning regarding return value.

What do you think? :)
Best regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-841

Answers

  • Options
    ShedmanShedman Member Posts: 194
    SomeRec.MARKEDONLY
    
    Implies that you want to know what the current value is.
    SomeRec.MARKEDONLY := TRUE;
    SomeRec.MARKEDONLY(TRUE);
    
    Implies that you want to set the value.


    When wanting to know the current value, the need for the return value seems legit to me.
Sign In or Register to comment.