• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSArrayController/Modal dialog/KVO Gordian knot
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController/Modal dialog/KVO Gordian knot


  • Subject: Re: NSArrayController/Modal dialog/KVO Gordian knot
  • From: "email@hidden" <email@hidden>
  • Date: Sat, 12 Jun 2010 11:28:26 +0100

On 12 Jun 2010, at 09:55, vincent habchi wrote:

> Hi again,
>
> I am still stuck in my (very simple) dialog management. Briefly, I have a modal dialog that allows the user to create objects whose attributes are derived from various fields. I need to set the a default value to one attribute of a newly created object (after clicking on a button); however this scheme:
>
> [arrayController insert]
> [arrayController setSelectionIndex:0]
> [[arrayController selection] setValue:foo forKey:@"spam"]
>
> fails, because the creation of the new object is postponed until next Runloop iteration (so when the arrayController is void, there is no selection). I tried KVO on the "content" key of arrayController, but it fails also, the observation message seems to be hold until the modal runloop exits.
>
> Any possible alternative?

Modal windows fulfil a very specific purpose and manipulate the runloop accordingly.

Are you certain that you require application modality for this functionality?

A modal sheet attached to the application window is more flexible and forgiving.

Regards

Jonathan Mitchell

Developer
Mugginsoft LLP
http://www.mugginsoft.com
>
> Thanks,
> Vincent_______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >NSArrayController/Modal dialog/KVO Gordian knot (From: vincent habchi <email@hidden>)

  • Prev by Date: Re: How to specify the superview in the Interface Builder?
  • Next by Date: Re: NSArrayController/Modal dialog/KVO Gordian knot
  • Previous by thread: NSArrayController/Modal dialog/KVO Gordian knot
  • Next by thread: Re: NSArrayController/Modal dialog/KVO Gordian knot
  • Index(es):
    • Date
    • Thread