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 w

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
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

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
On 28.11.2008, at 23:07, Ken 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

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
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
dowNibName:@"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 initWithWi

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
13, Kyle Sluder wrote: On Fri, Nov 28, 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 a

-[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]

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 r

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 Windows,

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

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: How to draw whole NSImage inside custom rect in NSView

2008-11-11 Thread Alexander Shmelev
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. M

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

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 { margi

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

2008-11-09 Thread Alexander Shmelev
at 1:58 AM, 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

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 wi

How can I find app bundle with its identifier. App is not running.

2008-10-17 Thread Alexander Shmelev
Hello, I have to find application bundle with its identifies, but [NSBundle bundleWithIdentifier: ] searches only among running bundles. Is there any way to found bundle of not running application using its identifier? BR, Alexander ___ Cocoa-dev

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. Conta

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 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) Pl