Re: Creating NSTableView programmatically

2017-12-20 Thread Eric Matecki
Hi, Richard, I also reply to your msg here to avoid too much redundancy. Thanks for your efforts. My project is based on what I believe is an official sample from Apple, which Richard Charles posted as an attachment to his msg from 12/12/2017. The sole purpose of my project is to learn how

Re: Creating NSTableView programmatically

2017-12-19 Thread Eric Matecki
On 19/12/2017 11:24, Eric Matecki wrote: Hello all, No I didn't abandon all hope, I was just busy :) Thanks to all the replies, I got a lot further, but still didn't reach my destination... Now I have a nice window, looking almost exactly like the NIB created one. Most things works, except

Re: Creating NSTableView programmatically

2017-12-19 Thread Eric Matecki
Hello all, No I didn't abandon all hope, I was just busy :) Thanks to all the replies, I got a lot further, but still didn't reach my destination... Now I have a nice window, looking almost exactly like the NIB created one. Most things works, except the most fundamental one. When I select a

Re: Creating NSTableView programmatically

2017-12-12 Thread Eric Matecki
Eric M. On 12/12/2017 14:02, Richard Charles wrote: On Dec 12, 2017, at 3:12 AM, Eric Matecki <eml...@wanadoo.fr> wrote: It's still weird (to me) to bind an object's binding to one of it's own properties. I have an applicaiton that extensively uses programmatic and custom bi

Re: Creating NSTableView programmatically

