home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.sys.mac.programmer:22285 comp.sys.mac.system:16714
- Newsgroups: comp.sys.mac.programmer,comp.sys.mac.system
- Path: sparky!uunet!pageworks.com!world!eff!sol.ctr.columbia.edu!emory!gatech!darwin.sura.net!newsserver.jvnc.net!gmd.de!Germany.EU.net!mcsun!julienas!babbage!isis!imag.fr!ambone
- From: ambone@imag.fr (Ambone Gilles)
- Subject: Need help to compare addresses
- Message-ID: <C1J8nL.Hzp@imag.fr>
- Sender: news@imag.fr (Administration des news)
- Nntp-Posting-Host: localhost
- Organization: IMAG Institute, University of Grenoble, France
- Date: Wed, 27 Jan 1993 21:50:09 GMT
- Lines: 54
-
- Hi,
-
- I had some problem to compare addresses of applications. My system
- is composed like that :
-
- - one (or more) application, name them 'W'
- - one (and only one) background only application, named 'B'
- - one (or more) application, name them 'O'
-
- Each application can be on any computer (eventually the same) using
- system 7 or later (communication by apple event)
-
- I wrote library for 'W' and 'O'. This library must help programmers
- in writing applications 'W' and 'O', for the moment I develop an
- example of these applications, but I will not develop all of them.
-
- 1) 'W' get it's own address by sending himself an apple event.
- (I don't know how to do it by an other way : I can't use PSN because
- application using my library will change and my library must be
- very easy to use)
-
- 2) 'W' say hello to 'B' sending it an apple event
-
- 3) 'B' store the address of 'W', using AEGetAttributePtr on 'addr' field
- of the apple event.
-
- 4) 'W' send to 'B' his address took in 1)
-
- 5) 'B' must compare the two addresses {(1) and (4)} and must see that
- it's the same application.
-
- 6) 'W' send the address of 'O'
-
- 7) 'O' send an apple event to 'B'
-
- 8) one again 'B' must see that address (6) and (7) are the same
-
- For the moment, all my addresses are TargetID because I use PPCBrowser.
- However, the address (1) had only the sender's port name informations,
- other fields are null.
- the address (3) had the same sender's port name than (1) but sender's
- location names are differents.
-
- If I try to compare only the sender's port name, I will certainly
- have problems with two applications 'W' working on differents computers.
-
- Well, actually my comparison is very heuristic, and each time, I found
- a case in which my application doesn't work.
-
- Could anyone help me to compare two addresses ?
- thanks for any help you might give me.
-
- Have a good day,
- Gilles.
-