[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in NSAttributedString (?)

From: Adam Fedor
Subject: Re: Bug in NSAttributedString (?)
Date: Sat, 02 Nov 2002 12:50:45 -0700
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.1) Gecko/20020905

This seems to occur in any NSTextField that is selectable but not editable, where the fieldEditor(NSTextView) refused to set it's string, dut to this:

diff -u -r1.114 NSTextView.m
--- NSTextView.m        29 Oct 2002 04:54:44 -0000      1.114
+++ NSTextView.m        2 Nov 2002 19:46:28 -0000
@@ -2255,8 +2255,8 @@
 - (BOOL) shouldChangeTextInRange: (NSRange)affectedCharRange
               replacementString: (NSString*)replacementString
   if (_tf.is_editable == NO)
     return NO;

... but then later on tries to access the string. There's a big warning before this method that says it should always return NO when not editable to make sure the user can't change the string, but simply commenting out those two lines seems to work fine and there was no way that I could figure out that would change the string.

Does anyone who might no more about this have any comments?

Chris B. Vetter wrote:
On 2002-10-26 19:23:33 -0700 Adam Fedor <fedor@doc.com> wrote:

Chris B. Vetter wrote:

not sure if this is a known bug, though:
Clicking the text in any NSPanel (eg. for a copy&paste) will raise an
Exception with
"RangeError in method -attribute:atIndex:longestEffectiveRange:inRange:
      in class NSAttributedString"
I'm using a CVS checkout from today (Monday) but noticed the same problem
in last Friday's checkout as well.

I don't get this problem, unless I'm not following your instructions correctly. Can you provide a backtrace? Or perhaps instructions for making this happen on one of the example apps or something similar.

Uhm, sorry for the delay...

I talked to some on #GNUstep about it and they all (Alex, Jeff and Ludovic) confirmed it. Contrary to what I said above, this only seems to happen in Alert Panels, eg. start GNUMail, click "Check for new Version" then try to mark the "no new version available"
(or whatever GNUMail says) and you'll get the Exception.
Another example would be ProjectCenter, when you click "Quit". Try to mark the "Do
you really want to quit?" text - voila.

Adam Fedor, Digital Optics Corp.      | I'm glad I hate spinach, because
http://www.doc.com                    | if I didn't, I'd eat it, and you
                                      | know how I hate the stuff.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]