Getting a dictionay's name 
Author Message
 Getting a dictionay's name

If there is a dictionary on the stack, does anyone know how to obtain the
name of that dictionary.  I realize some are not given names, but if there
is a name, how do I get it.  Thanks for any leads on this.


Fri, 10 Jan 2003 03:00:00 GMT  
 Getting a dictionay's name

Quote:

>If there is a dictionary on the stack, does anyone know how to obtain the
>name of that dictionary.  I realize some are not given names, but if there
>is a name, how do I get it.  Thanks for any leads on this.

There is no direct connection in a typical interpreter. The
relationship is part of the parent dictionary; and an object has no
knowledge of its parent(s).

The only way you can find out the name (or a name, it may have
several) is to look for that dictionary in likely places. Enumerating
each dictionary on the dictionary stack, looking for one containing
your target, may find a match.

PSAlter makes this easier; for every nonempty composite object that is
ever given a name, the first given name is recorded as part of the
object and is hence available.

----------------------------------------

Visit http://www.*-*-*.com/ ,
PSAlter, psalters, tea, and small {*filter*} animals. And stuff.  



Fri, 10 Jan 2003 03:00:00 GMT  
 Getting a dictionay's name

Quote:


>>If there is a dictionary on the stack, does anyone know how to obtain the
>>name of that dictionary.  I realize some are not given names, but if there
>>is a name, how do I get it.  Thanks for any leads on this.

>There is no direct connection in a typical interpreter. The
>relationship is part of the parent dictionary; and an object has no
>knowledge of its parent(s).

>The only way you can find out the name (or a name, it may have
>several) is to look for that dictionary in likely places. Enumerating
>each dictionary on the dictionary stack, looking for one containing
>your target, may find a match.

>PSAlter makes this easier; for every nonempty composite object that is
>ever given a name, the first given name is recorded as part of the
>object and is hence available.

Sounds like something added during debugging, and never
removed because it was too useful!


Sat, 11 Jan 2003 03:00:00 GMT  
 Getting a dictionay's name

Quote:

> If there is a dictionary on the stack, does anyone know how to obtain the
> name of that dictionary.  I realize some are not given names, but if there
> is a name, how do I get it.  Thanks for any leads on this.

The DSCVerifier uses the following technique:

For every dictionary on the dictionary stack, reverse it.
Then use the dictionary object you are looking for as an
index into the reversed dictionary.

You don't have write this code if you have the DSCVerifier
and a Mac. Insert a bomb into the postscript code at an
appropriate spot and download the file to a printer.
The error listing will provide the names of all dictionaries
on the object and dictionary stacks.

/Bob

--
 Robert A. Anderson            Tel:    603.884.3269
 Compaq Computer Corp.         Fax:    603.884.3940
 8 Cotton Road                 Opinions expressed
 Nashua, NH 03063 USA          are strictly my own.



Sun, 19 Jan 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Getting the user's logon name and computer name

2. Getting client side machine's name.

3. Getting name of the user's computer

4. Getting client side machine's name.

5. Getting the name of user's computer

6. getting query string from frame in jscript and getting frame name from another frame

7. Getting short file name from long file name:

8. Getting .AFM's from .PFB's (was Re: PS Type1 fonts)

9. Object required: 'f.Name'

10. A folder named '...'

11. I can't get Subfolder's name

12. getting all the computer names which are online

 

 
Powered by phpBB® Forum Software