Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6642285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:54:45+00:00 2026-05-25T23:54:45+00:00

If I have a method like: @interface CharacterSet + (NSArray *)allCharacterSets; @end Can I

  • 0

If I have a method like:

@interface CharacterSet
    + (NSArray *)allCharacterSets;
@end

Can I bind to it using Cocoa bindings?

I’m trying to hook up an NSComboBox’s content values to it. When I enter CharacterSet.allCharacterSets into the “Model Key Path” field in IB, it doesn’t work, saying:

[
addObserver:
forKeyPath:@”CharacterSet.allCharacterSets”
options:0x0 context:0x200275b80] was
sent to an object that is not
KVC-compliant for the “CharacterSet”
property.

I’m not sure what else to try. Currently I have to store the return value of allCharacterSets into an ivar in my custom window controller (or custom window) to make it work, which seems like an extra step I shouldn’t have to take.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:54:45+00:00Added an answer on May 25, 2026 at 11:54 pm

    I’m working on a huge application and the extra steps you mentioned were really pain in the ass for me. So I developed a small proxy class that handles class method bindings.

    First I’ve added a small proxy class

    @implementation INClassProxy
    
    - (id)valueForUndefinedKey:(NSString *)key {
        return NSClassFromString(key);
    }
    
    @end
    

    Then added a category accessor to NSApplication

    - (id)classProxy {
        static INClassProxy *proxy = nil;
        if (proxy == nil)
            proxy = [[INClassProxy alloc] init];
        return proxy;
    }
    

    (I actually added this to my application delegate and implemented application:delegateHandlesKey:)

    Now you are ready to bind class methods to the Application object, even in the interface builder, with the keyPath @"classProxy.CharacterSet.allCharacterSets".

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have method (which is part of IMyInteface) like this: interface IMyInterface { void
I have a method I'd like to mock: public interface IServiceBus { void Subscribe<T>(ISubscribeTo<T>
I have an interface that defines some methods I would like certain classes to
Assume we have a method like this: public IEnumerable<T> FirstMethod() { var entities =
If you have a controller method like so: @expose(json) def artists(self, action=view,artist_id=None): artists=session.query(model.Artist).all() return
Let's say we have a method signature like public static function explodeDn($dn, array &$keys
I'd like to be able to call getProgram on objects which have that method,
I would like to convert a string into a node. I have a method
So, I have a method that performs a parametrised LIKE query. The method takes
I have a vararg method that I'd like to act as a proxy for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.