• 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: Help with Custom Control
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with Custom Control


  • Subject: Re: Help with Custom Control
  • From: WT <email@hidden>
  • Date: Fri, 25 Mar 2011 17:46:04 -0300

On Mar 24, 2011, at 12:10 AM, Carlos Eduardo Mello wrote:

> Hi,
>
> I built a special control with a custom view and several parts, including standard controls and some subviews. The thing does special displaying and animation, and needs to be connected to other parts of the UI and to the document controller. The set up works very nicely. Isolating it as a unit helped me debug minor drawing bugs and make its internal behaviour very consistent. However, I need to use several of these  in the UI, so the whole wiring business involves dozens of connections in IB. Hence my questions:
>
> 1. Is there a way to make a custom NSView send IBActions as if it were one of the standard controls?
>
> 2. Is there a simple way to turn my little device into something I can add to the library and reuse in several places. The idea would be to treat it as aunit and be able to just wire an Action to the file's owner.
>
> 3. The way it is working right now is through a triple delegation - I need to have a mouse up event initiated in a subview of my custom view trigger an action in the enclosing view which is in turn forwarded to the controller.
>
> A, B and C are Custom Views
>
> A contains B, B contains C;
> B is C's delegate, A is B's delegate,
> File's Owner is A's delegate;
> Clicking C sends a message to F.O.
>
> It works, but I was wondering if the design is not too complicated? (I am trying to keep each part from having to "know" about other part's workings).
>
> I'd appreciate any ideas...

If you're working with XCode 3.x, you can write an Interface Builder plugin for your custom view. I'm sure there are good tutorials online on how to create them. In XCode 4, however, IB plugins aren't yet supported.

WT_______________________________________________

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: Help with Custom Control
      • From: Carlos Eduardo Mello <email@hidden>
    • Re: Help with Custom Control
      • From: Sean McBride <email@hidden>
References: 
 >Help with Custom Control (From: Carlos Eduardo Mello <email@hidden>)

  • Prev by Date: Re: copyPath:toPath:handler: more reliable than copyItemAtPath:toPath:error: ???
  • Next by Date: Re: copyPath:toPath:handler: more reliable than copyItemAtPath:toPath:error: ???
  • Previous by thread: Help with Custom Control
  • Next by thread: Re: Help with Custom Control
  • Index(es):
    • Date
    • Thread