nsview

any Cocoa control code that I can use that acts as a patch bay?

I would like to make a patch bay type control... any source online that anyone knows of that I could work from? Thanks ...

Drawing an "NSView" to a Custom-View - How? Am I taking the right approach?

I'm using Objective-C and Cocoa, whilst developing for Mac OS X - so not the iPhone/Cocoa Touch. (That said, I'd be interested if it was the same procedure for the iPhone) I'm working on a preferences window for a simple app. I have a NSWindow with a toolbar - there are 5 different items on the toolbar, all of which need to bring up a d...

Cocoa - loading a view from a nib and displaying it in a NSView container , as a subview

I've asked about this earlier but the question itself and all the information in it might have been a little confusing, plus the result i want to get is a little more complicated. So i started a new clean test project to handle just the part that im interested to understand for the moment. So what i want, is basically this: i have a vie...

Looking for Objective-C Spreadsheet Control

The company I work for has a Window application that includes integrated word processing and spreadsheet components. We use TextControl and FarPoint for the implementation. We have been developing an OS X counterpart for this application. The word processing functionality is actually pretty easy--the standard multi-line text view make...

How to catch multi-touch event in NSView

Dear all, Is there any way to handle multi-touch in a class which extend NSView? currently 1 touch with drag event is working now. ...

Dragging a button and dropping it at another location in its window

Hi all, I am trying a simple application with drag and drop: My application contains a window with a button over it. Idea is: user should be able to drag this button to another location in its window, such that its location changes but it performs same action when clicked! Can anyone suggest how can I implement it? Than...

What's the good way to synchronize calls to a NSView?

Hey guys, I have a view that receives new data from a secondary thread. Every time it does, it should redraw itself. However, it doesn't play nice with the run loop, and after some time (it's non-deterministic), I end up getting <Error>: kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region messages in the console. I'm not s...

How to grab video from NSView (WebView)

I need to grab video via QTCapture from NSView (actually WebView) but I don't know how. Can anyone help me? ...

Drag and Drop folder view cocoa

Hello, I need to make a drag and drop view in cocoa that will accept folders. I know it will use things like NSView and probably registerForDraggedTypes: (which I still am not sure how to go about using). Does anyone know how to get this working? Thanks in advance ...

forcing a view to draw in cocoa

I have a superview and a subview. Both are custom. During the drawRect of the superview, I am trying to add the subview, create an image from the drawn view, and remove the subview. My code works fine when I run it and start with the subview already drawn in the superview. It seems like adding the subview (during the drawRect) doesnt dr...

NSView Not updating?

Hello, Im working on a drag n' drop view and found some handlers for drag and drop actions on the web. I want to make it so it turns blue when the user drags a file over the drag and drop area and gray again when they exit the drag and drop area. The issues is its not updating when you drag your mouse over it or exit it. Heres some of t...

Simple drag and drop application not working

Hi all, I am trying a simple drag and drop application: I am creating a CameraIconView (subclass of NSView, containing some image views, text fields and a pop-up button), at run time. This view is enclosed within CameraIconEnclosingBox (subclass of NSBox) Requirement is: user should be able to drag CameraIconView at some other locatio...

How do I take a "screenshot" of an NSView?

I need to take the contents of an NSView and put them in an NSImage, for an experimental project. Is this possible? I did some Googling, tried two methods that I found - but they didn't really work. Any suggestions? ...

CATransition replaceSubView:with…is animating all views

Hi everyone, how can I make it so all of my view's subviews aren't animated here and only the currentPage's representedView and the newPage's represented view's? CATransition *transition = [CATransition animation]; [transition setType:kCATransitionPush]; [transition setSubtype:([self indexOfPage:currentPage] < [self indexOfPage:...

Layer-hosting view not displaying

I'm having trouble with a layer hosting view. This version of initWithFrame: works as expected (the view is filled black) providing 'Wants Core Animation Layer' is selected in Interface Builder: - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { [self setWantsLayer:YES]; [[s...

resizing a subview and having superviews / window resize

My window is structured like so: NSWindow -> NSView -> NSTabView -> NSScrollView -> NSTextView. If I change the size of the NSScrollView with setFrameSize: the superviews / window do not resize to accommodate my larger or smaller NSScrollView. Is it possible to programmatically have the Window, etc. automatically resize when I set the si...

kCGErrorFailure while performing drag and drop in NSView

Hi all, I have created a simple drag and drop application in which I am sometimes getting this exception msg, displayed in debugger console: kCGErrorRangeCheck: CGSNewWindowWithOpaqueShape: Cannot create window kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged. kCGErrorIlleg...

Going fullscreen in an itunes like application (cocoa OSX)

I have a cocoa application that has a finder like feel it and is made up of five views. On the left there is a gallery which is a finder like interface to choose a given object. This view stretches across the whole height of the window. Then on the right I have a window for a 3D simulation view and then below it I have three editing v...

NSView -scaleUnitSquareToSize leaves view blank until it's resized despite -setNeedsDisplay message

I used this guide: http://developer.apple.com/mac/library/qa/qa2004/qa1346.html to implement scaling in a special view. The scaled view is the document view of an NSScrollView. The problem is that when I call -scaleUnitSquareToSize, then call -setNeedsDisplay:YES (I also tried -setNeedsDisplay:YES on the scroll view), the view (not the...

Cocoa NSVIew notification when the view gets the key focus?

How can i get a notification if a NSView gets the key focus? I expected a method like "windowDidBecomeKey" from NSWindow but either i'm blind or there is nothing like this is NSView. ...