swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can a Swarm instance be treated like a SwarmObject instance?


From: William S. Shu
Subject: Re: Can a Swarm instance be treated like a SwarmObject instance?
Date: Fri, 23 Apr 1999 11:45:35 +0100


------
             ,,,,

>On Thu, 22 Apr 1999, Paul E. Johnson wrote:

>I guess I didn't explain my point very well.  Here a
>simplified example:


> [ ... deletions ...]

>    @implementation MySubClass
>        +createBegin: aZone {
>           SomeOtherClass * obj;
>    //     ^^^^^^^^^^^^^^


Thanks for pointing this out.  It solves that problem.  However, it raises a
few problems as to the multiple inheritance I wanted to do on the side! I
have to tinker with code, rather than just copy it.  Also I may have to
ensure my code does not inherit from the wrong things.  What a pain! :-(

[... deleted text ..]
>>
>> I wonder if there is a way of automatically adding such missing protocol
>> implementations from swarm libraries.  If so, life would be easier!
>
>There are ways other than inheritance to combine (or
>alternatively, modularize) the functionality of classes;
>ObjC, in this respect, is more capable (e.g. forwarding)
>than other single-inheritance languages.  Note: (from
>what've read) forwarding is strictly a runtime mechanism and
>hence you can't achieve compile-time protocol conformance
>via forwarding.  (If you could, that would be really cool!)


At this stage, I really don't want to tinker with fail safe mechanisms now
(forwarding seems to make use of it), especially as much of my work now is
on conceptual design of my target problem, not implementation.

Also, most warning messages received so far have had genuine cause.

>In particular, if you want to quiet the "`-_I_Using' not
>found" warning, you could use a touch of Swarm (pre-
>processor) magic; add
>   PHASE( Using ) //;
>to your implementation (i.e. .m file).  You may also need to
>put `USING' in your interface definition (i.e. .h file), but
>I didn't seem to need that.


Could you please indicate where I could read more about these PHASE and
USING mechanisms?  I saw them somewhere, but have never really been able to
trace them again.

Thanks,

William.



                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]