cocoa

Why isn't my ScrollView/CATiledView zooming properly?

I have a UIScrollView backed by a CATiledLayer. The layer is pulling tiles from a server and displaying them in response to what is requested when drawLayer:inContext is called. Here's what it looks like: -(void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx{ ASIHTTPRequest *mapRequest; WMSServer *root = self.mapLayer.pa...

UIScrollView loading an image

i wanted to find an "easy" way to use the pinch/zoom function on my app! so i decided to use a UIScrollView. so far so good. i load my image from an sqlite db like so: - (void)viewWillAppear:(BOOL)animated { imageView.image = entity.Aattribute; } - (void)viewDidLoad { self.title = @"Tit...

CGDisplayCapture and system key events

Hi, in my app i uses 2 display, one for the UI and one for rendering with fullscreen NSOpenGLContext. I capture the second display with CGDisplayCapture, but this capture disable system key events just like command+tab. Is there a way to re-enable it or i just take a mistake? Thanks! ...

Using drawAtPoint with my CIImage not doing anything on screen

Stuck again. :( I have the following code crammed into a procedure invoked when I click on a button on my application main window. I'm just trying to tweak a CIIMage and then display the results. At this point I'm not even worried about exactly where / how to display it. I'm just trying to slam it up on the window to make sure my Tra...

Get layout frame of NSView (i.e. ibLayoutInset)

I'm working on an Interface Builder-type app for interface design. I would like to be able to align NSView's along their layout frames. Is there a way to access the ibLayoutInset property from my code? ...

Confused about copying Arrays in Objective-C

Lets say I have an array X that contains [A,B,C,D,nil]; and I have a second array Y that contains [E,F,G,H,I,J,nil]; If I execute the following: //Append y to x [x addObjectsFromArray:y]; //Empty y and copy x [y removeAllObjects]; y = [x mutableCopy]; What is the value of y? is it?: [A,B,C,D,E,F,G,H,I,J,nil] Am I performing the ...

UITouches not detecting.

Hi, My UItouches is not detecting in my Slideshow nib file. What is the problem? Can anyone help? @class Slideshow; @interface RootViewController : UIViewController{ PreferencesController *preferencesController; Slideshow *slideshow;} Slideshow Implementation @implementation Slideshow - (void) touchesBegan:(NSSet*)touches withEven...

How to implement NSTableView class using (MVC) archiciture?

I want to implement MVC architicture in my project. So I have to implement NSObject class for NSTableView.But some delegate method is not called. How to implement this class? Please help me for this issue. ...

Prevent selecting all tokens in NSTokenField

Is there any way to prevent the NSTokenField to select everything when pressing the ENTER key or when making to the first responder maybe using the TAB key? ...

How to convert elements of NSMutableArray to NSString

I have 1 NSMutableArray and I want to convert whatever data in array will be in NSString. tell me code for that. Array is nothing but object of NSMutableArray class. ...

NSRunningApplication, return list of recent used applications?

i'm trying to get a list of the most recent used applications. NSWorkspace returns me a list of active applications and i can sort them on a few options using NSRunningApplication. see list below: launchDate finishedLaunching processIdentifier i dont want the lauch date but the recent 'active' date (like the way cmd-tab sorts). Does ...

check internet connection in cocoa application

Hi How do I check internet connection in cocoa application? Can Reachability code from iphone apple example be reused for this purpose? Thanks, Nava ...

simple image animation with the keyboard

Hi the app I am currently working on requires a simple animation to be performed, which I am able to do but timing is an issue. The app uses the slightly opaque keyboard and I have set up a black background to make it more visually pleasing . The app is a utility app and as the user clicks on a settings button the app will flip which loo...

NSOpenGLView drawRect does not get called

Hi, I am currently trying to create a simple cocoa NSWindow programmatically instead of using Interface builder (I have got my reasons to do so). this is a quick test: int main(int argc, char** argv){ NSWindow *mainwin; CocoaGLView *mainview; NSRect scr_frame; unsigned int style_mask; NSAutoreleasePool *po...

C# or windows equivalent of OS X's Core Data?

I'm late to the boat and have only just now started using Core Data in OS X / Cocoa - it's incredible and is really changing the way I look at things. Is there an equivalent technology in C# or the modern Windows frameworks? i.e. having managed data types where you get saving, data management, deleting, searching all for free? Also wo...

Creating a cocoa Application without nib files/fully pragmatic

Yes, I know this goes against the whole MVC principle! However, I'm just trying to whip up a pretty trivial application - and I've pretty much implemented it pragmatically. However, I have a problem... I create an Empty Project, copy all the frameworks over and set the build settings - and I get errors about the executable.. or lack of...

When is [NSWindowDelegate windowWillClose] called?

I have observed that windowWillClose is called when the user closes a window but is NOT called when the window is closed because of app termination. Now, for me this is a good thing because I want a certain piece of code to run when the window is closed but not at shutdown. The reason for the question is that I cannot see why this shou...

How to make Finder 'Open With' work for my application (XCode, OS X)?

I have created an application that is capable of playing audio files. This in itself works fine, and so does drag&drop from finder to my application. What I would like as well, is that people can use my application from Finder using the Open With menu (or even allow them to set my application as default for a certain file type) After a...

From iPhone OS to cocoa on OSX...

Hi - this is quite a basic OSX/cocoa question. I come from an iPhone OS development background. I'm now trying to write apps for OSX, but I don't understand where cocoa on OSX decides where the program gets control. I can see the main function, but where does program control go from there? Say for example I want to programatically cr...

Memory consumed by an object during its lifetime

How can i trace memory consumed by an object in its life time when i am testing my application on device? [e.g.: without any instruments if possible] ...