WebPolicyDelegate declared where?

2012-11-01 Thread Gerriet M. Denkmann
My app delegate (Mac OS X) looks like this: #import WebKit/WebKit.h @interface MyAppDelegate : NSObject NSApplicationDelegate, WebPolicyDelegate But Xcode (4.5.1) complains: Cannot find protocol declarations for WebPolicyDelegate. What am I doing wrong? Gerriet.

Changes to -makeDocumentWithContentsOfURL:ofType:error: in the last couple of OS releases?

2012-11-01 Thread Rick Mann
I have some old code that would try to open a file using -openDocumentWithContentsOfURL:display:error:, if it existed and if it does not exist, would call -makeDocumentWithContentsOfURL:ofType:error: on that same URL, in an effort to create the missing document. The code clearly expected to

Re: Changes to -makeDocumentWithContentsOfURL:ofType:error: in the last couple of OS releases?

2012-11-01 Thread Quincey Morris
On Nov 1, 2012, at 00:53 , Rick Mann rm...@latencyzero.com wrote: I have some old code that would try to open a file using -openDocumentWithContentsOfURL:display:error:, if it existed and if it does not exist, would call -makeDocumentWithContentsOfURL:ofType:error: on that same URL, in an

Re: Changes to -makeDocumentWithContentsOfURL:ofType:error: in the last couple of OS releases?

2012-11-01 Thread Rick Mann
On Nov 1, 2012, at 1:59 , Quincey Morris quinceymor...@rivergatesoftware.com wrote: Very roughly, the 'make' method is used just to create a NSDocument object. The 'open' document does higher level stuff like bailing if a document object already exists for the file, or invoking the 'make'

Extremely low fps during transparent NSWindow resize

2012-11-01 Thread Andrea3000
Hi, I'm trying to address a performance problem regarding transparent NSWindows during resize. I have created a new Cocoa Application from Xcode's templates, overriding both NSWindow and NSView as follows:

Mystifying index out of bounds error

