To start, there's an NSArrayController ("Servers") whose content is an array of "server" objects.
I also have an NSTableView with a column. The column is bound to Server's "arrangedObjects.status" property.
I use a custom NSValueConverter to make that status into an image for the column's dataCell which is an NSImageCell.
What I don't...
Hi. I have added a menu item to menu controller window by dragging a item from library. Now i want to provide a action to that menu such as on click that menu item a applescript file should run. Can any body help me out this?
...
Hi. I have added an action for a menu item in my app. I have added an action using applescript. Now for that action to perform i want to add user authentication. How to do this?
...
Hi,
I have an application that includes a WebView, which automatically displays PDFs in WebKits WebPDFView. When the user hovers above the lower portion of the document, an overlay appears that enables zooming, opening in Finder and saving the PDF in the download folder.
I would like to implement the latter, but I have no idea how to g...
I have a NSTreeController which array is bound to a "items" (custom) property of an NSArrayController subclass.
As the tree controller is not bound to the selection of the NSArrayController I need to make sure to let the tree controller know that items has to be fetched after the selection of the array controller changes.
I have done t...
I just want to clarify if I am understanding how dates & time zones work.
Basically, I have a date string @"2008-07-06 12:08:49" that I want to convert to an NSDate. I want this date and time to be in whatever the current user's time zone is set in. So if they are in GMT or HST, it's still 12:08:49.
If I have date in unix form 12153821...
So I am creating an class that does an animation. There is a timer delay. So I will instantiate this class. Have it do its thing then have a timerFinished type of delegate to continue on.
This question comes from my sheltered garbage collection career.
What is the best way to release this object?
Do I have it release itself when it...
I read that that class NSWindows has some of its own events, but I could not find a list of all them. I believe there is an event that occurs when the window becomes deactivated.
Does such an event exist?
...
I have a problem that I solved using delegates, but now I am thinking I may have made a mistake.
This is what I want to do.
I have a class that runs on a delay. When it is done it has a finished delegate that it calls.
Now I have the main class that creates two of these delay classes.
I don't want them to both be handled by the sa...
I have noticed that Quicktime 10 is now able to open Transport Stream Video files and also search reliably within that video file(Which is something that VLC can not seem to handle). Quicktime 7, on the other hand, is not able to open the same Video File.
When I try to open that same Video File within my Cocoa Application, which is usi...
Obviously the following in the main method should lead to a leak:
NSMutableArray *strings = [[NSMutableArray alloc] init];
[strings addObject:@"Hello"];
[strings addObject:@"Howdy"];
return 0;
and the clang LLVM reports the leak. However, working through the Hillegass book, I tried analyzing the following code, which again does not r...
Hi,
Here is what I'm doing, when I create an image with the path in the bundle:
UIImage *image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image" ofType:@"jpg"]];
What I want to do is trying to find the path for my image but without using the extension, without using 'ofType' (because the name of my i...
Hi All,
I need to add a view to NSOutlineView.
This view contains some text field and button, while expanding the outlineview should show this view.
Please let me know how to add the view the NSOutliveView.
Thanks,
Felix.
...
Hi,
I am writing a document based application on OS X. One feature oft this application will be an "import" function.
This function will read data files from the disk which contain data as raw BLOBs and can be parsed into one oder more documents. For this function I will have to create documents programatically. The main problem is, th...
All,
How can I use (NS)Views from other applications as Layers in my CA app. I.e. I'd like to display a Keynote presentation as Layer in my CA app.
I found the iChatTheatre API which looks promising - however I'd need the oposite. An API to get the contents from an app - not to provide it.
Any pointers?
Thanks.
...
Hi,
I am creating an application using NSDocument. MyDocument.xib just has an NSTextView in an NSScrollView. When I do a ⌘S to save it, I get an error message ( 'The document “Untitled” could not be saved as “Untitled.rubytext”. '). How can I make my application save it as an RTF file? I mean using NSDocument (I guess dataRepresentation...
Hi,
I'm creating an application in RubyCocoa and I have this code:
fileContents = OSX::NSAttributedString.alloc.initWithData_options_documentAttributes_error_(data, null, null, outError)
It gives me this error:
2009-12-31 19:42:54.317 Ruby Text[3791:a0f] MyDocument#readFromData_ofType_error_: OSX::OCMessageSendException: Can't get O...
My managed object has a relationship called items. My subclass has a method called itemCount. Unfortunatly my attempts to get the object count in the items relationship always returns 0. Here's the relevant code:
@interface List : NSManagedObject {}
@property (nonatomic, retain) NSSet* items;
@property (nonatomic, readonly) NSNumber * ...
I am working on implementing tabs for my application. Everything is working well except I can't figure out how to draw the tabs in a lighter shade of gray when the window resigns main status. I am successfully receiving a NSWindowDidBecomeMainNotification and redrawing the tab bar but I am not sure how to calculate the new gray color for...
I am interested in creating a method to find if the current date falls between certain times on any given day. It is for a scheduling program, so I want to find what event is occurring at the current time. Every day has the same set of times: 820-900, 900-940, 940-1020, etc. Since this must be done on any given day I do not know how to c...