On Thu, Dec 18, 2008 at 2:52 PM, Andre Masse <andre.ma...@videotron.ca> wrote:

> Let me explain a bit more. This is an in house application for only 3 people
> (me, my wife and my son) that was originally built with 4th Dimension. I
> agree that this is not the expected behavior for mac users but it is for
> mine, as this is the way automatic buttons are handled in 4D. I'm willing to
> make this more "mac like" but I want to prevent something like this:
>
> 1- user select a row in the master table view,
> 2- press the button's shortcut (intentionally or not)
> 3- a row is added to the detail's table view but since it does not have the
> focus, the row selection's is grayed and its not that evident that an
> operation has occurred. Further more, to edit the new row, the user will
> have to move the focus to the table view by clicking on it...

  I see ... I can't really suggest anything more than what you'd
mentioned if you're using bindings for the detail view (subclassing
and overriding). Well, except maybe binding the button to a
KVC/KVO-compliant "state" property somewhere else in your app that
returns true if the table's window's first responder is the desired
table ...

  I see the problem you're referring to, though, in a keyboard-driven
environment, but this is a difficult problem to solve without causing
other problems (ie, unexpected UI behavior). It's almost the classic
"more security == less convenience" scenario. In this case "security"
refers to that of your data integrity. :-)

> A typical use case is something like this:
>
> 1- do a query to find a client by name
> 2- user either add a client or modify one by adding rows in the detail's
> table view
> repeat...
>
> The master table view use a datasource (no bindings).
>

  Perhaps all your tables should use a datasource (and delegate). This
way your add button can call a method that directly checks the
responder status, then if everything is okay, adds the object, reloads
the table's data (so the object is available immediately - not
possible using Bindings), then call the table's
-editColumn:row:withEvent:select: method to make the table ready to
edit.

--
I.S.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to