• 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: Interface item validation through first responder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interface item validation through first responder


  • Subject: Re: Interface item validation through first responder
  • From: Laurent Daudelin <email@hidden>
  • Date: Tue, 14 Jun 2011 13:36:21 -0700

You can still design views in IB that you set as the content view of windows at runtime.

-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 				http://www.nemesys-soft.com/
Logiciels Nemesys Software						email@hidden

On Jun 14, 2011, at 13:20, Luc Van Bogaert wrote:

> Hi,
>
> I'm hoping someone could provide some help solving the difficulties I'm facing with validation of user interface items. The problem is caused by my current GUI design, which is as follows:
>
> The contentview of my main window is designed to contain one of two different views, to be selected by the user at runtime. So the view controllers are not instantiated in IB, but rather in code during runtime.
>
> All the menu items and buttons in the interface use the target-action mechanism, but because of the previous design decision, I am targetting the "first responder" object instead of the actual view controller objects. When the user switches views held by the main window, I'm making sure the selected view also becomes first responder. So far so good.
>
> But now a problem comes up when adding another view to the interface. As this extra view contains some textfields, selecting one of the text fields makes it first responder, which in turn breaks my interface item validation, because now the targetted actions can no longer be found as part of the active first responder object.
>
> So, I seem to be forced to implement all my action methods in the AppDelegate instead of in my view controllers, or is there some better way to solve this problem?
>
> --
> Luc Van Bogaert
> http://users.skynet.be/luc.van.bogaert
>
>
>
>
> _______________________________________________
>
> 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

  • Follow-Ups:
    • Re: Interface item validation through first responder
      • From: Luc Van Bogaert <email@hidden>
References: 
 >Interface item validation through first responder (From: Luc Van Bogaert <email@hidden>)

  • Prev by Date: Interface item validation through first responder
  • Next by Date: Re: Interface item validation through first responder
  • Previous by thread: Interface item validation through first responder
  • Next by thread: Re: Interface item validation through first responder
  • Index(es):
    • Date
    • Thread