Closed ThrudTheBarbarian closed 2 years ago
Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.
@ThrudTheBarbarian swapping the lines setTextColor and setStringValue still gives me a gray textfield. can you please post the full reduction?
-#new +#needs-reduction
Milestone: Someday. Label: #needs-reduction. What's next? A minimal test app should be created which demonstrates the concern of this issue in isolation.
Hmm - I'll try and create a reduction. I can't show the original I'm afraid.
Ok, uploaded AppController.txt (which is really AppController.j but GitHub doesn't like .j). It creates a CPTextfield, sets the target/action to a method, and tries to change the colour of the textfield within that method. It then reads it back to see if it worked.
Here's the output of the CPLogs after typing something and pressing return:
[Info] 2021-07-21 17:10:35.796 Cappuccino [info]: Setting view <CPTextField 0x009b3b> to <CPColor 0x00a3f1> rgb(255, 0, 0) (Objective-J.js, line 576)
[Info] 2021-07-21 17:10:35.796 Cappuccino [info]: view <CPTextField 0x009b3b> text color now:<CPColor 0x007b0d> rgb(0, 0, 0) (Objective-J.js, line 576)
Visually there's no change to red (the "desired" colour)
If I then also add in 2 lines to set the initial content and the colour just after [tv setEditable:YES], thus:
[tv setEditable:YES];
[tv setStringValue:"xxx"];
[tv setTextColor:[CPColor blueColor]];
... then I still don't see blue text (it's still black), but if I force a focus-removal by clicking outside of the browser window, then the text colour turns blue. That doesn't happen if I click inside the window.
@ThrudTheBarbarian Strange. I've tested here, on current master, and everything is OK. Are you working with current master ?
@daboe01 Did you observed the problem ?
I'm looking at ~/src/Cappuccino and the file dates are 4th July. I'm fairly sure that's the version of Cappuccino I'm using, and I checked out master.
I have a clean machine I've just set up, which I have to burn in this weekend. I'll set up a fresh Cappuccino install on that to make sure. This is all on Safari btw.
@didierkorthoudt i just had a look at the reduction of @ThrudTheBarbarian the call to setTextColor: does indeed not turn the text red as expected. however, the text turns red immediately after typing the string thereafter. this looks like a redraw issue to me.
-#needs-reduction
+AppKit
Milestone: Someday. Label: AppKit. What's next? A reviewer should examine this issue.
@ThrudTheBarbarian @daboe01 I've pushed #2993 that fixes this. Is this OK for you ?
@didierkorthoudt your PR is fine. however, when we are within editing, you additionally need to call [self _setCSSStyleForInputElement] to make the color change visible; i have placed a review comment in #2993.
@didierkorthoudt - Sorry for the tardiness on my part here. That demo I mentioned ? It went perhaps too well... I have had a string of them since and I'm giving another today to the VP and SVP.
I haven't wanted to upset my dev system (since I just have a portable at home these days) while they were ongoing. Hopefully this will be the last and I'll try and pull down and test :)
I really do appreciate that you've fixed it for me - thank you :)
This will work: `
`
... but remove the dummy -setStringValue: and the text is always black.