Re: L-shaped custom view in Cocoa?

2011-05-06 Thread Vyacheslav Karamov
Yes, I need to write virtual keyboard. 05-May-11 21:11, Kyle Sluder пишет: On Thu, May 5, 2011 at 10:59 AM, Shawn Bakhtiar wrote: What? It does too work! Once the window is setup correctly. This is how a do all my transparent windows, and for any naysayers out there here is the code: http://w

Re: iOS nib weirdness...

2011-05-06 Thread Steve Christensen
Just to provide closure on this thread, I believe I figured out what was happening although not why nor who the exact culprit was. To summarize, all the pieces were set up correctly. The nib file was being compiled in response to changes. The problem appears to be that at some point it stopped

Cocoa Typography: wrong presentation of space unicode characters

2011-05-06 Thread Дмитрий Николаев
Hello! It seems that something wrong with typography system in Cocoa. When i try to draw string over the screen with drawInRect (Helvetica): --- code --- NSString *tot = [NSString stringWithFormat:@"MMM%CMMM%CMMM MMM", 0x2002, 0x20]; --- code -- all spaces between letters are the same. But firs

custom view for 'page setup' dialog

2011-05-06 Thread Eric Slosser
I'm running a "page setup" dialog with an accessory view. The view uses an NSPrintInfo object that I get from -[NSDocument printInfo]. I would think that -[NSDocument printInfo] would return the same NSPrintInfo* as the NSDocument uses internally, (with retain-autolease) but the code is acti

Weird view description problem

2011-05-06 Thread Alex Kac
OK this is weird. On iOS Simulator - no issue. Debugging on device, with the latest XCode 4 release, device being iPhone 4 with the latest OS, I get this when printing a view: + f\u2020\u201e>\u00af\u00a9\u201e>\u2021\u02d8\u00a7 retain:16 - tag:0 - bgcolor:(r:0 g:0 b:0 a:1.00) bounds: x:0 y

Re: Weird view description problem

2011-05-06 Thread Alex Kac
Aha, nevermind. I found the problem. It was a UserVoice sub-project that had a category I just couldn't find it. On May 6, 2011, at 9:39 AM, Alex Kac wrote: > OK this is weird. On iOS Simulator - no issue. Debugging on device, with the > latest XCode 4 release, device being iPhone 4 with th

Re: NSTextView and NSTextContainer size & clipping area

2011-05-06 Thread 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 on who is doing the drawing. NSTextView is an NSView subclass and you can override drawRect: just like any NSView. The Cocoa text system, how

Re: iOS nib weirdness...

2011-05-06 Thread Matt Neuburg
On Fri, 06 May 2011 01:29:10 -0700, Steve Christensen said: >To summarize, all the pieces were set up correctly. The nib file was being >compiled in response to changes. The problem appears to be that at some point >it stopped being copied into the simulator as part of running it in the >debugg

NSOperationQueue and Synchronization Control

2011-05-06 Thread Bing Li
Dear all, I am a new Cocoa developer on iPhone/iPad. I plan to use NSOperationQueue to achieve the goal of concurrency. I am not sure if it is better since I also know GCD is available. Moreover, I didn't notice that Cocoa provided developers with synchronization controlling mechanisms. Is it tru

Re: NSOperationQueue and Synchronization Control

2011-05-06 Thread Sean McBride
On Sat, 7 May 2011 03:32:37 +0800, Bing Li said: >I am a new Cocoa developer on iPhone/iPad. I plan to use NSOperationQueue to >achieve the goal of concurrency. I am not sure if it is better since I also >know GCD is available. > >Moreover, I didn't notice that Cocoa provided developers with >sync

Re: Threading synchronization: does a primitive exists?

2011-05-06 Thread eveningnick eveningnick
I need to wait, while the image is drawn (drawRect method is actually called by the framework) from a different thread that supplies frames. I am drawing images just to see that the output is correct, in the final application i don't need them to be drawn on the screen but saved into a file 2011/5

drawing onto CVPixelBuffer

2011-05-06 Thread eveningnick eveningnick
Hi I have a CVPixelBuffer with some background picture. I need to draw on this background some foreground image. I don't need to preserve the initial CVPixelBuffer's content - i just need to add a small foreground watermark onto that buffer. CIImage does allow to create an image from CVPixelBuffer

Re: Threading synchronization: does a primitive exists?

2011-05-06 Thread David Duncan
Why not use the production of a frame from your secondary thread to drive calling -setNeedsDisplay on your view? Then you don't need to block any thread (and you really really do not want to block the main thread anyway). On May 6, 2011, at 1:10 PM, eveningnick eveningnick wrote: > I need to wa

Re: Threading synchronization: does a primitive exists?

2011-05-06 Thread eveningnick eveningnick
I do call setNeedsDisplay, but the buffer of the picture that is queued to be drawn is being reused right after the function of this 'supplying thread' is finished. This is ok as soon as i save/encode the image in this function - i don't need this buffer anymore. But i wanted to display it (tempora

Re: drawing onto CVPixelBuffer

2011-05-06 Thread Jean-Daniel Dupas
Le 6 mai 2011 à 22:22, eveningnick eveningnick a écrit : > Hi > I have a CVPixelBuffer with some background picture. > I need to draw on this background some foreground image. I don't need > to preserve the initial CVPixelBuffer's content - i just need to add a > small foreground watermark onto

