• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: javascript ---> Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: javascript ---> Cocoa


  • Subject: Re: javascript ---> Cocoa
  • From: Apparao <email@hidden>
  • Date: Thu, 29 Nov 2007 13:23:48 +0530

I hope following URL would help you

http://developer.apple.com/documentation/Cocoa/Conceptual/ DisplayWebContent/index.html?http://developer.apple.com/documentation/ Cocoa/Conceptual/DisplayWebContent/Tasks/JavaScriptFromObjC.html

- Apparao.
Effigent Inc,.

On Nov 29, 2007, at 1:06 PM, Ulhas Morbale wrote:

Hello Sam,

I am having the same problem, but not getting out of it. Actually I want to
communicate with the flash(.swf) file in the website using C++ on MAC OS X
10.4
As you are telling that we can embed web pages in cocoa app using Web Kit,
is it possible to communicate (transfer string data) with the flash .swf
file in the web page from C++ using the Carbon or Cocoa framework (second
option after Carbon). Can I call C++ from JavaScript & vice versa? which
will be the best option to use shared library or Java Native Interface(JNI).


Any HELP/API's/tutorials/sample apps are greatly appreciated.

Thanks in advance
Regards,
Ulhas
----- Original Message -----
From: "Sam Stigler" <email@hidden>
To: "Apparao" <email@hidden>
Cc: <email@hidden>
Sent: Monday, November 26, 2007 1:48 PM
Subject: Re: javascript ---> Cocoa


First, I must tell you there is no way to run Cocoa embedded in a web
browser; and it's definitely not OS-independent.  But if you're
looking for a way to get a great UI, plus animation, on the Mac
platform, a Cocoa app is definitely the way to go.

Although Web Kit makes it possible for you to embed web pages in your
Cocoa application, I'd say a complete rewrite is in your best
interest.  Chances are you'll find implementations of everything you
can do in Javascript in either Objective-C or C (not to mention C++,
Python, and Ruby); and it shouldn't be too hard for you to express
your application's logic again in whichever language you choose
(assuming you know it (-: ).  After all, the languages are fairly
similar at root -- they all use if-else, for, and so on.  Having said
that, there's no software out there (at least that I know of) that
will take your Javascript and turn it into Objective-C.

I don't have any idea what your app does, or how complex it is, or
what its GUI looks like right now, etc; but still... Here are some
suggested steps I might take if I were in your position (take these
with a grain of salt because some people prefer to write the model
first, etc.):
1) Open Xcode and create a new Cocoa Application. Make it be
document-based if it needs to save to disk, Core Data-based if it
needs to manage a lot of data, and Quartz Composer-based if you want
to be able to easily add one or more Quartz Compositions into it.
2) Double-click on MainMenu.nib and use Interface Builder to design
a nice-looking, easy-to-use UI using the standard controls provided.
Pay particular attention to Web View (part of Web Kit) for integrating
web pages into your Cocoa app (although it might be best from a UI
standpoint just to get rid of them completely).
3) Assuming you already know Cocoa, and that your existing
application isn't overly complex: In your Xcode project, create a new
Objective-C class for your model, and populate it with the IBActions
and IBOutlets that you need for your UI. Connect them up in IB and
work from there. A good starting point is
http://developer.apple.com/documentation/Cocoa/index.html
.

I hope this helps.

-Sam


On Nov 25, 2007, at 11:31 PM, Apparao wrote:

Hi All,

I have developed a application using html and  Javascript. Now I am
interested to replace javascript part with Cocoa -- for better UI
look and feel and animation effects.

Can any body suggests -- easiest way for conversion?.

TIA,
- Apparao.
_______________________________________________

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:

40mac.com

This email sent to email@hidden

_______________________________________________

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:

40techendeavour.com

This email sent to email@hidden



_______________________________________________

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:
40effigent.net


This email sent to email@hidden


_______________________________________________

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


References: 
 >javascript ---> Cocoa (From: Apparao <email@hidden>)
 >Re: javascript ---> Cocoa (From: Sam Stigler <email@hidden>)
 >Re: javascript ---> Cocoa (From: "Ulhas Morbale" <email@hidden>)

  • Prev by Date: Re: javascript ---> Cocoa
  • Next by Date: [OT] Chown returns file lock error
  • Previous by thread: Re: javascript ---> Cocoa
  • Next by thread: Possible to control animation of appearance of images in IKImageBrowserView
  • Index(es):
    • Date
    • Thread