How to get events in PDE auxiliary window?

2009-03-22 Thread Alexander Shmelev
Hello, I have implemented cocoa PDE plugin. Auxiliary window appears when user clicks button on this PDE. I can interact with all controls on this auxiliary window in all applications except Adobe Acrobat Reader. When I select Print then open my cocoa PDE and click button then auxiliary

Writing kCFPreferencesAnyUser preferences by limited user

2009-02-13 Thread Alexander Shmelev
Hello, I have Cocoa application, which have to store global settings, so I use CFPreferences...(..., kCFPreferencesAnyUser, kCFPreferencesCurrentHost). Everything was ok while I launched application as admin user, but when I switched to limited user, settings changes were not saved. I have

Re: -[NSWindowController window] fails

2008-11-30 Thread Alexander Shmelev
, at 12:58 PM, Alexander Shmelev wrote: [[TwainDialog alloc] init] returns not nil value, but when I call [theDialog window], there is error inside this method. Care to tell us what the error is? That is probably central to the issue. Regards, Ken

-[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
Hello, I have NSWindowController which loads nib with following code: - (id) init { if (![super initWithWindowNibName:@Dialog]) return nil; [self window]; } I use [self window] to force nib load. This code perfectly works on Leopard(Intel), but [self window]

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
, 2008 at 5:06 AM, Alexander Shmelev [EMAIL PROTECTED] wrote: - (id) init { if (![super initWithWindowNibName:@Dialog]) return nil; [self window]; } 1) You never set self. Inside an initializer, you must always set self to the result of the calling super's designated

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
:@Dialog]) return nil; [self window]; } On 28.11.2008, at 20:31, j o a r wrote: On Nov 28, 2008, at 2:06 AM, Alexander Shmelev wrote: I have NSWindowController which loads nib with following code: - (id) init { if (![super initWithWindowNibName:@Dialog

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
On 28.11.2008, at 21:46, j o a r wrote: On Nov 28, 2008, at 9:12 PM, Alexander Shmelev wrote: I cut off code after [self window], originally it looks like following: I suspected that you might have. In the future, please indicate this more clearly. Sorry, I promise to write code more

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
Also using gdb I have found that awakeFromNib of TwainDialog is never called. On 28.11.2008, at 21:58, Alexander Shmelev wrote: On 28.11.2008, at 21:46, j o a r wrote: On Nov 28, 2008, at 9:12 PM, Alexander Shmelev wrote: I cut off code after [self window], originally it looks like

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
Thomases wrote: On Nov 28, 2008, at 12:58 PM, Alexander Shmelev wrote: [[TwainDialog alloc] init] returns not nil value, but when I call [theDialog window], there is error inside this method. Care to tell us what the error is? That is probably central to the issue. Regards, Ken

awakeFromNib is not called in Tiger [PPC], but called in Leopard [Intel]

2008-11-25 Thread Alexander Shmelev
Hello, I have nib file TwainDialog.nib which is controlled by TwainDialogController class (inherited from NSWindowController). When I run on 10.5 Leopard, everything works as expected: awakeFromNib is called, outlets initialized, [twainDialog window] returns NSWindow pointer. But when I

Re: How to draw whole NSImage inside custom rect in NSView

2008-11-12 Thread Alexander Shmelev
Thank you, I have multiplied all value by 1000. And it works. BR, Alexander. On 12.11.2008, at 2:30, Graham Cox wrote: On 12 Nov 2008, at 9:56 am, Alexander Shmelev wrote: Actually, I have one idea why this happens. Maybe because usually width=8, height = 14 so [self bounds] returns

JPEG compression in TIFF files. NSTIFFCompressionJPEG

2008-11-12 Thread Alexander Shmelev
Hello, Our customer asks us to save images in TIFF files with JPEG compression. But in NSImage documentation is written that JPEG compression is no longer supported. Why Apple decided to stop support JPEG compression in NSImage class? Also I prepared TIFF with JPEG compression on

How to draw whole NSImage inside custom rect in NSView

2008-11-11 Thread Alexander Shmelev
Hello I have custom NSView, and want to draw whole NSImage inside some custom rectangular area of NSView. I tried to use [NSImage drawInRect:...] but result does not fit desired rectangular area of NSView. My code: - (void) setPreviewWidth:(float)width height:(float)height {

Re: How to draw whole NSImage inside custom rect in NSView

2008-11-11 Thread Alexander Shmelev
On Tue, Nov 11, 2008 at 2:17 PM, Alexander Shmelev [EMAIL PROTECTED] wrote: Hello I have custom NSView, and want to draw whole NSImage inside some custom rectangular area of NSView. I tried to use [NSImage drawInRect:...] but result does not fit desired rectangular area of NSView. My

Re: How to draw whole NSImage inside custom rect in NSView

2008-11-11 Thread Alexander Shmelev
On Tue, Nov 11, 2008 at 2:17 PM, Alexander Shmelev [EMAIL PROTECTED] wrote: Hello I have custom NSView, and want to draw whole NSImage inside some custom rectangular area of NSView. I tried to use [NSImage drawInRect:...] but result does not fit desired rectangular area of NSView. My code

Re: How to draw whole NSImage inside custom rect in NSView

2008-11-11 Thread Alexander Shmelev
, at 5:17 PM, Alexander Shmelev wrote: - (void) drawRect:(NSRect)rect { // Drawing image in preview if (image) { NSRect imageRect; imageRect.origin = NSZeroPoint; imageRect.size = [image size]; [image

Re: runModalSession in Cocoa plugin for Carbon app does not return

2008-11-09 Thread Alexander Shmelev
, Alexander Shmelev [EMAIL PROTECTED] wrote: Hello, I have following code in my Cocoa plug-in application: NSModalSession session = [NSApp beginModalSessionForWindow:theWindow]; for (;;) { if ([NSApp runModalSession:session] != NSRunContinuesResponse) break; [self doSomeWork]; } I use

runModalSession in Cocoa plugin for Carbon app does not return

2008-11-09 Thread Alexander Shmelev
Hello, I have following code in my Cocoa plug-in application: NSModalSession session = [NSApp beginModalSessionForWindow:theWindow]; for (;;) { if ([NSApp runModalSession:session] != NSRunContinuesResponse) break; [self doSomeWork]; } I use modal sessions for displaying dialog

How to get icon of special folder (like /Applications or /Library)?

2008-10-16 Thread Alexander Shmelev
Hello, On Mac OS X many special folders have their own personal icons. For example /Applications have capital letter A on generic folder icon. I have some path which leads to some special folder. How can I determine what icon this folder have? Path is stored in NSString.

How can I launch Preview.app from my application for collection of images

2008-10-16 Thread Alexander Shmelev
Hello, I have set of images, how can i open Preview.app from my Cocoa application to display them all? BR, Alexander. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

How can be my application notified about user defaults changes?

2008-10-09 Thread Alexander Shmelev
Hello, My program UI depends on what measurement units are used. How can I get notification when AppleMeasurementUnits have been changed by Preferences application? Best regards, Alexander. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)