Re: Cocoa UI In Carbon App Issues.
Re: Cocoa UI In Carbon App Issues.
- Subject: Re: Cocoa UI In Carbon App Issues.
- From: "Vijay Malhan" <email@hidden>
- Date: Mon, 26 May 2008 12:22:43 +0530
> At least in my case, I use Option+Close in my Carbon+Cocoa app and I
> don't see a crash. (This closes all Cocoa windows and leaves the
> Carbon ones alone.)
>
Do option+Close on Carbon Window, with Cocoa window's open.
This is very much reproducible. Try to reproduce it using CocoaInCarbon
sample. The application doesn't crash immediately. Do an option+close on Carbon
window, the Cocoa window becomes unresponsive (dead) - It may or may not
crash later on. In my app it crashes.
> See if your Cocoa wrapper functions have forgotten any autorelease
> pools, which can cause a crash when Carbon calls the functions.
>
> What version of Mac OS X has hangs? I've seen the odd hang on Panther,
> but nothing on Leopard.
It happens both on Tiger and Leopard. I have not tested this on Panther.
>
> If the menus are still Carbon based, then I would expect key events
> to be trapped and discarded, and converted into "command events" (a
> Carbon concept). So "Copy" isn't bound to anything in a Carbon menu,
> there would have to be a switch somewhere that tests kHICommandCopy
> and invokes a Cocoa method like [NSApp writeSelectionToPasteboard].
> Maybe Apple's default handler does this, I doubt it; but you could
> double-check command handlers to ensure the default handler is called.
I presume, even the Cocoa uses Carbon Menu's within. Only thing I suspect is
that routing of handler-calls to actual Cocoa controls (NSTextField) via
Cocoa event handler is missing, just like in many other similar cases.
Yes, listening to carbon events, interpreting them, and taking action in
Cocoa like [NSApp writeSelectionToPasteboard] is a potential solution. But
it will be very specific. I'm looking for a generic solution. Consider
handling (Select All - Cmd + A) on a Table View or Outline view.
Thanks Kevin.
>
>
> Kevin G.
>
>
>
>
> Hi All,I've implemented a Cocoa UI (as a plugin), in a legacy Carbon App.
>> It
>> is a palette implementation.
>> There are many usability issues related to it. Few of them are like:
>> - Keyboard events loss.
>> - Key selection on Menu's, doesn't work.
>> - Mouse Cursor update event loss.
>> - Option + Close (Close All) crash.
>> - Print dialog hang.
>> - many more...
>> Most of these, I've fixed via different workarounds and for rest I've
>> filed
>> bug-report.
>>
>> There is one issue though, I need to fix urgently:
>> - Inability to use short-cut key's(Cut, Copy, Paste) on Cocoa controls in
>> a
>> Carbon App.
>> Typical use-case failure's are like: Unable to Select All (Cmd+A) in an
>> out-line view. No cut-copy-paste on cocoa text-fields etc.
>> Mouse-Right-Click for edit commands is working.
>>
>> I'm looking for a workaround for this?
>> Thanks in Advance.
>>
>> Note: One can use CocoaInCarbon sample by Apple to reproduce this issue.
>> link : http://developer.apple.com/samplecode/CocoaInCarbon/
>>
>> Vijay
>>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden