-
Notifications
You must be signed in to change notification settings - Fork 102
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
Binding are not working on NSTableView. #87
Comments
Have you tried to bind NSTableColumn programmatically? For cell-based table views it should be something like this:
|
This is not working at this point. Bindings are not completely supported
in GNUstep, but they should be soon as this is something I am currently
working on.
…On Wed, Nov 4, 2020 at 12:03 PM digital-pers0n ***@***.***> wrote:
Have you tried to bind NSTableColumn programmatically? For cell-based
table views it should be something like this:
NSTableColumn *column = [myTableView tableColumnWithIdentifier: @"column"];
[column bind: NSValueBinding
toObject: myArrayController
withKeyPath: @"arrangedObjects.someKey"
options: nil];
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#87 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAG2J66Q2THTAJYKLJKZ4DSOGCORANCNFSM4SGTZXZA>
.
--
Gregory Casamento
GNUstep Lead Developer / OLC, Principal Consultant
http://www.gnustep.org - http://heronsperch.blogspot.com
https://www.patreon.com/bePatron?u=352392 - Become a Patron
https://gf.me/u/x8m3sx - My GNUstep GoFundMe
https://teespring.com/stores/gnustep - Store
|
The problem here seems to be that the numberOfRows for the NSTableView is not computed from the value binding of the column. I am not sure how this should be done in general, although the simple case with just one column should be easy. |
One issue I am running into with this is that it seems to get into infinite recursion. I'm wondering if it might not be possible for you to take a look and see if you can understand what I am doing wrong. :( |
Could you please explain what you are doing and how to reproduce the recursion issue you are seeing? |
I implemented that simple solution I talked about above. This should resolve this specific issue. If you have further problems, please open a new ticket. |
Currently I have two examples in my repository NSArrayController_test and NSDictionaryController_test. I am currently working on implementing NSDictionaryController, so I will cover NSArrayController here.
Expected: you should get a table with one column with three rows being 1,2, & 3.
Actual: You get nothing.
Currently, the bindings are not causing the NSTableView to show the results as it is under macOS:
The text was updated successfully, but these errors were encountered: