bug-gnustep
[Top][All Lists]
Advanced

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

[bug #46410] [Gorm] secure textfield in NIB -> Gorm conversion


From: Graham Lee
Subject: [bug #46410] [Gorm] secure textfield in NIB -> Gorm conversion
Date: Sun, 29 Oct 2017 05:08:07 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0

Follow-up Comment #1, bug #46410 (project gnustep):

I understand _what_ is happening here, but not _why_. What is happening:

A secure text field in a nib is stored as NSTextField with custom class set to
NSSecureTextField. So when the nib is loaded, you start off with a text field
and a text field cell.

There is code specifically designed to handle this case, in -gui:
GSNibLoading.m has -[NSClassSwapper unarchiver:didDecodeObject:] which is
explicitly documented to handle the NSSecureTextFieldCell case. It tests for
whether the new class responds to +cellName and replaces the cell object if
so.

What I see in that method is that _originalClassName is NSSecureTextField, but
newClass is NSTextField so +[newClass cell] returns NSTextFieldCell, and that
is what gets set on the nib.

I understand that reversing the sense of that test fixes the problem, but do
not understand that code well enough to know why that should be so or what
other effects would result.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46410>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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