Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call to dataHasValue not dataHasValue() #4

Open
GoogleCodeExporter opened this issue Aug 17, 2015 · 0 comments
Open

call to dataHasValue not dataHasValue() #4

GoogleCodeExporter opened this issue Aug 17, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

There are many cases, for example in the deleteRecordSet function, copied 
below, there is a call to dataHasValue.  This should be dataHasValue().  By not 
including the parenthesis, what you are checking is that the function pointer 
'dataHasValue' is not null.  What you want is to call the function 
'dataHasValue' and check whether its return value is true.  This is done by 
dataHasValue().  Please correct.  On a side note, the parameter name endIndex 
is terrible!  What you really want is to name it count or something.

public function deleteRecordSet(startIndex:int, endIndex:int = 1):Boolean{
   if ( dataHasValue && startIndex < data.length && endIndex > 0)
      return data.splice(startIndex, endIndex);
   else
      return false;
}

Original issue reported on code.google.com by davidh.0...@gmail.com on 22 Nov 2011 at 1:53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant