Re: kvo

2011-06-14 Thread Ken Tozier
Have you tried NSInvocationOperations? They allow you to queue up your own handler and you could do any required checking in that Something like // init requestQueue in your class's init method // then whenever you need to queue up a url load // do something like this - (void) queueRequest:(NSU

Adding NSButton in NSMenuItem

2011-06-14 Thread Adil Saleem
Hi, I want to add a button in front of Label in every NSMenuItem entry. Is using a custom view the only option or does Cocoa provide some other option as well ? And if custom view is the way, then how can we detect that button was pressed in which menu item? Because the selector called on press

Can't hide Menu bar

2011-06-14 Thread Siegfried
I'm developing a menubar-only application which needs to display an overlay in the screen at a certain moment. Everything was working properly, until I set LSUIElement to true. I have a custom view that enters in full screen with `enterFullScreenMode:withOptions:`. The dictionary passed include

Re: Can't hide Menu bar

2011-06-14 Thread Eric Schlegel
On Jun 14, 2011, at 8:11 AM, Siegfried wrote: > I'm developing a menubar-only application which needs to display an overlay > in the screen at a certain moment. Everything was working properly, until I > set LSUIElement to true. > > I have a custom view that enters in full screen with > `ente

Re: Adding NSButton in NSMenuItem

2011-06-14 Thread Jens Alfke
On Jun 14, 2011, at 6:33 AM, Adil Saleem wrote: > I want to add a button in front of Label in every NSMenuItem entry. Is using > a custom view the only option or does Cocoa provide some other option as well > ? You’ll need a custom view. This is pretty nonstandard UI, so I hope your designers

iOS: CoreGraphics Drawing -failing to draw a rectangle border

2011-06-14 Thread Development
I am attempting to draw a marque around a rectangle when the user touches it. Now if I use the following code around an ellipse it works perfectly. But let me explain how this is set up. There is an outer view and then a second inner view of the exact same size. The inner view is where I actual

flipipng a CALayer from right to left

2011-06-14 Thread Gustavo Adolfo Pizano
Hello all. Im trying to flip some CALayers, ones from left to right and another from right to left over the y axis.. So this is what Im doing to flip from left to right and the results is good. CATransform3D t = actual.transform; t.m11 = 0.5; actual

Interface item validation through first responder

2011-06-14 Thread Luc Van Bogaert
Hi, I'm hoping someone could provide some help solving the difficulties I'm facing with validation of user interface items. The problem is caused by my current GUI design, which is as follows: The contentview of my main window is designed to contain one of two different views, to be selected b

Re: Interface item validation through first responder

2011-06-14 Thread Laurent Daudelin
You can still design views in IB that you set as the content view of windows at runtime. -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/ Logiciels Nemesys Software laur...@ne

Re: Interface item validation through first responder

2011-06-14 Thread Quincey Morris
On Jun 14, 2011, at 13:20, Luc Van Bogaert wrote: > The contentview of my main window is designed to contain one of two different > views, to be selected by the user at runtime. So the view controllers are not > instantiated in IB, but rather in code during runtime. > > All the menu items and b

Drawing noise in Cocoa (preferably fast)

2011-06-14 Thread Stephen Blinkhorn
Hi all, I'm looking to fill a large custom view with noise. The solution I have arrived at so far is taking much too long to draw for it to be useable. Does anyone know any better ways of achieving this in Cocoa? The basic idea is to add an amount of noise to a base color pixel by pixel,

Re: Drawing noise in Cocoa (preferably fast)

2011-06-14 Thread Quincey Morris
On Jun 14, 2011, at 14:56, Stephen Blinkhorn wrote: > I'm looking to fill a large custom view with noise. The solution I have > arrived at so far is taking much too long to draw for it to be useable. Does > anyone know any better ways of achieving this in Cocoa? The basic idea is to > add an am

Re: Drawing noise in Cocoa (preferably fast)

2011-06-14 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/14/11 2:56 PM, Stephen Blinkhorn wrote: > Hi all, > > I'm looking to fill a large custom view with noise. The solution I have > arrived at so far is taking much too long to draw for it to be useable. > Does anyone know any better ways of achievin

Re: Drawing noise in Cocoa (preferably fast)

2011-06-14 Thread Wim Lewis
On 14 Jun 2011, at 2:56 PM, Stephen Blinkhorn wrote: > I'm looking to fill a large custom view with noise. The solution I have > arrived at so far is taking much too long to draw for it to be useable. Does > anyone know any better ways of achieving this in Cocoa? The basic idea is to > add an a

Re: Drawing noise in Cocoa (preferably fast)

2011-06-14 Thread Stephen Blinkhorn
Thanks for all the Core Image tips. Completely missed that somehow. At the moment I'm drawing a lot of stuff into CGLayers to save redrawing the same thing over and over. I see CIImage provides imageWithCGLayer: so this could be very fruitful. Thanks! Stephen On 14 Jun 2011, at 16:07, Quin

Re: Can't hide Menu bar

2011-06-14 Thread Siegfried
On 14/06/2011, at 13:42, Eric Schlegel wrote: > > On Jun 14, 2011, at 8:11 AM, Siegfried wrote: > >> … >> I have a custom view that enters in full screen with >> `enterFullScreenMode:withOptions:`. The dictionary passed includes a >> NSApplicationPresentationHideMenuBar, and indeed it works b

Path based NSServices advertising

2011-06-14 Thread Pavel Tumanov
Hello, Is there a method for app to advertise services in such a way that they would be shown for files located in the specific directory (for example any file at /tmp/ or the recycler)? If that can't be done directly is it possible to tag files somehow and advertise services for those tags? Than

Coalesced updates and refresh rate

2011-06-14 Thread Wolfgang Kundrus
Hi, I have a problem with the rate at which coalesced updates refresh the window. We draw some animations outside the drawRect method, using lockFocus/unlockFocus, but these drawing operations are only flushed about ones a second. The do get flushed on mouse moves though. Is there anyway, I can in

Pre 10.6 version of ComplexBrowser sample?

2011-06-14 Thread Matt Gough
Does anyone know where I can find the previous version of the ComplexBrowser example NSBrowser code? The current version is here: http://developer.apple.com/library/mac/#samplecode/ComplexBrowser/History/History.html But I want to look at the version for Mac OS X 10.5 Looking through the examp

Re: Drawing noise in Cocoa (preferably fast)

2011-06-14 Thread Ken Tozier
Is there any reason the noise has to be unique each time? Could you just generate a noise file and composite that over whatever you want? Unless you're doing something with cryptography, noise, is noise, is noise. It all basically looks the same so reusing a single file seems like it could serve

Re: Drawing noise in Cocoa (preferably fast)

2011-06-14 Thread Ken Tozier
I didn't test this (basically cut and pasted from some existing code I have) but it should run plenty fast #define RGB_BYTES_PER_PIXEL 3 - (NSBitmapImageRep *) noiseImageRepWithBaseRed:(float) inRed green:(float) inGreen blue:(float) inBlue