Hi am writing small app for posting twitts on twitter.com
I manage to create statusbar icon next to clock and battery monitor, but now I am stacked...
I wanted to add menu item text area max length of 140 chars, (4-5 rows text input field)
something like spotlight but multi-rows
(BTW I have got working class, to put and get twitts on t...
How would I get notified of a value of a NSDatePicker, when it's changed?
...
Is there a fast way to make headers public when setting up a Framework in Xcode? I always have to click through one by one, changing each one from private to public. This irks me. Thanks.
...
Hi,
I'm a fairly novice obj-c developer and have a question on how to set up a client-server relationship. I'm designing (mostly as a hobby) a board game to be played over the internet with friends and family (think monopoly). My problem: how do I set up the appropriate client-server relationship to have one server with multiple clien...
Some code I am unit testing needs to load a resource file. It contains the following line:
NSString *path = [[NSBundle mainBundle] pathForResource:@"foo" ofType:@"txt"];
In the app it runs just fine, but when run by the unit testing framework pathForResource: returns nil, meaning it could not locate foo.txt.
I've made sure that foo.t...
Hi,
I am trying to Set/Get Volume level of Input device which has only single channel but no master channel, then it fails to retrieve the kAudioDevicePropertyPreferredChannelsForStereo and intermittently kAudioDevicePropertyVolumeScalar for each channel. But this works well for Output device.
So is there any difference in setting/gett...
Mac OS X 10.6 — Cocoa
I'm using global event monitor for displaying status item menu using custom keyboard shortcut:
globalEventMonitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSKeyDownMask handler:^(NSEvent *event)
{
if ([event keyCode] == kVK_F12)
{
[self handleGlobalShortcut];
// How to prevent syste...
I am making an Cocoa app, using Core Animation to create custom UI. However, whenever I drag some layers around, they often leave some "residuals/traces" onto the other layers.
So far, my guess is that it is related to my usage of [setNeedsDisplay]. To my understanding, as I drag a layer around, I don't need to call this method to that ...
What kind of thing is self? Is it correct to call it a pointer? Or is it a variable? Or what else?
...
I am trying to create rectangular metal toolbar icons for a mac app like the ones seen in Safari, but can't seem to find any information on the pixel size.
Human Interface Guidelines recommends that metal toolbar buttons should not exceed 19x19, but doesn't specify what the size of the icon should be if the user chooses "Use Small Size...
Is it possible to have the values displayed in an NSComboBox be different from what is retrieved with objectValueOfSelectedItem?
So, it will display an object's string name but it's int recordId is returned instead of the string name? Other than using selected index and getting it from the source array, of course...
...
So awhile back I made a cocoa widget that was a button that when pressed, would pop up a popup menu and handle the selection. This was quite trivial using the NSPopupMenuButton class but now I need to do something slightly different. I have an openGL widget and when I click on a certain part of this widget, I need to pop up the same po...
I've got some data stored in Core Data that looks something like:
| name | identifier | other_stuff |
I need to display the names in a UITableView, but I only want to display the names with unique name-identifier pairs. So for:
John | 3 | foo
Betty | 4 | foo
Betty | 4 | bar
I only want the query to return John, Betty. Something li...
I'm writing a simple OSX app using Python and PyObjC. I designed the settings dialog using Interface Builder and I use ibtool to compile it, then load it from Python. The problem is how to access the controls I have in this window from the Python code? I played around with iPhone development a bit before and I remember I need to have an ...
I have an application that pulls data from the web, parses them, and compiles the results in a search interface. Since the data are not co-dependant, it made sense to multi-thread the application to execute multiple fetches and parses simultaneously. I use NSInvocationOperation on a search and parse object I have written to execute thi...
// --------------------------------------------------------------------
UPDATE: I messed up. I left a call directly to openfeint in my AppDelegate->onApplicationWillResignActive which was causing the compiler C++ error.
My Appologies, the singleton does work should anyone be thinking of trying the same thing. Just be sure to include t...
I'm trying to assemble a NSTextView by hand as in Apple's TextSizingExample and found a boring bug. If you run TextSizingExample and select "Wrapping Scrolling Text" mode, then you'll see the text being partially hidden by a vertical scrollbar. Tried to play with the size and autoresizing mask of text container and text view but it didn'...
I am having an issue with using a shake gesture with modal view switching. The shake gesture works when I move into the specified view controller the first time. When I exit and return however, it does not. I have implemented the can become first responder and viewdidAppear techniques, and the console detects a shake using an NSLog en...
I was doing a rather ordinary addPersistentStore to an NSPersistentStoreCoordinator, and it generated an &error code.
So I went to NSLog it, and got an access error when I did this:
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
which seems to be the common idiom.
When I reformatted the error statement as follows:
...
The following code compiles fine when compiling as Mac OSX 10.6 as the active SDK (linked with the 10.5 frameworks, 10.5 set as the base SDK)
IOBluetoothHostController *controller = [IOBluetoothHostController defaultController];
However, if I compile it with Mac OSX 10.5 as the active SDK, I get an error message saying that IOBluetoot...