cocoa

jabber based server and client application in cocoa

Hi all, I have implemented an application which supports text chat. Now I want to implement voice chat and later video chat in it, but I have less time provided by client :( So I am planning to go for some open source code in cocoa, which I can use and easily in-corporate in my application. After analysis over net I found that Jabber ...

Strange artifacts after CILanczosScaleTransform

Hello, I'm trying to do image scaling using Core Image, using Lanczos Scale Transform filter. It is fine when I'm doing scaleup. But on scaledown and saving to JPEG I found a class of images which produces strange noise artifacts and behavior. For inputScale multiples to 0.5: 0.5, 0.25, 0.125 etc it is always fine. For others input...

Button should trigger more than on task (NSButton, NSTabView)

After a click of a Button I want to change to the next TabView and trigger the outcome of another class instance? Any Examples somebody could give me? ...

Suppress plugin loading in WebKit

Hi, My app uses WebKit to display previews of web, and I want to suppress plugins such as the Acrobat one from loading, mainly because of the unreliability it can cause, but also for UI reasons. I know I can use [WebPreferences setPlugInsEnabled:] to disable plugins, but I really want to do it on a case-by-case basis, i.e. Acrobat Disa...

Incompatible type for argument 1 of 'bezierPathWithOvalInRect' error

Hi, I have the following code: - (void)drawRect:(NSRect)dirtyRect { [[NSBezierPath bezierPathWithOvalInRect:[self theRect]] stroke]; } - (NSRect)theRect { return NSMakeRect(1, 1, 1, 1); // made up some values } When I compile it says "Incompatible type for argument 1 of 'bezierPathWithOvalInRect' error". When I do this, howev...

Which Cocoa view should I use for a list of messages?

I'd like to have a view that looks more or less like the message list in Tweetie (see screenshot) (no, it's not going to be a Twitter client, though it's similar ;). I'm not sure what Cocoa views should I use for that... I've mostly written stuff for the iPhone recently, and there's only one such control there (UITableView), but in AppKi...

GH-Unit and "Undefined symbols" error

I'm using GH-Unit for my unit tests. I've set it up according to the instructions, but I'm getting an "Undefined Symbol" error on this line: #import "GHUnit.h" #import "ChecklistAppDelegate.h" @interface TestAppDelegate : GHTestCase {} @end @implementation TestAppDelegate - (void)testStoringProperties { ChecklistAppDelegate *appD...

Bindings AND target/action?

Hi, I currently have a color well which keeps track of a color that gets saved in the NSUserDefaults. It is bound to an NSUserDefaultsController. However, I also want to listen for changes to the color so I can update my views accordingly. Therefore, in addition to the binding, I added a target/action to the color well to my preferences...

Drop on NSTableView Behavior

Hi, I have an NSTableView and I have successfully implemented both tableView:validateDrop:proposedRow:proposedDropOperation: and tableView:acceptDrop:row:dropOperation:. I don't need tableView:writeRowsWithIndexes:toPasteboard: because that's for dragging objects out of the NSTableView. Now, the problem is that I want it to behave kin...

Custom NSPopUpButtonCell drawImage:withFrame:inView not getting called

I have a custom NSPopUpButtonCell and I'm trying to override drawImage:withFrame:inView. Strangely, the drawImage method is never called, but the image appears on screen. What am I missing? I've checked to make sure my cell is properly installed -- I am getting drawWithFrame:inView:controlView messages. Note that I'm trying to compens...

How to create those black/white icons used in the status bar?

How to create those black/white icons used in the status bar? I believe it has something to do with the alpha channel of the image but I need to find out how to do that in photoshop or gimp. ...

iPhone - NSDictionary to NSArray with preserved order

I've got a couple dictionaries in a property list, that make up a menu system for my game, like so: New game Easy Normal Hard Load game Recent Older Options Game Sound etc.. Each item in this list is a dictionary. I use UINavigationController and UITableViews to display this menu system. When an item is ch...

Good way to start developing for iPhone, given some experience in Cocoa on Mac

Hi, I have some experience of Objective-C/Cocoa programming on Mac and I'd like to start developing for iPhone/iPad with UIKit. (I just paid $99 to the mother ship.) What would be a nice way to start? I'd like to have your suggestions/recommendations. More specifically, Which book I should buy? Is there a nice book contrasting AppKit/...

Problem with my custom class and it's instances

Hello. I'm doing an app where user can click on a map and hear a different sound playing depending on the location clicked. I've got a point in polygon for this and it works perfectly. I've created audio playlist system also that queues audiofiles and plays them in order. This too works. However I'm trying to implement a method that chec...

NSTrackingArea with fullscreen window/view

I'm trying to install a NSTrackingArea into a fullscreen view in order to get mouse moved events. However, whenever I do, I get an assertion error. I've searched the web, but have not been able to find any leads. *** Assertion failure in -[_NSFullScreenWindow _setTrackingRect:inside:owner:userData:useTrackingNum:install:], /SourceCach...

How to control the scientifc style of NSNumberFormatter?

Hi, I'm converting a long string representing a very big or small number to a string in scientific notation. E.g. 9999999999999999999999999 to 9.999999999999999E24. I use NSNumberFormatter. NSNumberFormatter *ns = [[NSNumberFormatter alloc] init]; [ns setNumberStyle: NSNumberFormatterScientificStyle]; NSString *result = [ns stringFromN...

Week View Control for Cocoa (Apple Mac OS X Dev)

Hi there, does anyone know if there is a control for Cocoa that has the same abilities like the iCal Week View? Which means a spreadsheet like view for the whole week with Appointments to render in their timeframe. I searched through Google for some time now and didn't find anything. Thx in Advance Steve ...

What's the equivalent C# 'Thread.Join()' in Cocoa?

I'm making an iPhone app using threads. I was used C# for a while, there was a method Thread.Join() which blocks current thread for specific thread completes execution. What's the equivalent in Cocoa for it? Or Alternatives? ---edit--- PS. I'm using NSThread. ---edit--- I'm finding a method like 'waitForThreadExit' which blocks calle...

Pressing tab in NSTextField selects all text instead of going to next control

I have multiple views all work fine but for some reason a view does not focus the next control when typing the tab key. Instead it selects all text of the current NSTextField. I am forgetting something really stupid here; can anyone help me on this? So it's an NIB containing a NSView. On the view are two NSTextFields, pressing tab in o...

How do I get data from an NSTableView?

I have an NSTableView with two columns and a data source that fills it with data. That part works. How do I get data (NSString format) out of the NSTableView? I can get the selected row but NSTableView doesn't seem to have methods for accessing data. Getting the data from my data source seems to return useless data (type id and NSLog()...