This content has been marked as final. Show 5 replies
By line six, I am referring to the following, which is the sixth line of my code:
budgetDatum = dataSource.get(rowIndex).getDescription();
The method, "getDescription()", is not recognized as a valid method, which leads me to believe I am accessing the member of dataSource incorrectly.
You still aren't providing all of the information needed.
What type of object does 'dataSource.get' return?
You probably need to cast the object to the proper type and call 'getDescription on that type.
If it returns a BudgetDatum class object then cast it as that
If you aren't using generics the 'get' method is probably just returning an Object.
BudgetDatum budgetDatum; . . . budgetDatum = ((BudgetDatum) dataSource.get(rowIndex)).getDescription();
what I believe to be a syntax errorThere is too much here about what you believe, and not enough about what the compiler actually told you. If it was a syntax error the compiler would have said so, and if all your beliefs were correct you wouldn't be asking the question.
which leads me to believe I am accessing the member of dataSource incorrectly.