Fwd: setFrameAutosaveName problem
Fwd: setFrameAutosaveName problem
- Subject: Fwd: setFrameAutosaveName problem
- From: Dragan MiliÄ <email@hidden>
- Date: Fri, 12 Mar 2004 01:56:06 +0100
Funny, now it works, and all I did was playing around with table view
in IB. I must say that some very odd effects comes out if you use some
particular setting of NSTableView instance object, particularly
automatic hiding of scrollers. For example, if both scrollers are shown
and for example horizontal one is not needed anymore, it disappears,
but it leaves an empty rectangle at the right bottom corner of table
view. If you scroll table down to the bottom, the scroller oddly draws
itself over that little up control, making it disappear completely. If
you then click on that empty rectangle, it turns to down control, and
down control turns to up control of the scroller. Also, automatic
column width resizing together with auto-hidden horizontal scroller may
generate very annoying effects and triggering while resizing, with
horizontal scroller appearing and disappearing. Is this expected
behavior or what? I use XCode 1.1 and IB 2.4.
Milke.
Begin forwarded message:
>
From: Dragan MiliD <email@hidden>
>
Date: 11. P<P0QQ, 2004 20:35:41 CET
>
To: MAC OS X Development Mailing List <email@hidden>
>
Subject: setFrameAutosaveName problem
>
>
Hello everyone.
>
>
I'm not experienced Cocoa programmer, so perhaps I don't understand
>
how things work exactly. I consulted documentation too, but was unable
>
to find anything to resolve my problem. So, here it is:
>
>
Suppose I have an instance of NSSplitView class as window's
>
contentView. The upper half o split view is occupied by an instance of
>
NSTableView class, showing records in its rows, which are, let's say,
>
messages with attributes such are sender, subject, date etc. The
>
bottom half of the split view is occupied by an instance of
>
NSTextView, which shows the text of the message selected in the upper
>
table view. When selection is changed, the appropriate message text is
>
shown as a result of NSTableViewSelectionDidChangeNotification being
>
posted. When the app launches, I want to select the message (that's
>
row) which was selected right upon termination. For that purpose I use
>
user defaults database. So, when the app starts, I fetch last selected
>
row index from the database and in windowDidLoad: method of window
>
controller programatically select that row of table view, which
>
results in appropriate message text appearing inside text view. That
>
worked fine. Then, I wanted window position and size on the screen to
>
be remembered as well. I put window's setFrameAutosaveName: method
>
call into same windowDidLoad: and programatic selecting of table
>
view's row at startup works as long as I don't change window's
>
position or size. Once it's done, table view's row selecting won't
>
work on subsequent relaunches, until I remove setFrameAutosaveName
>
call. By tracing execution in GDB I actually realised that code which
>
should select table view's row executes, but no row is selected, and
>
no notification is posted.
>
>
Maybe this isn't the right way to implement that feature, but before
>
suggesting any other, I would like to know why the method described
>
above won't work.
>
>
Best regards,
>
>
Milke.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.