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

  • SEARCH
  • Home
  • 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 7013261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:21:49+00:00 2026-05-27T22:21:49+00:00

I have extended NSScrollView to be non-flipped with a category (by default it is

  • 0

I have extended NSScrollView to be non-flipped with a category (by default it is flipped). Then I added an NSScrollView to my application with Interface Builder. The NSScrollView is flipped.

How can this happen? I don’t include my category in any source file in my project. I only compile it in which seems to somehow be enough. And I did do a clean build, just to be safe.

And most importantly: How can I change this behavior? I don’t want my nibs to automatically pick up all categories they can find, on the other hand it could be handy to sometimes include them. But I’ve always seen categories as opt-in, not opt-out as this seems to be here.

Any idea?

  • 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-27T22:21:50+00:00Added an answer on May 27, 2026 at 10:21 pm

    Categories apply to the entire class; all instances of NSScrollView ANYWHERE in your program will pick up the new behavior. For this reason, it’s generally not a good idea to override existing methods in a category; you’re changing the behavior of that method for all users of the class, not just your own instances.

    So categories are neither opt-in nor opt-out; they are absolute and overriding. If the category is compiled into the program, then every instance that class will be affected. They can neither opt in nor opt out; the new behavior is forcibly imposed upon them by the runtime. Keep that in mind when using categories.

    If you want to change the behavior for some instances, then you should make a subclass of NSScrollView (call it UnflippedScrollView or something) and override the method there. Then use your subclass where you need an unflipped scroll view.

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

Sidebar

Related Questions

I have extended the AbstractTableModel to suit my requirements. Now this table can be
I have extended the Application class like this: public class MyApplication extends Application {
I have extended org.eclipse.ui.editors.text.TextEditor to implement a custom editor. For this editor, I have
I have created a SharePoint workflow in visual studio , I have extended this
I am building an application that I want to have extended with modules that
I have Message class which I have extended and added new property. class ChildMessage:
I have extended PHP's mysqli class, which works fine. But how can I make
I'm having troubles extending the Application class to declare global variables. I have extended
I have extended the Entity framework to implement an interface by adding to the
I have extended threading.Thread - my idea is to do something like this: class

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.