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 7630817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:11:47+00:00 2026-05-31T06:11:47+00:00

Disclaimer: I’m really new to ObjectiveC so I may have made fundamental errors in

  • 0

Disclaimer: I’m really new to ObjectiveC so I may have made fundamental errors in the structure of my app so please let me know if there’s a better way to achieve my goal.

I’m trying to make an app that sits in the status bar like Dropbox. It should receive notifications. I have notifications working right now, but I have implemented them in an NSView that is in the application’s window. I want to remove the window to be able to achieve a no window application (a la Dropbox). If I remove the window, it removes the view that I’ve created and then removes my application’s ability to receive notifications.

Just in case I’m explaining this poorly, the notifications I’m receiving are received like this:

#import "test.h"    
@implementation test

- (id) initWithFrame:(NSRect)frameRect
{
    self = [super initWithFrame:frameRect];
    ...
    [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@selector(windowChangeNotification:) name:NSWorkspaceDidActivateApplicationNotification object:nil];
    return self;
}

- (void)windowChangeNotification:(NSNotification *)note
{
    ...
}

And test is an NSView:

@interface appTracker : NSView {
    appTrackerDB * eventDB;
}

How can I receive notifications without having a window? Or is there a way to receive notifications without a view?

Extra info: I’m implementing the status bar UI component as an NSMenu, similar to this tutorial.

I’m pretty sure there is but I’ve gotten lost in the literature.

Thanks for the help!

  • 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-31T06:11:49+00:00Added an answer on May 31, 2026 at 6:11 am

    Sure, every object in Objective-C can receive notifications, so just throw this code in your AppDelegate or wherever you find appropriate, maybe some model class.

    (btw: class names start with a capital letter in ObjC by convention)

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

Sidebar

Related Questions

Disclaimer: I am new to python and django but have Drupal programming experience. I'm
Disclaimer: I am new to django but have coded in Drupal I need to
Disclaimer: Never used php in my life. New to Unix and Jenkins I have
Disclaimer: I'm a new convert to iOS, so please feel free to tell me
Disclaimer: I am very new to iOS development. Please excuse the possible stupidity of
Disclaimer: I'm stuck on TFS and I hate it. My source control structure looks
Disclaimer: I'm fairly new to python! If I want all the lines of a
Disclaimer: I have no experience using YUI at all. I was wondering how the
Disclaimer: super new to rails. I'm using Rails 3.2 Anyways, I'm trying to create
Disclaimer : I'm new to web development. Scenario : I've built an application using

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.