2012-11-01 Thread Antonio Nunes
Hi, I have this code in my app: - (void)keyDown:(NSEvent *)theEvent { unichar oneChar; NSString*theChars = [theEvent charactersIgnoringModifiers]; if ( 0 == theChars.length ) { return; } oneChar = [theChars

Re: WebPolicyDelegate declared where?

2012-11-01 Thread Mike Abdullah
WebPolicyDelegate is still not a formal protocol. There is nothing for you to declare conformance to. On 1 Nov 2012, at 07:44, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: My app delegate (Mac OS X) looks like this: #import WebKit/WebKit.h @interface MyAppDelegate : NSObject

Re: Mystifying index out of bounds error

2012-11-01 Thread Mike Abdullah
Well that sounds an impossible problem, but might not be. Give us the crash report too. On 1 Nov 2012, at 12:11, Antonio Nunes devli...@sintraworks.com wrote: Hi, I have this code in my app: - (void)keyDown:(NSEvent *)theEvent { unichar oneChar; NSString

Re: Drawing customized window

2012-11-01 Thread Nick
Corbin, is it possible to make the background color pattern image stretch the picture across the window, instead of repeating it?. If not, is dealing with borderless window the only way to get this functionality (like, having a custom colored title bar, and white title bar text)? Thank you

Re: Mystifying index out of bounds error

2012-11-01 Thread Antonio Nunes
On 1 Nov, 2012, at 15:24 , Mike Abdullah cocoa...@mikeabdullah.net wrote: Well that sounds an impossible problem, but might not be. Give us the crash report too. 12/10/2012 12:41:10: -[__NSCFConstantString characterAtIndex:]: Range or index out of bounds 12/10/2012 12:41:10: ( 0

Re: App rejection due to app-sandboxing invalid entitlement

2012-11-01 Thread Sean McBride
On Thu, 1 Nov 2012 05:17:09 +0100, Martin Hewitson said: I did include a description on the resubmit. Seems it didn't help. I wrote: I'm using this entitlement to allow the app to send documents by mail from within the app. On 10.8 I can use the new com.apple.security.scripting-targets but this

Re: App rejection due to app-sandboxing invalid entitlement

2012-11-01 Thread Martin Hewitson
On Nov 1, 2012, at 3:37 PM, Sean McBride s...@rogue-research.com wrote: On Thu, 1 Nov 2012 05:17:09 +0100, Martin Hewitson said: I did include a description on the resubmit. Seems it didn't help. I wrote: I'm using this entitlement to allow the app to send documents by mail from within

Re: Mystifying index out of bounds error

2012-11-01 Thread Mike Abdullah
On 1 Nov 2012, at 14:37, Antonio Nunes devli...@sintraworks.com wrote: On 1 Nov, 2012, at 15:24 , Mike Abdullah cocoa...@mikeabdullah.net wrote: Well that sounds an impossible problem, but might not be. Give us the crash report too. 12/10/2012 12:41:10: -[__NSCFConstantString

Re: Getting rid of primitive accessor warnings

2012-11-01 Thread Keary Suska
On Oct 31, 2012, at 10:02 PM, Rick Mann wrote: I'm not sure what's going on here. But I've got an iOS project that declares (but does not define) some primitiveFoo methods in my NSManagedObject subclass, and an OS X project that does so as well. However, the iOS project doesn't emit any

Get NowJS work

2012-11-01 Thread Kévin Vavelin
Hi there, I want to get NowJS working well with my app, I know I have to create a socket with socket.io like NowJS do, I just create a NowJS code and translate it into ObjC but it seems that it doesn't work at all… Do you have any idea about how to do it ? Cordially, Vavelin Kévin Twitter |

Re: Getting rid of primitive accessor warnings

2012-11-01 Thread Fritz Anderson
On 1 Nov 2012, at 9:55 AM, Keary Suska cocoa-...@esoteritech.com wrote: This is normal and expected, as it is a default warning (at least on OS X). What is the problem, exactly? There is no value whatsoever that I know of to declare primitive accessors if you don't intend to implement them.

Re: Mystifying index out of bounds error

2012-11-01 Thread Antonio Nunes
On 1 Nov, 2012, at 15:50 , Mike Abdullah cocoa...@mikeabdullah.net wrote: Well it all looks like your code shouldn't be able to give the above exception. To check, there's no other calls to -characterAtIndex: in the code you omitted? And the code you pasted is from ANBorderedTextView? No

Re: Getting rid of primitive accessor warnings

2012-11-01 Thread Keary Suska
On Nov 1, 2012, at 9:24 AM, Fritz Anderson wrote: On 1 Nov 2012, at 9:55 AM, Keary Suska cocoa-...@esoteritech.com wrote: This is normal and expected, as it is a default warning (at least on OS X). What is the problem, exactly? There is no value whatsoever that I know of to declare

Add-in/Plug-in support for Microsoft Outlook 2011 on Mac

2012-11-01 Thread Vaibhao Mahore
Hello All, Is it possible to write add-ins for Microsoft Outlook 2011 on Mac? I want to want to add a button on the main toolbar of MS Outlook on Mac and also want to customize the behavior of existing buttons - like the Send button. Just wanted to know is this possible ? After searching I

Re: Add-in/Plug-in support for Microsoft Outlook 2011 on Mac

2012-11-01 Thread Nick
As far as I know Microsoft did not expose addin APIs for Office for Mac. There may be a chance to get the SDK under NDA, if you convince guys from Microsoft that your plugin is useful and does not repeat the existing functionality (at least that's how it was for Microsoft Word 2008/2011). You

Re: Drawing customized window

2012-11-01 Thread Corbin Dunn
On Oct 31, 2012, at 7:25 PM, Nick eveningn...@gmail.com wrote: Thanks Corbin, it works great (unfortunately I can't draw the gradient depending on the window size (so it's always white on top and black on bottom, no matter how high the window is, for example), but I guess that still gives

Re: Drawing customized window

2012-11-01 Thread Corbin Dunn
hi nick, No; you can't stretch it, but you can create a pattern image that is tall, and appears to repeat or stretch. Other than that, the only official way to customize a window is via a borderless custom window. However, please do log bugs requesting that AppKit provide an easy way to

Re: Getting rid of primitive accessor warnings

2012-11-01 Thread Rick Mann
On Nov 1, 2012, at 8:24 , Fritz Anderson fri...@manoverboard.org wrote: Declare them in a category so the compiler won't complain that the main implementation doesn't contain their definitions. Ah! That's what I did wrong. I had also moved some property declarations to the .mm file, and put

Re: Drawing customized window

2012-11-01 Thread Lee Ann Rucker
Done; rdar://12617674 I also included a suggestion for a hasDarkBackground flag that'll switch to buttons like QuickTime Player uses because the shadow on the default ones looks weird on dark backgrounds. On Nov 1, 2012, at 11:12 AM, Corbin Dunn wrote: hi nick, No; you can't stretch it,

Logging out the IMP description

2012-11-01 Thread Sebastien Boisvert
I have an IMP for a method - in Xcode debugging window, I can select the var, and make it display a description; I get something like this in the console: (IMP) ImpVarName = 0x0001012a1130 (FrameWorkName`-[ClassName methodName] at ClassName.m:125) This is perfect, but I can't figure out

Re: App rejection due to app-sandboxing invalid entitlement

2012-11-01 Thread Erik Stainsby
Surely you could make the specific email client a Preference the user sets once, and then handle the act of sending with one menu item? Not any help with the sandbox issue however... Sent from my iCapsule somewhere in orbit On 2012-11-01, at 7:43 AM, Martin Hewitson martin.hewit...@aei.mpg.de

Re: Logging out the IMP description

2012-11-01 Thread Ken Thomases
On Nov 1, 2012, at 3:44 PM, Sebastien Boisvert wrote: I have an IMP for a method - in Xcode debugging window, I can select the var, and make it display a description; I get something like this in the console: (IMP) ImpVarName = 0x0001012a1130 (FrameWorkName`-[ClassName methodName] at

Re: App rejection due to app-sandboxing invalid entitlement

2012-11-01 Thread Mark Munz
That could get really tricky given the new rules with scripts and sandboxing. The scripts folder cannot be written to by your app (AFAIK, it can only be created and read). App would have to direct the customer to copy in the appropriate script into your script folder. It's about as clunky a

View-based NSTableView strange scrolling behavior.

2012-11-01 Thread Dmitriy Balakirev
Hi all! I have view-based NSTableView with 10 columns. Each cell is NSTableCellView with NSTextField on it (default). Auto-layout is OFF. OSX 10.8.2. Table has 1000 rows. Datasource is AppDelegate with only one method: - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { return

Re: View-based NSTableView strange scrolling behavior.

2012-11-01 Thread Graham Cox
On 02/11/2012, at 11:14 AM, Dmitriy Balakirev dmitriy.balaki...@gmail.com wrote: Datasource is AppDelegate with only one method: A datasource has two mandatory methods. How does it get its data? --Graham ___ Cocoa-dev mailing list

Re: View-based NSTableView strange scrolling behavior.

2012-11-01 Thread Dmitriy Balakirev
Nothing. It is just example. 02.11.2012, в 4:29, Graham Cox graham@bigpond.com написал(а): On 02/11/2012, at 11:14 AM, Dmitriy Balakirev dmitriy.balaki...@gmail.com wrote: Datasource is AppDelegate with only one method: A datasource has two mandatory methods. How does it get its

Re: View-based NSTableView strange scrolling behavior.

2012-11-01 Thread Graham Cox
On 02/11/2012, at 12:35 PM, Dmitriy Balakirev dmitriy.balaki...@gmail.com wrote: Nothing. It is just example. So it does have two methods? Or have you left one out? If you have, it won't work properly, so that's why I'm asking - it could be your problem. Show your REAL code. --Graham

Re: View-based NSTableView strange scrolling behavior.

2012-11-01 Thread Dmitriy Balakirev
- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { return 1000; } is the only code added to the cocoa application template. Then I drop table to window, set number of columns to 10 and connect app delegate as table datasource. But question not about how to implement nstableview

Re: View-based NSTableView strange scrolling behavior.

2012-11-01 Thread Graham Cox
On 02/11/2012, at 1:08 PM, Dmitriy Balakirev dmitriy.balaki...@gmail.com wrote: - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { return 1000; } is the only code added to the cocoa application template. Then I drop table to window, set number of columns to 10 and connect

Macro challenge with variable arguments

2012-11-01 Thread Graham Cox
Hi all, I'm having trouble figuring this out. I have a logging function thus: voidGCLogObjCMethod( id obj, SEL selector, NSUInteger lineNumber, NSString* tag, NSString* format, ... ); I'd like to be able to wrap this using a macro that automatically supplies the object, selector,

Re: View-based NSTableView strange scrolling behavior.

2012-11-01 Thread Dmitriy Balakirev
How your explain that: After run that simple app works improperly. Then, I press Home button - now that same app works very properly? What magic happens when I press Home (End)? In real code the scroll behavior is exactly the same. 02.11.2012, в 6:14, Graham Cox graham@bigpond.com

Re: Macro challenge with variable arguments

2012-11-01 Thread Greg Parker
On Nov 1, 2012, at 7:15 PM, Graham Cox graham@bigpond.com wrote: Hi all, I'm having trouble figuring this out. I have a logging function thus: voidGCLogObjCMethod( id obj, SEL selector, NSUInteger lineNumber, NSString* tag, NSString* format, ... ); I'd like to be able

-[NSManagedObject setValuesForKeysWithDictionary:] and C++ attributes

2012-11-01 Thread Rick Mann
I'm trying to copy NSManagedObjects using -dictionaryWithValuesForKeys and -setValuesForKeysWithDictionary:. Some of my attributes are C++ objects (simple ones). For example: class Rect : public CGRect { }; @interface MyObj : NSManagedObject @property (nonatomic, assign) Rect

Re: Macro challenge with variable arguments

2012-11-01 Thread Gwynne Raskind
On Nov 1, 2012, at 10:15 PM, Graham Cox graham@bigpond.com wrote: Hi all, I'm having trouble figuring this out. I have a logging function thus: voidGCLogObjCMethod( id obj, SEL selector, NSUInteger lineNumber, NSString* tag, NSString* format, ... ); I'd like to be able

Re: Macro challenge with variable arguments

2012-11-01 Thread Graham Cox
Ah, thanks guys! That works great :) --Graham On 02/11/2012, at 1:46 PM, Gwynne Raskind gwy...@darkrainfall.org wrote: #if LOGGING #define GCLOGOC(format, ...) GCLogObjCMethod(self, _cmd, __LINE__, NSStringFromClass([self class]), format, ## __VA_ARGS__) #else #define GCLOGOC(format,

Re: Macro challenge with variable arguments

2012-11-01 Thread Scott Ribe
What Gwynne said, but with one potential change, *some* versions of GCC require a space before the last comma in order for it to be omitted if there are 0 variable args, as in: #define GCLOGOC(format, ...) GCLogObjCMethod(self, _cmd, __LINE__, NSStringFromClass([self class]), format , ##