Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Don't get an initial tableViewSelectionDidChange



Hi list,

I'm trying to make a NSTableView display some data, in a modal window.

My code goes something like this:

...
    NSWindow* wi = [H window];
    [NSApp runModalForWindow:wi];
...

Now, the problem is, that once my window is run as a modal, the tableview does not get an initial tableViewSelectionDidChange event. Each line of the tableview has a corresponding description, which is displayed into a textfield, when that line is selected.

So, what happens is, that the first row does get selected, but it does not get an tableViewSelectionDidChange for this initial selection!

And if I were to put code after runModal, well it's too late then, because the dialog has already closed.

How is the most graceful way to trap an event equivalent to what should be the first call of tableViewSelectionDidChange? Can I just send a tableViewSelectionDidChange call during the first time my numberOfRowsInTableView is called?

--
http://elfdata.com/plugin/ Industrial strength string processing, made easy.


"All things are logical. Putting free-will in the slot for premises in
a logical system, makes all of life both understandable, and free."

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.