A puzzle with graphBoxDim.

b.arnold at ic.ac.uk b.arnold at ic.ac.uk
Tue Nov 15 06:37:41 EST 1994

Hi there, 

I'm having a problem with a call to graphBoxDim.

The code looks as follows in MapDrawAnyLocus :

 for (i = 0 ; i < arrayMax(look->segs) ; ++i)
    { seg = arrp(look->segs,i,SEG) ;
      if (seg->flag & FLAG_HIDE)
        continue ;
      if (!(seg->flag & (FLAG_ANY_LOCUS | FLAG_MULTIPLE_LOCUS)))
        continue ;
      y = MAP2GRAPH(look->map,seg->x) ;
      if (y > topMargin && y < graphHeight-1)
        { array(look->boxIndex,ibox=graphBoxStart(),int) = i;
          x = errorScale*seg->dx ;
          bumpItem (bump, strlen(name(seg->symbol)), 0.6, &x, &y) ;
          graphText (name(seg->symbol), *offset+x, y-0.3) ;
          graphBoxDraw (ibox, BLACK, WHITE) ;
          graphBoxEnd () ;
          graphBoxMenu (ibox, nGeneMenu) ;

The problem I have is that I now want to make a call as follows


As the code above suggests that ibox has been drawn, and the code compiles ok,
why when I run abi and try and select a map from my list do I get the message

  FATAL ERROR: Cannot get box x - index out of range.

It seems most odd that following a graphBoxEnd() I can then not do a 
graphBoxDim() call. Another interesting item to add to this is that this
only appears to happen if the map consists of information that has boxes
drawn around in the MapDrawAnyLocus function. If any boxes are drawn leftward
of the start of this function then the map draws ok and the graphBoxDim call
works without problem.

I hope someone can explain this I'm completely stumped.

Benedict Arnold.

More information about the Acedb mailing list