I’m not expecting a “solution”, but perhaps a comment that might make me go “AHA!”
So let me see if I can explain this clearly enough.
I have created an Attribute Inspector in Swift (similar to the one in the Xojo IDE).
This consists of
NSScrollView -> NSTableView -> NSTableCellView
The NSTableCellView has various controls (textfield, segCtrl, etc). If you have downloaded the proof of concept of “my replacement” you know what I mean
There are TWO instances of this control currently in the app. One on the main IDE screen… and it works just fine
The other is in a different window and will be used to collect project config info, and there in lies the problem. On that window all the controls “work” EXCEPT for textfields… If I click 3 or 4 times, the text highlights (but in GRAY), and it won’t allow any typing. Segment controls are also gray, but do allow selection.
I have compared all relavant attributes between how the instances are created in both windows, and am at a loss as to why one works and the other doesn’t.
Note : All delegates are local to the Attribute Inspector class, so the parent window doesn’t need to know about the controls inside.
Like I said. I don’t expect a “solution”… but perhaps someone can make a SWAG that might help?
almost like the view is readonly OR is not the keyboard focused control - macOS API’s have a name for that I cant recall off the top of my head … keyView or something ?
same as I was thinking… but I can’t figure what it might be… the two windows that have this control are of a similar construction… in the one that works (you’ve seen it), there are 3 NSViews side by side, with the right one enclosing the Inspector.
In the one above, there are also 3 NSView, but only one at a time is visible (think page panel). I have even removed all but the one pane, with same results.
Guess I’ll attach some code to see if I can follow the focus
I just put code in to tell me when the textfield gets or loses “focus” [becomesFirstResponder, and resignsFirstResponder).
When I ran it and clicked on the text field… it said GOT then LOST. so I thought “Aha!”
but then I went to the one that worked… and it said the same thing, but didn’t seem to have lost focus…(as in it still worked)
well it seems the issue isn’t (probably) with the Inspector control itself, I removed all the controls from the window, and inserts a plain vanilla textfield… and it doesn’t work either, even though it reports as selectable, editable and enabled