Hello,
I decided to use an alert sheet with 2 buttons. When the user clicks the continue button a sheet made from a window should come down. The sheet comes down and the parent window closes along with the other sheet. The code I'm using is:
- (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(int *)contextI...
Are there any howtos?
What is the best practice here for background thread drawing.
Is it okay to store the rectangle data from [NSView drawRect] in a queue and let the background thread take the rectangle and create some bitmap and render the data into the bitmap and then use performSelectorOnMainThread:withObject to draw it? Or can i...
How would it be possible to invoke a method at the end of Cocoa's main event loop after each iteration? I want to do the exact same thing that NSManagedObjectContext's -processPendingChanges does. According to the documentation, "In AppKit-based applications, this method is invoked automatically at least once during the event loop (at ...
NSFileManager has a method to do copying.
- (BOOL)copyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error
If an error occurs, the third parameter (NSError **) upon return will contain an NSError object describing the problem.
Question: do I need to release it?
There are some other methods, for example t...
Can't find the Cocoa API call to set the modified marker of a window.
...
I have a set of data created by another app and stored in XML format on disk. Since this data is managed by this other app, I don't want to bother with loading this data into a Core Data store for two reasons: 1) it would be redundant storage of the same data, and 2) I would have to constantly update my own Core Data store to match upda...
Pretty much all the apps I use on a regular basis implement this 'seemly simple' scenario, yet I can't replicate this in my own Cocoa application. Please consider these steps:
The application is not running
You drop a file, or a selection of files onto the app's icon.
The app runs and performs some actions on the dropped files.
Maybe i...
Hello
I sink index of first row in tableview is '0' it is Correct?
If yes, HOW can I make so index of first row in tableview become '1' ?
this is need because my DataSourse start from '1', and I need that:
[myTableView selectedRow] = [myData row]
but no
[myTableView selectedRow] = [myData (row-1)]
...
Hi,
I've spent the last week on an unplanned excursion into the depths of the Macintosh sound system after NSSound proved to be unequal to the task.. I finally got my file playing with Audio Queue Services and now there's only one little thing left to do: switch output devices.
Unfortunately, it seems that I'm either doing something wr...
Hi,
I want to crossfade two NSViews and resize their NSWindow. I know how to do them separately but so far not how to do it simultaneously. I think I need a CAAnimationGroup for it. But because I'm dealing with two different objects, I don't know how to add the two animations in the group and I don't know how to start the animation beca...
I have a graphics app that uses a NSTextField instance for in-place text editing, this feature was added long time ago and I never had a reason to check it, however, I have recently received a report: text filed doesn't allow text formatting. Format -> Text menu subitems are all disabled, so there is no way to set the paragraph of a text...
Hi @ All,
I'd know if it exists a kind of CoreData server ?
The point is to get an "automatic API server" providing data to clients.
It can be useful to implement very quickly standalone Forum app, Games or anything on the cloud...
...
I have an NSCollectionView that is properly configured to display Core Data Entities based on what's found in an NSArrayController. These Core Data entities, named MyManagedType, are defined to include an int32 indexing number "indexNumber" to keep them ordered, and binary NSData *myData. I can also select the items by clicking them, b...
I've got an elegant system set up using Core Data where any time a property of a model object is changed it is automatically reflected in its associated view using key-value observing but I have ran into a problem using undo.
The problem occurs when I have deleted a model object. The associated view is destroyed along with all the key-v...
I'm writing a Cocoa application and I'm trying to export to the Excel XML format (ISO/IEC 29500-1) which is basically a zip file with a bunch of xml files in it named with a .xlsx extension.
I've tried generating apple script and using NSAppleScript to create the Excel file, which works, but is slow and the user has to have Excel instal...
Hello,
I create an NSString using,
NSString *myString = [[NSString alloc] initWithBytes:someBuffer length:sizeof(someBuffer) encoding:NSASCIIStringEncoding];
I used NSLog to output myString and it displays "Hello".
If this is the case, then why does this fail.
NSString *helloString = @"Hello"
BOOL check = [myString isEqualToStri...
Hey,
I'm loading a website's html code using NSString - NSString*webViewText = [NSString stringWithContentsOfURL:[NSURL URLWithString:[self getCurrentURLFromWebview:browser]] encoding:1 error:nil]; and I'd like to extract the RSS feed from them, but I got a few questions.
From what I know, most feeds are included in the website as such...
I am making a small app that deletes log files. I am using an NSTask instance which runs rm and srm (secure rm) to delete files.
I want to be able to delete files in:
/Library/Logs
~/Library/Logs
The issue is that the user account does not have permissions to access some files in the system library folder, such as the Adobe logs sub...
I need to know which image file type was used in the file i loaded with "initWithContentsOfFie" because i don't want to trust the file extension.
Unfortunately i can't find anything about the format in NSImage and NSImageRep,
...
Hello!
I am searching for a solution on how to format NSPredicate to search correct word in a string of text.
Currently I am using this code:
NSPredicate *predicate = [NSPredicate predicateWithFormat:
@"(content CONTAINS[c] %@)", word];
but it returns wrong resuls if the word is short, for example:
if the wo...