Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 5, 2012, 04:53 AM   #1
deba
macrumors newbie
 
Join Date: Feb 2006
Location: Essex, UK
Send a message via Skype™ to deba
Display Home folder size in menu bar - Xcode

Hi,

I'm looking for a way to display the size of a users home folder within the menu bar.

I have an apple script which displays to the user the size of their home folder, but would like something a bit more polished by displaying it in the menu bar.

This my First attempts at using Xcode / Obj-c.
deba is offline   0 Reply With Quote
Old Jul 5, 2012, 05:41 PM   #2
GorillaPaws
macrumors 6502a
 
GorillaPaws's Avatar
 
Join Date: Oct 2003
Location: Richmond, VA
You're trying to sprint before you learn how to crawl. In order to achieve your goal, you need to:

1. Learn Objective-C and understand the fundamentals of C.
2. Learn the basics of the Cocoa Frameworks.
3. Once you're there you're going to need to write a daemon and use Apple's NSStatusItem class.
4. If you want to ever try to sell it on the app store, you need to learn a bunch of stuff related to the sandboxing api's, and I'm not sure if they're compatible with accessing the disk to calculate the size of the hard drive anyways (I don't think they are but I could be wrong about this.).

What you want to do isn't impossible, but be prepared for a long journey. I think it might be practical to start with a more realistic, shorter-term goal.
__________________
How to ask good programming questions: Getting Answers
GorillaPaws is offline   0 Reply With Quote
Old Jul 6, 2012, 06:05 AM   #3
deba
Thread Starter
macrumors newbie
 
Join Date: Feb 2006
Location: Essex, UK
Send a message via Skype™ to deba
Quote:
Originally Posted by GorillaPaws View Post
You're trying to sprint before you learn how to crawl. In order to achieve your goal, you need to:

1. Learn Objective-C and understand the fundamentals of C.
2. Learn the basics of the Cocoa Frameworks.
3. Once you're there you're going to need to write a daemon and use Apple's NSStatusItem class.
4. If you want to ever try to sell it on the app store, you need to learn a bunch of stuff related to the sandboxing api's, and I'm not sure if they're compatible with accessing the disk to calculate the size of the hard drive anyways (I don't think they are but I could be wrong about this.).

What you want to do isn't impossible, but be prepared for a long journey. I think it might be practical to start with a more realistic, shorter-term goal.
1. I know this
2. Learning
3. I have some example source code for NSStatusItem_Class
4. I have no intension of making an app for sale, this purely for testing

I know there is much to learn, but for now I'm just trying to get this to work, so if anyone can help, It will be much appreciated.
deba is offline   0 Reply With Quote
Old Jul 6, 2012, 09:25 AM   #4
Red Menace
macrumors 6502
 
Join Date: May 2011
Location: Littleton, Colorado, USA
Unless you are just wanting to learn Objective-C, this can also be done in AppleScriptObjC, where you can use your AppleScript. You don't mention what OS or version of Xcode you are using, but AppleScriptObjC is available in 10.6+ from either Xcode or Lion's Cocoa-AppleScript template.

Either way, just putting up a status item is fairly trivial, and adding a menu isn't much more.
__________________
MacBook Pro / OS X Mavericks (10.9.4) / Xcode 5.1.1 / RubyMotion FTW
Red Menace is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
remove 'favorites bar' folder from menu..? fisherking OS X Mavericks (10.9) 3 Nov 3, 2013 10:06 AM
Can I display the date in my menu bar? stevefo iMac 4 Mar 23, 2013 09:47 AM
Menu Bar Size FJ2011 iMac 8 Jan 18, 2013 03:57 AM
Some icons missing on Desktop Menu Bar, Safari Menu Bar and Finder Menu Bar chroniceater MacBook Air 7 Jan 14, 2013 11:50 AM
Display icon missing on menu bar and not in display settings handre2 MacBook Pro 1 Sep 30, 2012 09:43 PM

Forum Jump

All times are GMT -5. The time now is 10:32 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC