[comp.sys.next] Help on inspectors for custom objects

jl3p+@andrew.cmu.edu (James Ting Lui) (02/20/91)

I have been experimenting with writing my own inspector
for a custom view which happens to be a subclass of Text.
In order for me to be able to edit the text of my object,
I placed a button in the inspector panel, which when clicked
places the inspected object into the view hierarchy of
the currently edited window ( [ NXApp mainWindow ] ) and
makes my object the first responder.  Its delegate is set
to the inspector so that I can restore the object to its
normal place when I'm done editing (notified by textWillEnd/
textDidEnd).  This editing scheme seems to work reasonably well.

My problem comes when I'm trying to change fonts while editing
the text of my object.  My object is initialized to be NOT monofont,
but when I change a portion of the text's font, all of it changes.
However, I can superscript portions of the text properly, and the
interface testing mode shows that my text object is indeed NOT monofont.
My debugging statements also show that the text is NOT monofont.

If anyone out there has any idea what is going on, I'd greatly
appreciate it.

Thanks a lot,
    -- Jim