< Previous by Date Date Index Next by Date >
  Thread Index  

[reSIProcate] I think you resip developers should know about this... IMPORTANT.


Hi guys,

Obviously, not many of you guys will never have a need to add the resiprocate into an X-Code project, and this confirms my suspicion that nobody has done this before,
or it would be mentioned on the list.

I scanned for previous archives to see if anyone ever mentioned this problem, and I want to post a fix for this and propose a change to be made in dum/Handle.hxx

Let me explain...

Yesterday, I posted an email to the list titled: problems including DialogUsageManager.hxx Obviously nobody has yet bothered to take a close look at it, but after about 19 hours
of trial and error,  I found something of interest to all you developers.

First,  some background...

The Mac programming environment uses Objective C... we all know that. But I bet you don't know about the special object class type called "id", unique to the Mac. You also should be aware that Objective-C++ uses a global namespace. Other modules like "resip" have their own namespaces, and they are respected in the usual way. But no
matter what,  names defined in the Obj C envirnment have meaning in C++.

In the module:   dum/Handle.hxx there is this line...

  public:
     Handle(HandleManager& ham, Handled::Id id) : mHam(&ham), mId(id)

It uses the "reserved" word "id" which clashes with the Mac's Objective-C++
namespace.

I found out by changing this line to:

    Handle(HandleManager& ham, Handled::Id xid) : mHam(&ham), mId(xid)

Would fix MY problem.

So,  I propose this line be replaced instead of the original line.

Obviously, it is not YOUR problem, but "Drapers law" states that other peoples problems become MY problem... but you guys had NO Idea of this Mac Strangeness. as it is very specific to Mac. Thus my suggestion that we all should refrain from
naming object, structure, or variable names to "id".

Now I have to chase through all this code to find OTHER places where "id" is
used.

John