Re: Strange Console messages
Re: Strange Console messages
- Subject: Re: Strange Console messages
- From: Nicholas Riley <email@hidden>
- Date: Fri, 10 May 2002 21:45:31 -0500
- Resent-date: Fri, 10 May 2002 21:46:27 -0500
- Resent-from: Nicholas Riley <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: email@hidden
On Fri, May 10, 2002 at 06:14:48PM -0700, Steve Gehrman wrote:
>
How is it possible to reuse code in separate projects if this is true.
>
These objects are common objects that are used in every project I
>
create. The trouble occurs I'm assuming since my app is loading the
>
contextual menu plugin.
Right. So the best way to do it is to put the common code in a
framework which you link to from each app, and the code in the
framework only gets loaded once. But of course the problem with this
in an app you've written yourself is that the framework has to be in a
known location.
I've had plenty of problems like this with my apps that dynamically
patch existing Objective-C applications, when upgrading from one
version to another; in my case I just warn the user. Jon Gotow did a
bunch of runtime tricks to try to get his stuff to work with Default
Folder X (and succeeded admirably - I'm impressed), but eventually
decided it was safer just to quit all open apps.
This problem is not easy to solve or NeXT/Apple would have done so
already; an old coworker, Les created a system [1] that solved the
corresponding problem in Smalltalk (which has a much more malleable
runtime than Objective-C) and it took him several years to do so.
>
I can't rename the classes since the classes are shared between many
>
projects. If I rename it, then all the projects will use the new name.
You could work around it with preprocessor tricks to mangle the class
names, I'm pretty sure.
[1] Oasis, <
http://sabine.canis.uiuc.edu:8080/Oasis>
--
=Nicholas Riley <email@hidden> | <
http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.