Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > using classic code

using classic code
Thread Tools
Senior User
Join Date: Feb 2001
Location: Rochester, uk
Status: Offline
Reply With Quote
Oct 22, 2001, 04:21 AM
 
This is purely theoretical, prompted by this topic...

Is there any way for an app (carbon or cocoa) to explicity use Classic code? To load up pieces of code from an oldprogram, or from known resources, and to run them via Classic mode?
All words are lies. Including these ones.
     
Dedicated MacNNer
Join Date: Jan 2001
Location: Boulder, CO, USA
Status: Offline
Reply With Quote
Oct 22, 2001, 11:50 AM
 
I think the best you could hope for, right now, is to send Apple Events to a classic application. You can't load non-Carbon code fragments in the Carbon runtime on X and just run them -- the non-Carbon APIs will absolutely crash horribly.

But for a screensaver kinda thing, the Apple Events method might be sufficient, except for screensaver games like... oh, fooey. I forgot the name of that AfterDark saver that was like asteroids or something... anyway.

Regardless, without the AfterDark source, writing the Classic app shell for the modules would be near-impossible, I'd guess.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Oct 22, 2001, 12:52 PM
 
No, you can't. It is a physical impossibility to link against both CarbonLib and InterfaceLib at the same time, and so on.
     
sadie  (op)
Senior User
Join Date: Feb 2001
Location: Rochester, uk
Status: Offline
Reply With Quote
Oct 24, 2001, 08:18 AM
 
I was thinking more like running something separately inside the Classic environment and using inter-app communications to interface between them. Then the screensaver trigger in X could be passed through to the Classic program.

Is that possible? Is there any option for IPC between Cocoa and Classic?
All words are lies. Including these ones.
     
Dedicated MacNNer
Join Date: Jan 2001
Location: Boulder, CO, USA
Status: Offline
Reply With Quote
Oct 24, 2001, 11:51 AM
 
Originally posted by sadie:
<STRONG>I was thinking more like running something separately inside the Classic environment and using inter-app communications to interface between them. Then the screensaver trigger in X could be passed through to the Classic program.

Is that possible? Is there any option for IPC between Cocoa and Classic?</STRONG>
I guess I wasn't clear. Yes. That part is (AFAIK) possible. The part that probably isn't possible is building the classic app that knows how to deal with the AppleEvents or AppleScript and also how to read whatever legacy screensaver modules you want it to read... unless you have the source. But then you might as well just port it to X.

&lt;tap tap&gt; is this thing on?
     
sadie  (op)
Senior User
Join Date: Feb 2001
Location: Rochester, uk
Status: Offline
Reply With Quote
Oct 25, 2001, 03:44 AM
 
aleph_null helpfully added:
<STRONG>The part that probably isn't possible is building the classic app that knows how to deal with the AppleEvents or AppleScript and also how to read whatever legacy screensaver modules you want it to read... unless you have the source.</STRONG>
I don't see why it's impossible - i just see it as a lot of work.

What happened to Berkeley, anyway?
All words are lies. Including these ones.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:31 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2