I have dveloped a simple bibliography stack, that will list the references 
likely to be needed in a large legal case.  It will be distributed to all 
lawyers and expert witnesses, who will be able to quickly access the 
information they need.  There is an index card, with options to index the 
records by author, title, or the first line of summary text.  Clicking on the 
index by title (or author, or first line) button triggers a repeat loop that 
goes through all the cards extracting the contents of the title (or author, 
or first line) field:

on mouseup
  push card
  lock screen;lock messages
  repeat with i=1 to the number of cards of this stack
    go card i
    if there is a field "title" then 
    if field "title" is not empty then put line 1 of field "title" & return 
after shunt
    end if
  end repeat
  pop card
  put shunt into field index
  send mouseup to button "sortem"
end mouseup

The idea is that double clicking on a line in the index field takes one to 
the relevent record(s)

on mousedoubleup
--Glist records the current content type of the index field
  global glist
  unmark all cards
  switch glist
    case 1
      send mouseup to button gofirstline
      break
    case 2
      send mouseup to button goauthors
      break
    case 3
      send mouseup to button gotitles
  end switch
end mousedoubleup

This was written when I still worked without a license, hence, in button 
gotitles:

on mouseup
  get the selectedtext of field index
  mark cards by finding it in field "title"
  go first marked card
end mouseup

So, the index is recreated afresh every time you switch from one view to 
another (eg authors to titles).  Thus, everything that appears in the index 
definitely exists in the relevant card field.  The problem I have, is that 
doubleclicking most of the index lines gives the expected behaviour, but a 
few do not.  

For example I have a card containing the field which contains the title "The 
Male Survivor".  However, if you list by title, although it appears in the 
index as it should, doubleclicking it does nothing.  Debugging reveals that 
no card is marked in the third of the above scripts.  Changing the text in 
the title field to "Yankee doodle dandy" (and then re-indexing) results in 
the card being displayed and marked as expected.  Change it back, and it 
doesn't work again.  Oddly enough, list by Authors, click on  'Mendel, M. P', 
and 'The Male Survivor' card pops up no problem.  

I am using revolution now, although most of the development was done under MC.

As usual, the customer awaits, and I am stumped.  What am I missing here?

Thanks in anticipation

David

Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to