2017-12-12 Thread Eric Matecki
Hi, On 11/12/2017 20:10, Quincey Morris wrote: I made my own text field class according to this (in NSTableCellView's doc) : I think you’re still kinda Doing It Wrong™. The standard (and, I believe, recommended) way to do this is to create an instance of NSTableCellView, which has the

Re: Creating NSTableView programmatically

2017-12-11 Thread Eric Matecki
required NSTableView instances on demand. You also need to bind the NSTableView's content object to the NSArrayController’s arrangedObjects. The nib makes all this easier though its still fiddly. I would get it working in a nib first and then work backwards from there. On 11 Dec 2017, at 10:59

Creating NSTableView programmatically

2017-12-11 Thread Eric Matecki
Hello, I'm trying to implement in Objective-C on macOS *programmatically* the "Real World Example" at the bottom of this page : https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/WhatAreBindings.html I want to do it programmatically instead of

Re: Thousands of leaked CGContext ?

2015-04-20 Thread Eric Matecki
Hi, CGDataProviderRef provider = CGDataProviderCreateDirect( mps, sizeof(mps), callbacks ); NSWindow* window = (NSWindow*)Window(); What does this line do? It's just a global function which returns the (only) window. For crossplatform compatibility reasons (our app runs on

Thousands of leaked CGContext ?

2015-04-17 Thread Eric Matecki
Hi, (I know this is not 100% Cocoa, but it isn't 100% CoreGraphics either...) I'm drawing to an NSWindow with CoreGraphics, and each time there is a leaked CGContext, CGContextDelegate, CGColorTransform, NSBitmapGraphicsContext, and NSFocusStack (one of each). Here is how I do it :

Re: CheckEventQueueForUserCancel() equivalent in Cocoa ?

2012-07-04 Thread Eric Matecki
On 03/07/12 22:23, Charles Srstka wrote: On Jul 3, 2012, at 10:16 AM, Eric Matecki wrote: everything is in the subject, what's the equivalent for CheckEventQueueForUserCancel() in Cocoa ? There are multiple ways to implement a user cancel operation, depending on your design. Probably

CheckEventQueueForUserCancel() equivalent in Cocoa ?

2012-07-03 Thread Eric Matecki
Hi, everything is in the subject, what's the equivalent for CheckEventQueueForUserCancel() in Cocoa ? Thanks. -- Keep intel OUTSIDE my Mac ! Hiii !!! I can see Intel chips creeping around my G5 ! Eric M. ___ Cocoa-dev mailing list

Re: NSTextInputClient Protocol Question

2012-05-29 Thread Eric Matecki
Hi, But Command+LeftArrow does send the moveToLeftEndOfLine: selector. So the choice of what goes to the menu, and what goes to -doCommandBySelector: must be more subtle than Command+key and (not Command)+key, or maybe just plain arbitrary ? A+ On 26/05/12 00:42, Aki Inoue wrote: Because the

Re: NSTextInputClient Protocol Question

2012-05-25 Thread Eric Matecki
Hi, thanks Aki, now I got this working. (Sorry Aki for the msg send directly to you, I hit send too fast...) I have still a problem. When implementing -doCommandBySelector:, most keys do what I expect, but Command-A sends a selector of noop:, not selectAll: as I expected. What's happeneing ?

NSTextInputClient Protocol Question

2012-05-21 Thread Eric Matecki
Hi, I try to write my own text field, for cross-platform dev. reasons I don't have another choice, unfortunately... So, in my view, I have this: @interface MyOpenGLView : NSOpenGLView NSTextInputClient ... @end @implementation MyOpenGLView - (void) mouseDown: (NSEvent*) iEvent { if(

Re: Window snapping to main screen

2012-05-21 Thread Eric Matecki
Thanks Quincy, this works ! On 07/05/12 11:56, Eric Matecki wrote: On 07/05/12 09:39, Quincey Morris wrote: On May 7, 2012, at 00:30 , Quincey Morris wrote: On May 7, 2012, at 00:14 , Eric Matecki wrote: mWindow = [[NSWindow alloc] initWithContentRect: contentSize styleMask: styleMask

Re: Window snapping to main screen

2012-05-07 Thread Eric Matecki
Hello, nobody has an idea ? On 03/05/12 10:27, Eric Matecki wrote: Hi everybody, I have two screens on my MacPro (10.7.3) When opening a window with the following code : // create a reference rect NSRect contentSize = NSMakeRect( iX, iY, iW, iH ); // allocate window NSUInteger styleMask

Re: Window snapping to main screen

2012-05-07 Thread Eric Matecki
On 07/05/12 09:39, Quincey Morris wrote: On May 7, 2012, at 00:30 , Quincey Morris wrote: On May 7, 2012, at 00:14 , Eric Matecki wrote: mWindow = [[NSWindow alloc] initWithContentRect: contentSize styleMask: styleMask backing: NSBackingStoreBuffered defer: YES]; I would assume

Window snapping to main screen

2012-05-03 Thread Eric Matecki
Hi everybody, I have two screens on my MacPro (10.7.3) When opening a window with the following code : // create a reference rect NSRect contentSize = NSMakeRect( iX, iY, iW, iH ); // allocate window NSUInteger styleMask = NSTitledWindowMask |

Re: ImageCapture + ImageKit problem...

2012-02-24 Thread Eric Matecki
Hi Fritz, On 23/02/12 21:26, Fritz Anderson wrote: On 23 Feb 2012, at 2:12 AM, Eric Matecki wrote: Oh, something that may be part of the problem (or of the solution...): I don't call run on my app for multiplatform portability reasons. Instead I call this in a customized event loop: Alas

Re: ImageCapture + ImageKit problem...

2012-02-24 Thread Eric Matecki
Hi Fritz, On 23/02/12 21:26, Fritz Anderson wrote: On 23 Feb 2012, at 2:12 AM, Eric Matecki wrote: Oh, something that may be part of the problem (or of the solution...): I don't call run on my app for multiplatform portability reasons. Instead I call this in a customized event loop: Alas

ImageCapture + ImageKit problem...

2012-02-23 Thread Eric Matecki
Hi, I have a problem with ImageCapture + ImageKit. My IKDeviceBrowserView stays desperately empty. So I added the following code to the start of my app : ICDeviceBrowser* db = [[ICDeviceBrowser alloc] init]; [db setDelegate: (idICDeviceBrowserDelegate)self];

Re: Example code eyePhoto-Step8 IB help needed

2011-12-21 Thread Eric Matecki
On 20/12/11 17:48, Laurent Daudelin wrote: On Dec 20, 2011, at 06:03, Eric Matecki wrote: Hi, I'm new to IB. I'm trying to find by which magic NSWindow * imageCaptureWindow;, member of @interface Controller : NSWindowController, gets initialized by the following code : [NSBundle loadNibNamed

Example code eyePhoto-Step8 IB help needed

2011-12-20 Thread Eric Matecki
Hi, I'm new to IB. I'm trying to find by which magic NSWindow * imageCaptureWindow;, member of @interface Controller : NSWindowController, gets initialized by the following code : [NSBundle loadNibNamed: @ImageCapture owner: self]; This variable isn't initialized anywhere in the code, so it

Re: Adding sound to movie with QTKit

2011-11-16 Thread Eric Matecki
Thanks, I'll try that. (Sorry Robert for the msg to your address...) However, I don't like creating temporary files :) Would it work if I put the sound (with a prepended AIFF header) into a NSData, creating a movie from that (movieWithData:error:), and inserting that movie's audio track into the

Scanning images

2011-08-09 Thread Eric Matecki
Hello, I need to scan images into my app. Which technology should I use, it has to work from 10.5.x upwards, PPC and Intel, 32 and 64 bits. I know only of ICA. Is there something better (ICA dates back to 10.2) ? Thanks. -- Keep intel OUTSIDE my Mac ! Hiii !!! I can see Intel chips creeping

Re: Scanning images

2011-08-09 Thread Eric Matecki
for versions earlier than 10.5 Sent from my iPhone On Aug 9, 2011, at 10:14 AM, Eric Matecki eml...@wanadoo.fr wrote: Hello, I need to scan images into my app. Which technology should I use, it has to work from 10.5.x upwards, PPC and Intel, 32 and 64 bits. I know only of ICA

Re: Scanning images

2011-08-09 Thread Eric Matecki
Hi Nick, I will try this tomorrow. Probably won't use twain, if the device isn't supported by ImageKit nor ICA, just too bad. Thanks. Nick Zitzmann wrote: On Aug 9, 2011, at 9:42 AM, Eric Matecki wrote: Hi Tom, Yes I'm talking about scanner devices. But I don't have to support versions

Re: Nested runloops

2011-07-22 Thread Eric Matecki
Ken Thomases wrote: On Jul 20, 2011, at 8:01 AM, Eric Matecki wrote: I have to port a software to take advantage of 64 bits adressing. The software was originally written for Windows... So there isn't any real runloop, but there are GetMsg() function calls spread all around the source code

Nested runloops

2011-07-21 Thread Eric Matecki
Hello, I have to port a software to take advantage of 64 bits adressing. The software was originally written for Windows... So there isn't any real runloop, but there are GetMsg() function calls spread all around the source code (in about 200 files out of the 1000+ !!). In Carbon, I used the