NSString *x=@"\"/Sagar\' and \'Samir\' ";
Now, I want to remove characters between these.
\" /
\'
Intended output
x = (should have) @"and \'Samir\'"
So, Ms word give some options in find & replace, using wild card characters.
( just giving example )
Is it possible in cocoa?
...
I need to provide some passwords, API keys and similar sensitive data in my code. What are best practices in that regard? Hard-coded? SQlite? Some cryptographic framework?
...
Hello,
I'm learning Objective-C and my friend have a real Macintosh IIci, that uses a Mac System 7(specifically 7.5.5 with a 68k processor) and I've installed Metrowerks C/C++ IDE(I think it's the version 1, but I don't know), but i didn't tested it, then i want to know one thing: It's possible to develop in Objective-C using NSObjects/...
I've been tinkering with Cocoa for a few months now, and am trying to add undo/redo support to a strictly-for-learning-purposes Cocoa app I'm writing that lets you adjust iTunes track metadata. Thanks to NSUndoManager's prepareWithInvocationTarget: method, I have the basics in place — you can undo/redo changes to the Play Counts and Last...
How do you create a custom themed NSButton? I don't mean in a small way like changing the background color or changing from rounded edges to square edges. I want to replace the entire look and feel of the button. Is that even possible to do in Cocoa? Obviously I would have to subclass the NSButton class and go from there. Any help would ...
Is it possible to use the NSSpeechRecognizer with an pre-recorded audio file instead of direct microphone input?
Or is there any other speech-to-text framework for Objective-C/Cocoa available?
Added:
Rather than using voice at the machine that is running the application external devices (e.g. iPhone) could be used for sending just an ...
I'm attempting to migrate a Core Data SQLite store in my Mac OS X Leopard app. The migration itself is simple, there's just a couple of changes between the model versions, and there's one custom NSEntityMigrationPolicy that does a little bit of string manipulation.
99% of the time, this works perfectly. However, occasionally it crashes ...
I am a little confused about how I "set" and "get" the instance variables for an object that is contained within another. As you can see from the code below I first create a RocketBody which includes a SolidRocketMotor object. I am creating the SolidRocketMotor in RocketBody init and deallocating it in RocketBody dealloc.
My question i...
Do I have to read the files and iterate manually? I'd like to be able to change between LF and CRLF.
...
I try to send data to this php script:
mb_internal_encoding("UTF-8");
if(isset($_POST['format']) && isset($_POST['category']) && isset($_POST['title']) && isset($_POST['description']) && isset($_FILES['photo']) {
save($_POST['category'], $_POST['title'], $_POST['description'], $_FILES['photo']);
} else {
echo "There...
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
xmlParseChunk(context, (const char *)[data bytes], [data length], 0);
}
my Question is as follows
=> didReceiveData: method receives data in parts
Some what like this
first data----------| <masterData>Main</ma
second data-----| ster><maste...
I want to schedule a thread after a thread completion.
Is it possible ? How?
For example ( to specify my need )
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
// 1. response - schedule myThread
// 2. response - schedule a new thread which will be executed after myThread
// 3. response - s...
I'm working on some basic logging/history functionality for a Core Data iPhone app. I want to maintain a maximum number of history items.
My general plan is to ignore the maximum when adding a new item and enforce it whenever I need to fetch all the items anyway (e.g. for searching or browsing the history). Alternatively, I could do it ...
I'm looking for reading material to bridge the gap between "read Hillegass multiple times" and "productive Cocoa programmer". What materials do you suggest?
I am not particularly looking for iPhone/Cocoa Touch resources, though if they are also relevant to Mac programming, I'd take a look.
Edit: I do appreciate that there is no substit...
There are many Cocoa methods that require an NSError object as a parameter to a method, but are really a means of returning an error object to the calling method if errors exist. Is this returned object retained? That is, in the calling object code (the method to which the error is returned), does there need to be some code like:
NSEr...
In Snow Leopard there is a possibility to show free/busy time in iCal event. I've searched the headers of CalStore.framework and couldn't find any property that describes this field. How can i retrieve free/busy property of calendar event?
Thanks a lot,
Nava
...
I am just setting up a simple library application, basically a collection of "Members" and a collection of "Books". My idea was to implement both of these as NSMutableArrays so that I could easily add and remove objects. What I would like to ask is what is the best way to implement the link between a "Member" and a "Book" when they take ...
Is there a way using the command line console to read a user typed value as an NSNumber, or do I have to read the input as a c-type integer and convert to a NSNumber object?
(e.g.)
NSLog(@"Enter Age:");
scanf("%d", &userAge);
gary
...
Hello,
in my application I have a NSObjectController bound to all controls on the user interface. This works fine so far. The only problem I have is binding the selection of an NSComboBox to the same ObjectController. As far as I found out today the value of a ComboBox is always a string so the field in the Class of the OBjectController...
Initially I thought this was going to work, but now I understand it won't because artistCollection is an NSMutableArray of "Artist" objects.
@interface Artist : NSObject {
NSString *firName;
NSString *surName;
}
My question is what is the best way of recording to disk my NSMutableArray of "Artist" objects so that I can load th...