Re: drawing onto CVPixelBuffer

2011-05-06 Thread eveningnick eveningnick
the pixel format of the CVPixelBufferRef is k32BGRAPixelFormat ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Hel

Re: drawing onto CVPixelBuffer

2011-05-06 Thread Jean-Daniel Dupas
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.” -- Jean-Daniel ___ Cocoa-dev mailing list

Getting mouse cursor position

2011-05-06 Thread eveningnick eveningnick
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 = [NSCursor currentSystemCursor]; NSCursor *sc = [NSCursor currentCurso

Re: Getting mouse cursor position

2011-05-06 Thread Nathan Sims
On May 6, 2011, at 3:55 PM, eveningnick eveningnick wrote: > I tried to use method -hotSpot of NSCursor, but it returns >> sc x=-2057825613, y=0 > > -(IBAction)timeHandler:(id)timer { >//NSCursor *sc = [NSCursor currentSystemCursor]; > NSCursor *sc = [NSCursor currentCursor]; >

Re: Getting mouse cursor position

2011-05-06 Thread Nick
Thanks, Now it constantly returns (0;0). Why would that happen at all? Maybe i don't have enough permissions to read the cursor position? (like, need to have some accessibility things enabled)? 2011/5/7 Nathan Sims : > > On May 6, 2011, at 3:55 PM, eveningnick eveningnick wrote: > >> I tried to us

Re: Getting mouse cursor position

2011-05-06 Thread Nick
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 ? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Con

programmatically delete a file on ftp server

2011-05-06 Thread Rainer Standke
Hello, I am figuring out how to get a directory listing (via CFFTPStream) and how to download a file from an ftp server (via NSURLConnection). How would I go about deleting a file on an ftp server? Thanks! Rainer ___ Cocoa-dev mailing list (Coco

Re: No current point for control point bounds

2011-05-06 Thread Indragie Karunaratne
After painstakingly going through my code line by line, I managed to find the issue. I was using a custom NSScroller subclass, and the rect returned by rectForPart: was an empty rect, which caused NSBezierPath to freak out. The sanity check is a good idea, but a) the log message should provide i

Does CIImage actually copy CVPixelBuffer's contents?

2011-05-06 Thread Nick
Or does it have only a reference to the CVPixelBuffer's bitmap? Documentation says that CIImage is not actually an image, but rather a recipe for making one. Does that mean, that it requires CVPixelBuffer object to exist and be unchanged for the whole time i am operating with CIImage up to the mome

Re: Getting mouse cursor position

2011-05-06 Thread Nathan Sims
On May 6, 2011, at 4:13 PM, 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 ? Oh, I thought you were looking for the cursor's hotspot, not its location. NSPoint pos = [NSEvent mouseLocation]; NSLog(@"Mou

Re: Getting mouse cursor position

2011-05-06 Thread Greg Parker
On May 6, 2011, at 3:55 PM, eveningnick eveningnick wrote: > 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 = [NSCursor cur

Re: Getting mouse cursor position

2011-05-06 Thread Nick
Thank you. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists

Re: NSOperationQueue and Synchronization Control

2011-05-06 Thread Matt Neuburg
On Sat, 07 May 2011 03:32:37 +0800, Bing Li said: >Dear all, > >I am a new Cocoa developer on iPhone/iPad. I plan to use NSOperationQueue to >achieve the goal of concurrency. I am not sure if it is better since I also >know GCD is available. > >Moreover, I didn't notice that Cocoa provided develop

Re: programmatically delete a file on ftp server

2011-05-06 Thread Nick Zitzmann
On May 6, 2011, at 5:21 PM, Rainer Standke wrote: > Hello, > > I am figuring out how to get a directory listing (via CFFTPStream) and how to > download a file from an ftp server (via NSURLConnection). How would I go > about deleting a file on an ftp server? The CFFTPStream API is only good fo

Re: NSOperationQueue and Synchronization Control

2011-05-06 Thread Nick
Read this http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Multithreading/Introduction/Introduction.html Specifically this should answer your question: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Multithreading/ThreadSafety/ThreadSafety.html%23//app

Re: Getting mouse cursor position

2011-05-06 Thread 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 = [NSCursor currentSystemCursor]; > N

when to save user-data to disk?

2011-05-06 Thread Martin Batholdy
Hi, I have a program that saves its data (an array of dictionaries) as a plist in the application support folder with the writeToFile method from NSFileManager. Now this array gets manipulated a lot while working with the program. And currently I save the array to disk every time something in th

Re: block animation

2011-05-06 Thread Brian Bruinewoud
Thanks David, that's led me on the right path - I seem to have two instances of the view controller where there should be one so I'll need to check my NIB wiring, something wrong there. On 06/05/2011, at 01:47 , David Duncan wrote: > On May 4, 2011, at 4:50 AM, Brian Bruinewoud wrote: > >> Que

Re: when to save user-data to disk?

2011-05-06 Thread Kyle Sluder
Question one: iOS or Mac? --Kyle Sluder (Sent from the road) On May 6, 2011, at 7:12 PM, Martin Batholdy wrote: > Hi, > > I have a program that saves its data (an array of dictionaries) as a plist in > the application support folder > with the writeToFile method from NSFileManager. > > Now t