bugGNUstep - Bugs: bug #35101, Should NSTextField manage colors...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #35101: Should NSTextField manage colors for field editor while editing?

Submitted by:  Banlu Kemiyatorn <id>
Submitted on:  Sun 18 Dec 2011 02:25:24 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: Change RequestStatus: Wont Fix
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Declined

Tue 03 Jan 2012 09:41:44 AM UTC, comment #3:

On the mailing list it was concluded that this change should rather go into a subclass of NSTextField and not in the class itself.
As Bluna/Banlu has sadly left the GNustep development group, this change isn't very likely to happen.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Sun 18 Dec 2011 06:58:33 PM UTC, comment #2:

Then it's better not to set colors in -setUpFieldEditorAttributes: because Apple didn't document about that.

Banlu Kemiyatorn <id>
Sun 18 Dec 2011 06:35:24 PM UTC, comment #1:

The question is rather, does Apple do this? The behaviour you propose makes sense, but if Apple does it differently this will cause problems for people relying on the GNUstep behaviour when porting over.
From Ivan Vucica's reply I take it that, Apple hasn't implemented this behaviour, otherwise, why would he have tried to add it. This would rule out, adding it to GNUstep.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Sun 18 Dec 2011 02:25:24 PM UTC, original submission:

if not, why bother setting colors in [NSCell -setUpFieldEditorAttributes:]

Index: NSTextField.m
===================================================================
--- NSTextField.m (revision 34315)
+++ NSTextField.m (working copy)
@@ -278,6 +278,9 @@
- (void) setBackgroundColor: (NSColor *)aColor
{
[_cell setBackgroundColor: aColor];
+
+ NSText *t = [_window fieldEditor: NO forObject: self];
+ if (t != nil) [t setBackgroundColor: aColor];
}

/** <p>Returns the color used to draw the background.</p>
@@ -335,6 +338,9 @@
- (void) setDrawsBackground: (BOOL)flag
{
[_cell setDrawsBackground: flag];
+
+ NSText *t = [_window fieldEditor: NO forObject: self];
+ if (t != nil) [t setDrawsBackground: flag];
}

/** <p>Sets the color with which the text will be draw to aColor.</p>
@@ -343,6 +349,9 @@
- (void) setTextColor: (NSColor *)aColor
{
[_cell setTextColor: aColor];
+
+ NSText *t = [_window fieldEditor: NO forObject: self];
+ if (t != nil) [t setTextColor: aColor];
}

/** <p>Returns the colour used to draw the text.</p>

Banlu Kemiyatorn <id>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by FredKiefer (Posted a comment)
  • -unavailable- added by id (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 03 Jan 2012 09:41:44 AM UTCFredKieferStatusNone=>Wont Fix
      Assigned toNone=>FredKiefer
      Open/ClosedOpen=>Declined

    Back to the top


    Powered by Savane 3.1-cleanup1