|Jul 5, 2012, 05:53 AM||#1|
Display Home folder size in menu bar - Xcode
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.
|Jul 5, 2012, 06:41 PM||#2|
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
|Jul 6, 2012, 07:05 AM||#3|
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.
|Jul 6, 2012, 10:25 AM||#4|
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 Yosemite (10.10) / Xcode 6.1 / RubyMotion FTW
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Some icons missing on Desktop Menu Bar, Safari Menu Bar and Finder Menu Bar||chroniceater||MacBook Air||8||Dec 5, 2014 08:45 PM|
|remove 'favorites bar' folder from menu..?||fisherking||OS X Mavericks (10.9)||3||Nov 3, 2013 11:06 AM|
|Can I display the date in my menu bar?||stevefo||iMac||4||Mar 23, 2013 10:47 AM|
|Menu Bar Size||FJ2011||iMac||8||Jan 18, 2013 04:57 AM|
|Display icon missing on menu bar and not in display settings||handre2||MacBook Pro||1||Sep 30, 2012 10:43 PM|
All times are GMT -5. The time now is 06:10 PM.