Bill,
This example application will hopefully open the door for others to
develop with a true Mac user interface (client) and J back end
(server). I expect to follow your suggestion in part: I will probably
develop and test with the Java console. However, the scripts(s)
produced will have no UI elements. All of that code will be in the
Objective C client.
I don't think you can easily call on the Cocoa framework from J as it
stands. You need access to Objective C and the Core Foundation
framework to make that work. For example, Objective C invokes methods
by sending messages to objects. For example, if you want the
application to display a file open dialog panel to the user (the
Cocoa one, not the Java one) you'd do so by sending a message in the
following way:
[NSOpenPanel openPanel]
This sends an openPanel message to the NSOpenPanel class, resulting
in the instantiation of the expected object. To make this possible
from J, J would have to provide a function, probably something in
the !: group which would provide the messaging capability. I'm sure
messaging would just be the beginning.
Perhaps you should take a closer look at a Mac; nice Unix box, no
peripherals :)
On 11-Apr-07, at 9:51 AM, bill lam wrote:
I don't own an Mac or have any experience with cocoa, but I'm very
interested in your work and read the Commentary.pdf. As I
understand, the main program is in objective-c/cocoa and it calls
libj601 as a shared library. Did you also consider the possibility
of doing the opposite by running J as main program and call cocoa
as shared library? The advantage is that Jdata.m is not needed and
the J java fronted can be used for development but not needed for
final standard-alone script.
--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm