I can't believe this has proven sooo ellusive to find even a single example of ANYWHERE (I have googled the CRAP out of this!) but can anyone show me how to do basic Caller ID detection in a Mac app? ...preferrably Cocoa but will be willing to go Carbon if I must? Now I'm not looking for a full-on telephony API example although again, ...
I have data stored in a sqlite3 database and have several places that I read and write data to and from the database. The problem I am running into is that if the SQL statement gets to be very long the sqlite3_prepare_v2 method returns an error.
This code works:
NSString *strSQL = @"UPDATE commandList SET displayName=?, type=?, formula...
Hello,
I have an NSArrayController whose content is the "servers" property of my AppDelegate.
I have an NSTextField which is bound to the "selection.name" property of the NSArrayController and I have buttons attached to the "add:" and "remove:" actions on the NSArrayController.
What I'd like to see happen, is when I click the "Add" bu...
Here is my code:
for (NSManagedObject *object in array) {
if ([[object valueForKey:@"DueDate"] isLessThan:[NSDate date]]) {
count++;
NSLog(@"Looped");
NSString *test = [[NSString alloc] initWithFormat:@"%@", [object valueForKey:@"DueDate"]];
NSLog(@"%@", test);
}
}
NSLog(@"%i", count);
NSDockTile *aTitle = [[NSApplication shar...
I'm trying to get a CALayer with a black background to display. I've attached the AppDelegate as the delegate to the file's owner. The console reports correctly the "awaking from nib..." log statement. I however, just see a blank grey window (335x390 in size), with no black box drawn in the middle. What concept am I missing?
Thanks in a...
I have the following code which should update a value in NSUserDefaults:
- (id) createBoardWithTitle:(NSString *)pTitle withScores:(NSArray *)pScores andNames:(NSArray *)pNames andDisplayStrings:(NSArray *)pStrings orderBy:(NSString *)pOrder ofType:(NSString *)pType
{
if((self == [super init]))
{
boardEntries = [NSMutable...
Just as background, I'm building an application in Cocoa. This application existed originally in C++ in another environment. I'd like to do as much as possible in Objective-C.
My questions are:
1)
How do I compute, as an integer, the number of milliseconds between now and the previous time I remembered as now?
2)
When used in an obj...
Hi
I want to open the user's Mail client on clicking a button and populate the message body with some HTML content.
While my code successfully does that (using mailto: URL scheme), the HTML content shows up as is (i.e. the HTML is not formatted).
Is there a way I can specify that my message contains HTML when opening the Mail app? Or ...
Using Cocoa or basic c, how can I convert a double to a string representation and then convert it back to the exact same double. Readability is not important, only accuracy.
For example, will this work:
double a,b;
a=some value;
b=[[[NSNumber numberWithDouble:a] stringValue] doubleValue];
...
I want to develop applications on mac os x. please suggest me the good book for it.
And good book on Cocoa also. If possible please send me the links of free ebooks on these.
...
What is the difference between carbon and cocoa ? For what type of applications we should use carbon and for what type of applications we should use cocoa ? Which is the best of both for developing applications in Mac OS ?
...
Hi,
The Session 426 "state of the art cocoa - user interface design" (MAC session) is really helpful.
The title of the code sample used during the session is "Exposure".
I cannot find it in the Mac Dev Center.
Can you say me if the example is available on ADC website?
Thanks.
...
I'm trying to figure out whether or not the current locale uses a 12 hour or a 24 hour clock. I've been checking out NSDateFormater to no avail. Any leads?
Thanks!
...
Ok, i'm new to the whole GUI programming so this might be a very simple question but has proven difficult to me.
I have an application with 3 buttons. Button A is the main button, it starts and stops the application. I created a class with an IBAction on it and wrote the code for that button. it works. I also have button B and C that ar...
My application currently uses CoreData as a backend to store to a single SQL data file stored in ~/Library/Application Support/MYAPP/MyDataFile.sqlite. I know it's an unusual situation, but what is the best way to "lock" this file so that if the user decides (for whatever silly reason) to run a second copy of my app, Core Data won't frea...
Hi,
I am having problem with PDF conversion to images. I would like to create an image file for every page in PDF document.
This is the code I am using and works fine. Every page gets converted into the image, but I have problem with image resolution. I don't know how to set the resolution of the output images. Can someone help me out?...
Is there an easy way to convert an Objective-C 2.0 file to Objective-C 1? I am writing a Cocoa app, and I decided to support Tiger, which doesn't support Obj. C 2.0. I know I should have thought of it before I wrote a whole bunch of code, but is there an easy way to convert it back? Thanks!
...
Is it possible to implement a locking effect in a NSPreferencePane that we create? Similar to the lock found in other system preferences panes (such as Energy Saver, etc)
I know that I could create a keychain item and then just have the enabled boolean of the controls bound to something that depends on the user authenticating successful...
I'm trying to write some functions that import/export only some objects of certain entity from the database of CoreData. I have googled and I found not much helpful hints so far... the only one example that helped me is this tutorial: MultiThreding code sample from this site
somehow I could magage to export objects in XML, but in this e...
Hello all,
I am getting an error in Xcode that says "whatEverVariable is undeclared" This is happening inside the .m file and also outside of the class itself. I have declared the variable inside the curly braces of the .h file and am using @property and @synthesize to access the variable. However I am getting that above error in the ...