Re: Threading synchronization: does a primitive exists?

2011-05-07 Thread Ken Thomases
On May 7, 2011, at 6:00 PM, Chris Hanson wrote: > The thing to remember about NSConditionLock is that it's a lock that can only > be acquired when it's in the specified condition. That sentence is a bit confusing. It can be read two ways, one of which is correct, the other incorrect. If one c

Re: drawing onto CVPixelBuffer

2011-05-07 Thread douglas welton
Have you taken a look at the CaptureAndCompressIPBMovie sample code? That code does something very similar to what you appear to be in need of. On May 6, 2011, at 5:30 PM, Jean-Daniel Dupas wrote: > > > Le 6 mai 2011 à 22:22, eveningnick eveningnick a écrit : > >> Hi >> I have a CVPixelBuffe

Re: NSTextView and NSTextContainer size & clipping area

2011-05-07 Thread Ross Carter
We need to see your code. In general, any drawing code after the call to super in the textView's drawRect method will draw. But maybe you are trying to do something different. On May 7, 2011, at 3:13 AM, Дмитрий Николаев wrote: > But when i try draw a line in NSTextView, it limited to frame of

Getting NSWindow's contentBorderThickness working on a transparent window

2011-05-07 Thread Dimitri Bouniol
Hello, When an NSWindow's backgroundColor is set to clear (and it is non-opaque), setting the bottom contentBorderThickness seems to have no effect, other than changing the resize-indicator's metrics. Is there any way to get this working without relying on drawing the border myself? Thank you,

Re: Threading synchronization: does a primitive exists?

2011-05-07 Thread Chris Hanson
The thing to remember about NSConditionLock is that it's a lock that can only be acquired when it's in the specified condition. So for example, the lock can start in condition 0. Thread B can lock when in condition 0 while thread A can simultaneously lock when the condition is 1. This means t

Re: Communicate Between CocoaAsyncSocket and Java Socket

2011-05-07 Thread Chris Hanson
On May 7, 2011, at 1:50 PM, Bing Li wrote: > I attempt to use CocoaAsyncSocket to communicate with Java server/client. Is > it possible to achieve the goal? Yes, at least in the abstract; TCP is TCP. You don't need to use CocoaAsyncSocket if you don't want to - you can just use the BSD-level so

Re: No current point for control point bounds

2011-05-07 Thread Fritz Anderson
On 6 May 2011, at 7:24 PM, Indragie Karunaratne wrote: > I'm hesitant on filing a bug for this because it appears that there is no > such check on *later* versions of OS X ;-) Always file. It won't hurt their feelings. If, hypothetically, you don't find a diagnostic in prerelease software, it m

UISegmentedControl and Table View

2011-05-07 Thread Tremaine Q Sterling
Ok, so I have the segmented control working in terms of changing the views. But then issue I am having is getting the the table views to load with their own data based on the selected seg (like the view on Apple's iPhone Apple Store app after you've search for a store. I have a Tab Bar too.). I

Table view with NSImageCell scrolls A LOT slower with bindings than with dataSource

2011-05-07 Thread Peter Lübke
Hi all, I have a table view with all columns bound to keys of an NSArrayController. The array controller implements some data source methods, mainly for drag and drop support. One of the columns uses an NSImageCell to display 32 x 32 icons. Scrolling the table view vertically gets very slow

Communicate Between CocoaAsyncSocket and Java Socket

2011-05-07 Thread Bing Li
Dear all, I attempt to use CocoaAsyncSocket to communicate with Java server/client. Is it possible to achieve the goal? Thanks so much! Bing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: Getting mouse cursor position

2011-05-07 Thread Gregory Weston
On May 7, 2011, at 13:28, Nick wrote: > 2011/5/7 Gregory Weston : >> eveningnick wrote: >> >>> Hello >>> I am searching for the way to find a cursor's position on the screen. >>> >>> I tried to use method -hotSpot of NSCursor, but it returns sc x=-2057825613, y=0 >>> >>> >>> -(IBAction)t

Re: A Simple and Complete RunLoop Example

2011-05-07 Thread Ken Thomases
On May 7, 2011, at 11:56 AM, Bing Li wrote: > Can someone give me a hand? Could you provide me with a simple and complete > RunLoop example? Thanks so much! If you look at the reference for the NSRunLoop class or the CFRunLoop API, many of the methods and functions list Related Sample Code. You

Re: Getting mouse cursor position

2011-05-07 Thread Andy Lee
On May 7, 2011, at 1:28 PM, Nick wrote: > Gregory, > what do you mean by "if you have an event"? Could you elaborate on it please? He means if you have an instance of NSEvent. Some methods, such as -[NSResponder mouseDown:], -[NSResponder keyDown:], -[NSWindow currentEvent], and -[NSApplication

Re: Getting mouse cursor position

2011-05-07 Thread Nick
2011/5/7 Gregory Weston : > eveningnick wrote: > >> Hello >> I am searching for the way to find a cursor's position on the screen. >> >> I tried to use method -hotSpot of NSCursor, but it returns >>> sc x=-2057825613, y=0 >> >> >> -(IBAction)timeHandler:(id)timer { >>        //NSCursor *sc = [NSCur

A Simple and Complete RunLoop Example

2011-05-07 Thread Bing Li
Dear all, I am reading the Thread Programming Guide from apple.com. To be honest, I don't think the guide is suitable for a new Apple developer like me. Although I have a lot of programming experiences in concurrent programming, I cannot follow the guide conveniently, especially for the section ab

Re: drawing onto CVPixelBuffer

2011-05-07 Thread Ken Thomases
On May 6, 2011, at 5:00 PM, Jean-Daniel Dupas wrote: > Le 6 mai 2011 à 23:30, eveningnick eveningnick a écrit : > >> the pixel format of the CVPixelBufferRef is k32BGRAPixelFormat > > It should work. The list of supported format is here: > > “Supported Pixel Formats.” If you set the kCVPixelBu

Getting mouse cursor position

2011-05-07 Thread Jim McGowan
On 7 May 2011, at 0:29 , Nick wrote: > > May this is just a wrong function to retrieve the cursor's position? > Or it doesnt work for some older builds of OX X 10.6.x ? -hotSpot returns a point within in the cursor image, used to determine which part of the cursor is it's 'main point'. From t

Re: when to save user-data to disk?

2011-05-07 Thread Martin Batholdy
On 07.05.2011, at 05:51, Kyle Sluder wrote: > Question one: iOS or Mac? > > --Kyle Sluder > (Sent from the road) > > Mac OS. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the li

Re: NSTextView and NSTextContainer size & clipping area

2011-05-07 Thread Дмитрий Николаев
But when i try draw a line in NSTextView, it limited to frame of text container too. 06.05.2011, в 22:56, Ross Carter написал(а): > On May 6, 2011, at 2:40 AM, Дмитрий Николаев wrote: > >> If there are any possibility to draw inside text view but outside of text >> container ? > > It depends