Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [vtp-dev] FW: vtp-dev messages


I'm not much of a Cocoa programmer, but I did a little sniffing, and I hope my naive outsider questions provoke some ideas:

- Could you use Cocoa Java classes to do all this inside Java? Maybe even moving part of it to the java side would increase the reliability of some of the tasks that are crashing out.
 (Saw an example at http://lists.apple.com/archives/Java-dev/2004/Feb/msg01079.html)

- The apple docs mention that you just start up a thread and it will have a new nsrunloop. What is the limitation that is preventing you from doing that? Maybe if you started the thread on the java side and then launched into JNI it would solve some of your problems.
  (See http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/NSRunLoop.html)

You may also have some luck starting from the opposite direction; getting things working in a standalone cocoa app, then either moving straight to Eclipse or moving to a standalone java app. I've had a lot of success going this route; it helps eliminate some of the problem variables and and reduces the pain of a crash.

--
Brent D. Metz
Enterprise Voice Tools
bdmetz@xxxxxxxxxx
"Simple things should be simple, and complex things should be possible." - Alan Kay



"Shaun Guth" <shaun@xxxxxxxxxx>
Sent by: vtp-dev-bounces@xxxxxxxxxxx

02/14/2006 03:30 AM

Please respond to
Voice Tools general developers <vtp-dev@xxxxxxxxxxx>

To
"Voice Tools general developers" <vtp-dev@xxxxxxxxxxx>
cc
Subject
RE: [vtp-dev] FW: vtp-dev messages





> Good to see you are participating. Are you making progress on the Mac
> library?

Hi guys,

I think I sent my last email to Mike only, so I thought I'd update the
list with my progress report from 2/6 on the Skype dialer library for
Mac OSX:

I spent a weekend hacking away at the SkDialer JNI library.  I ran
into some problems with the Skype API.

The good news:

I managed to get my libSkDialer.jnilib loaded by your Eclipse plugin,
executing my obj-c code, setting the callbacks correctly and
communicating with them, etc.  So far so good!


The bad news (20h):

The Cocoa API for Skype relies on me having a running CFRunLoop, which I
can't run in a separate thread due to limitations of OSX (It will run a
little bit, but then crash and die horribly).  I presume that Eclipse on
Mac OSX would be running a CFRunLoop itself, but if it is, I don't know
how to connect to it. I tried getting an instance of the current loop
using:

NSRunLoop * loop = [NSRunLoop currentRunLoop];

then adding an NSTimer to it, but the timer never fires.  If I add an:

[[NSApplication sharedApplication] run]

Things work, the timers fire, and the application crashes and burns the
JVM.


I might be able to use an ugly hack of spawning a separate process
(using NSTask) and communicate with it via local pipes (icky) -- but I'd
rather not go this route.  I sent a note about this to the skype
developer forums and I've got the primary developer on my buddy list in
the hopes of catching him online, but so far I haven't got any good
responses.

If anyone knows how I can get at the runloop Eclipse is using, that'd be
great!

-- Shaun
_______________________________________________
vtp-dev mailing list
vtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/vtp-dev


Back to the top