Languages, but what the heck?

Lars Brehmer larsbrehmer at mac.com
Mon Sep 18 03:22:00 EDT 2006


First of all thanks a boatload to Devin for his suggestions.  To bad  
the Russian solution only works for answer and not ask, but I tested  
it anyway for future reference and, yes, it works.  The keyboard map  
solution really did it for me though!

However, with this in place I thought I was in the clear but I ran  
into the most frustrating thing that I have ever seen in Rev, and it  
almost cost me a laptop-hurled-against-the-wall, and still might! I  
hate to waste people's time with something so insanely simple, but  
this is too weird!

Has anyone every had a simple line work in the message box but not in  
an object handler? This is so incredibly simple and the exact same  
thing is in a number of my applications and always works as expected,  
but suddenly this happened to me in a new project, and believe me,  
this is the simplest of scripts.  All it should do is this:  after  
choosing a book in a popUp button, a number representing that book is  
put into a custom property, the tBook, of a chapter-choosing button.   
After then choosing a chapter number from that popUp, there is  
another custom property, the tChap, also just a number. The two are  
then combined to become the bChap, that looks, for example, like  
this:  4,5  where 4 is the number of the textbook and 5 is the  
chapter number.  Each card in this stack has a custom property, call  
it the tBookChap, with several lines in it, each one representing a  
book number and a chapter number, for example;

2,3  (book 3, chapter 2, etc)
3,5
5,2

The final step is to mark the cards in the desired chapter of the  
desired book.  Incredibly simple, but it suddenly doesn't work.

    mark cds where the bChap of me is among the lines of the  
tBookChap of this cd

This has always worked for me before.  This time, it worked 1 time  
and then never again.  At one point, clicking on the button didn't  
even bring up the popUp menu!  I have renamed the custom properties,  
tried not combining the the 2 custom properties:

    mark cds where (the tBook of me),(the tChap of me) is among the  
lines of the tBookChap of this cd

Both of these work in other stacks, and work in the message box.  I  
then took a popUp button just like this one from another stack,  
pasted it into this stack, and once it worked one time and then never  
again!  I started trying all kinds of things, like actually having a  
script replace (the bChap of me) in the script in question with the  
desired number.  Believe it or not, this worked one time and never  
again but always works in the message box.  In deBug mode, using the  
message box I could see that the custom properties were always in the  
right place at the right time.  Still nothing worked.  As a last  
resort, I replaced

     mark cds where the bChap of me is among the lines of the  
tBookChap of this cd

with

     if the bChap of me is 1,1 then mark cds where 1,1 is among the  
lines of the tBookChap of this cd
     if the bChap of me is 1,2 then mark cds where 1,2 is among the  
lines of the tBookChap of this cd
     if the bChap of me is 2,1 then mark cds where 2,1 is among the  
lines of the tBookChap of this cd
     ....and a line every single book,chapter combination.

again, this works in the message box, but not in the button.  Things  
were getting a little buggy, so I trashed Rev and reinstalled it.  
Still nothing.
And I have both real stacks and quickly made test stacks where all of  
these things work as expected.  There is nothing unusual about this  
stack, nothing different from my other stacks.  Consider this a most  
urgent plea for help that could get my blood presure back to normal  
and save the life of my computer!

Cheers,

Lars




More information about the use-livecode mailing list