For my fullscreen app, I want to hide the cursor after a few seconds if it's not moved, like the fullscreen mode in QuickTime or iTunes. Presumably I'm looking to call [NSCursor setHiddenUntilMouseMoves:YES], but how do I know when to call it?
Presumably I'm looking for the same as http://stackoverflow.com/questions/744980/hide-mouse-cu...
Hi,
I've learnt Cocoa + Objective C primarily for iPhone development, and I need to utilize this skill set to build a very basic kiosk application for OS X in a couple of days. The application is basically as follows :
The setup has two touch screen monitors, the app must be running full screen mode. The monitor on the right acts as a...
I have a Cocoa application with a WebView and would like to add buttons to zoom in and out, and was wondering how to accomplish this.
I am also using custom scrollbars (via NSSlider) so the scrollbars that are part of the WebView are hidden.
...
Whenever I need to create a new NSString variable I always alloc and init it. It seems that there are times when you don't want to do this. How do you know when to alloc and init an NSString and when not to?
...
Hello!
I´m newbie. I have three xib files in my cocoa app:
"MainMenu.xib" the main window with a toggle button.
"CustomView.xib" a custom view.
"Alternative.xib" an alternative custom view with different size and number of controls.
My questions are:
How to display a custom view in the main window from "CustomView.xib"?
Toggle "Cu...
Quite often I encounter a scenario when I want to observe changes on a retained property:
@interface AnObserver {…}
@property(retain) Foo *foo;
Now when I want to set up the observing, I need to write my own setter, repeating all the boilerplate setter code:
- (void) setFoo: (Foo*) newFoo {
if (newFoo == foo)
return;
...
Hey folks, beneath is a piece of code i used for a school assignment.
Whenever I enter a word, with an O in it (which is a capital o), it fails!
Whenever there is one or more capital O's in this program, it returns false and logs : sentence not a palindrome.
A palindrome, for the people that dont know what a palindrome is, is a word tha...
So I have a task of reading from an xml file which contains a description of what form fields and comboboxes should exist in a dialog. I started by using NSForm and addentry to add the form fields, but then found out NSMatrix may be required to add combobox cells dynamically.
So my questions are:
1) Since NSForm inherits from NSMatrix ...
I have an NSTableView connected to an NSArrayController by setting the column values in interface builder to the appropriate keys in the NSArrayController. I'd like to use a custom sorting order, specifically, compare:options: with NSNumericSearch. Where can I either change my code to do this, or tell interface builder to use a differe...
Hi,
Following up on this question: http://stackoverflow.com/questions/3800253/kiosk-applications-os-x-programming-multiple-monitors
I'm an iPhone programmer just starting out with OS X programming, and I'd like to know how I can present multiple views sequentially.
What I basically need to do is - Have a welcome screen with a button c...
Hello,
I'm trying to write an application that prevents certain key signals from propagating beyond the OS in OSX. To clarify, I want to make it so that it almost seems to the user that the key they are pushing on their keyboard is broken. So, the associated letter won't show up in a textarea, the key won't activate a function in anot...
I downloaded Andy Potion's "PFLetsMove" framework here and added the Xcode Project to my application's project. I then dragged the framework from that to the Link Binary with Libraries and Copy Files build phases.
Now, if I compile the application with a call to PFMoveToApplicationsFolderIfNecessary() it works fine, so the framework is...
I got a file size in byte in a (unsigned long long) variable. Is there a standard way to convert it to a string, with localized units?
I am aware of those kind of solutions :
NSString * stringFromFileSize( FileSize theSize )
{
float floatSize = theSize;
if (theSize<1023)
return ([NSString stringWithFormat:@"%i bytes",th...
NSArray *ArtistNames = [RawData componentsMatchedByRegex:regEx1];
NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@"'"];
ArtistNames = [[ArtistNames componentsSeparatedByCharactersInSet: doNotWant] componentsJoinedByString: @"'"];
Thats my code at the moment basically i cannot use it as A...
Hi,
I'm trying to download http://www.vesseltracker.com/earth/vesseltrackerlight.kmz but am not getting all the bits and pieces.
I tried:
NSData *data = [NSData dataWithContentsOfURL: serverURL options: 0 error: &error];
to no avail
then switched to
- (void)startDownloadingURL:(NSURL*) url
{
// Create the request.
NSUR...
Here is my code:
-(void)startTask{
NSString * cmd = @"/bin/sh";
pty_ = [[PseudoTTY alloc] init];
NSTask * task = [[NSTask alloc] init];
[task setStandardInput:[pty_ slaveFileHandle]];
[task setStandardOutput:[pty_ slaveFileHandle]];
[task setStandardError:[pty_ slaveFileHandle]];
[task setCurrentDirectoryPath:[@"~" stringByExpandingTi...
Is there a better or shorter way of striping out all the non-digit characters with Objective-C on the iPhone?
NSString * formattedNumber = @"(123) 555-1234";
NSCharacterSet * nonDigits = [[NSCharacterSet decimalDigitCharacterSet] invertedSet];
NSString * digits;
NSArray * parts = [formattedNumber componentsSeparatedByCharactersInSet:no...
Hello, I would like to download a file without using NSURL/NSURLDownload/CFNetwork. I would like to use something else because I am having issues with people using snow leopard. I have had problems in the past (un-fixable leaks, crashes). Is there a different way to solve this problem?
...
I would like to make some bindings that toggle item titles in a popup menu based on a single numerical value in a text field. Let me explain:
This is my UI:
I want my menu items to automatically adjust to singular or plural based on the number in the text field. For example, when I type "1" in the box, I want the menu items to be l...
Hello again,
So, in reference to : http://stackoverflow.com/questions/3800253/kiosk-applications-os-x-programming-multiple-monitors
I have an 800x600 NSView and I need to scale this proportionally when I enter full screen mode using NSView's enterFullScreenModeWithOptions.
Right now, what's happening is the UI elements are stationary ...