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

Cannot "AddRow" to table after control loop adding columns #1600

Open
bpmcgill opened this issue Aug 8, 2024 · 0 comments
Open

Cannot "AddRow" to table after control loop adding columns #1600

bpmcgill opened this issue Aug 8, 2024 · 0 comments

Comments

@bpmcgill
Copy link

bpmcgill commented Aug 8, 2024

Information

  • OS: Windows
  • Version: 0.49.1
  • Terminal: Windows Terminal
  • IDE: Visual Studio 2022 Professional & Enterprise

Describe the bug
When I try to add subsequent rows by using the AddRow() method for the table, the IDE tells me that "'Table' does not have a definition for 'AddRow' and the best extension method overload 'GridExtensions.AddRow(Grid, params string[])' requires a receiver of type 'Spectre.Console.Grid'". I suspect that this is happening because not all of the parameters I have entered are of type string, in which case the documentation is not really clear as to what is expected.

To Reproduce

  1. Create a new table
  2. Add some columns,
  3. Add a row with a string and some integers.
var table = new();

table.AddColum("Column 1");
table.AddColum("Column 2");

table.AddRow("I am a string", 1);
table.AddRow("I am also a string", 2);

Expected behavior
I would expect that either the documentation makes clear that Only string values are accepted in the method -or- that the method would automatically handle types that are easily converted to string (double, float, int, etc...)

Please upvote 👍 this issue if you are interested in it.

@bpmcgill bpmcgill added bug Something isn't working needs triage labels Aug 8, 2024
@patriksvensson patriksvensson added area-Documentation and removed bug Something isn't working needs triage labels Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo 🕑
Development

No branches or pull requests

2 participants