Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DavidBlack

macrumors 6502a
Original poster
Jan 27, 2013
606
239
Somewhere In Apple's HQ ;)
Ok I am a average cocoa developer and I am making a app that purge memory. But I want to display the macs memory stats e.g inactive free and wired memory. But I have been having trouble also I want that while the purge command is being run I want the mac to run a progress bar can anyone help me? I have also posted a snapshot.
 

Attachments

  • Screen Shot 2013-04-15 at 3.48.09 PM.png
    Screen Shot 2013-04-15 at 3.48.09 PM.png
    207 KB · Views: 164
I am not sure how to implemented it to connect with a label

It looks like that code already sets a label, called memLabel, to store that text. So stick it in your controller and hook up an outlet called memLabel to your label in your XIB file.
 
It looks like that code already sets a label, called memLabel, to store that text. So stick it in your controller and hook up an outlet called memLabel to your label in your XIB file.

Thanks but it looks like this still is not working or maybe I am doing something wrong. Can you help I have included the source code if you want to edit or help me.
Please thanks in advance.
 

Attachments

  • Screen Shot 2013-04-30 at 3.48.55 PM.png
    Screen Shot 2013-04-30 at 3.48.55 PM.png
    470.3 KB · Views: 114
  • Screen Shot 2013-04-30 at 3.50.40 PM.png
    Screen Shot 2013-04-30 at 3.50.40 PM.png
    41.3 KB · Views: 111
  • MemTest.zip
    82.5 KB · Views: 89
For future reference, please just post the relevant code between
Code:
 and [/ code] tags so it appears right in your post... it's easier to read than having to open a thumbnail. You included the error message, so that's good.

Your error message says it all - there's no property for an NSTextField called text. If you open up the class reference, you can see that that's so, but also, at the top of the class reference, they mention a method by name that I think you'll find helpful. Have a look for yourself, it's in the [b]Overview[/b] section:

[url=https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextField_Class/Reference/Reference.html]NSTextField Class Reference[/url]

(By the way, you should learn to check the class references. Just Google the name of the class and "Class Reference" and the first result will almost always be the official documentation on the class straight from Apple, and they'll almost always have exactly the information that you want to use the class.)
 
You need to be more specific, David. I dont think anyone will code your app for you. So please be more specific
 
Thanks but it looks like this still is not working or maybe I am doing something wrong. Can you help I have included the source code if you want to edit or help me.
Please thanks in advance.
Using [_memTest setStringValue:[my variable stringValue]]; should fix the error you're getting in your screenshot.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.