CLIM mail archive


Format-graph-from-roots, merge problem

    Date: Thu, 25 Jun 1992 12:26 EDT
    From: lauren h halverson <>

    Hi all,
    I am running lucid CLIM1.1 on a SPARCstation 2. I am trying to create
    a graph using FORMAT-GRAPH-FROM-ROOTS and have run into two (likely
    related) problems.

Hmm, this is a good one.  The environment I used when writing
FORMAT-GRAPH-FROM-ROOTS is less restrictive as to what test functions
can be used on hash tables than X3J13 specifies.  I don't know exactly
what to suggest as a workaround.

CLIM should fall back to using ASSOC in the case when it can't use a
hash table.

    First I try to use a merge-duplicates test of my own:

	 roots obj-printer inferior-producer 
	 :merge-duplicates t
	 :duplicate-test #'my-duplicate-test)

    I get the following error:

    >>Error: The :TEST argument, #<Standard-Generic-Function MY-DUPLICATE-TEST (2)>, to MAKE-HASH-TABLE isn't legal.
	     It should be either EQ, EQL, EQUAL, or EQUALP 

       Keyword arg 0 (TEST): #<Compiled-Function STRING-EQUAL 692726>
       Keyword arg 1 (SIZE): 67
       Keyword arg 2 (REHASH-SIZE): NIL
       Keyword arg 3 (REHASH-THRESHOLD): NIL
       Keyword arg 4 (USE-CACHE): NIL
    :C  0: Supply a new :test
	1: Retry displaying pane #<CLIM::CLX-WINDOW /x 0:800 y 37:599/ 2C5522E>
	2: Skip redisplaying pane #<CLIM::CLX-WINDOW /x 0:800 y 37:599/ 2C5522E>
	3: Simple Frame top level
	4: Exit Simple Frame
    :A  5: Abort to Lisp Top Level

    -> :A

    SO instead I decided to use a duplicate-key and the dupicate-test

	 roots obj-printer inferior-producer 
	 :merge-duplicates t
	 :duplicate-key #'my-duplicate-key
	 :duplicate-test #'equalp)

    Now  I don't get an  error when I run, but the duplicates aren't merged. The
    duplicate key function is being called, but the test isn't.

    Any ideas ?



Main Index | Thread Index