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, you are writing an application for Mac OS X. Cocoa's event loop handler 
is probably more than two lines long, and ImageCapture/ImageKit may depend on 
things your event loop does not do.

Narrow your problem down by seeing whether your app works when run as an 
application.

— F


I really can't call run...
Our app runs on macosx, win, linux, android, and even on macrosystem's 
casablanca (if you ever heard about it).
They all have different philosophies about event handling, and we have to find 
some common groud.

In NSApplication's doc, it is said :
Subclassing Notes
...
Methods to Override
...
Override run if you want the application to manage the main event loop differently than it does by default. (This a critical and 
complex task, however, that you should only attempt with good reason.)

...

I think my reason is a good one, or at least a valid one, I can't just rewrite 
everything, that wouldn't make any economic sense.

So where can I find pointers as to how to override the run methods (google 
wasn't my friend this time...) ?
After all, it is explicitly allowed by Apple.

Thanks.

--
Eric M.
http://www.tvpaint.fr
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

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, you are writing an application for Mac OS X. Cocoa's event loop handler 
is probably more than two lines long, and ImageCapture/ImageKit may depend on 
things your event loop does not do.

Narrow your problem down by seeing whether your app works when run as an 
application.

— F


I really can't call run...
Our app runs on macosx, win, linux, android, and even on macrosystem's 
casablanca (if you ever heard about it).
They all have different philosophies about event handling, and we have to find 
some common ground.

In NSApplication's doc, it is said :
Subclassing Notes
...
Methods to Override
...
Override run if you want the application to manage the main event loop differently than it does by default. (This a critical and 
complex task, however, that you should only attempt with good reason.)

...

I think my reason is a good one, or at least a valid one, I can't just rewrite 
everything, that wouldn't make any economic sense.

So where can I find pointers as to how to override the run methods (google 
wasn't my friend this time...) ?
After all, it is explicitly allowed by Apple.

Thanks.

--
Eric M.
http://www.tvpaint.fr
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

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];
db.browsedDeviceTypeMask = db.browsedDeviceTypeMask
| ICDeviceTypeMaskScanner
| ICDeviceTypeMaskCamera
| ICDeviceLocationTypeMaskLocal
| ICDeviceLocationTypeMaskShared
| ICDeviceLocationTypeMaskBonjour
| ICDeviceLocationTypeMaskBluetooth
| ICDeviceLocationTypeMaskRemote;
[db  start];

and deviceBrowser:didAddDevice:moreComing: *IS* called once, with the only 
scanner connected to my computer.
Still, the IKDeviceBrowserView stays empty.

What can be wrong ?

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:
NSEvent*  event = [[NSApplication  sharedApplication]
  nextEventMatchingMask: NSAnyEventMask
  untilDate: [NSDate  
dateWithTimeIntervalSinceNow: 0.01]
 inMode: NSDefaultRunLoopMode
dequeue: YES];
/* OMITED: do some checks for tablet proximity events */
[[NSApplication  sharedApplication]  sendEvent: event];

Any help will be greatly appreciated.

Thanks.

--
Eric M.
http://www.tvpaint.fr
--
Keep intel OUTSIDE my Mac !
Hiii !!! I can see Intel chips creeping around my G5 !

Eric M.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: ImageCapture + ImageKit problem...

2012-02-23 Thread Fritz Anderson
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, you are writing an application for Mac OS X. Cocoa's event loop handler 
is probably more than two lines long, and ImageCapture/ImageKit may depend on 
things your event loop does not do.

Narrow your problem down by seeing whether your app works when run as an 
application. 

— F


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com