Path: utzoo!attcan!uunet!know!sdd.hp.com!zaphod.mps.ohio-state.edu!wuarchive!udel!ee.udel.edu From: new@ee.udel.edu (Darren New) Newsgroups: comp.sys.amiga.tech Subject: Re: AppIcon questions Message-ID: <34891@nigel.ee.udel.edu> Date: 29 Oct 90 20:59:33 GMT References: <1990Oct28.002631.27874@cunixf.cc.columbia.edu> Sender: usenet@ee.udel.edu Organization: University of Delaware Lines: 28 Nntp-Posting-Host: estelle.ee.udel.edu In article <1990Oct28.002631.27874@cunixf.cc.columbia.edu> es1@cunixb.cc.columbia.edu (Ethan Solomita) writes: >The only question I have is how to find the exact path of the >file, as well as the name of the icon. The WBArg received ^^^^^^^^^^^^^^^^ Which icon? >contains a name and a lock. Well, the name you got is "relative" to the lock. That is, if the lock is the current directory, then the name will open the file. If you Examine() the lock, the name field will contain the name of the directory holding the file. Use ParentDir() to get the lock on the parent of the directory holding the directory and Examine() that lock for its file name. And so on until you get an error or a zero lock or something like that (I forget which) at which point the name will be the name of the volume as seen on the workbench. For example, if the file's full path was XYZ:PdQ/AbC/Big/Cube Then you would get a lock on XYZ:PdQ/AbC/Big and the string "Cube". Examining the lock would yield "Big" in the name. Examining the ParentDir of the lock would yield "AbC" and so on all the way up to yielding "XYZ". The ParentDir() of "XYZ" probably yields zero, if I remember right. Also remember to put a colon in the right place instead of a slash. I don't know how .info files work under 2.0, so I can't help you there. -- Darren -- --- Darren New --- Grad Student --- CIS --- Univ. of Delaware --- ----- Network Protocols, Graphics, Programming Languages, Formal Description Techniques (esp. Estelle), Coffee -----