A real stinker

Bob Sneidar bobsneidar at iotecdigital.com
Thu May 12 17:55:01 EDT 2016


Well the issue still exists, but I applied the workaround that was in my post and that seems to have gotten my project working again. I will have to do a series of extensive testing on all the features to make sure this does not bite me in the buttocks. 

Now I think I see what is going on (although why I cannot reproduce it in a simple stack evades me). I have the command:

put me & cr & the long name of me into tTestVar

The first line is the SHORT name of the card, and the second line is of course the long one. 

It appears that in my stack it is unable to resolve the long name of the card from the short name. I will say that in the hierarchy of commands and functions are backscripts and frontscripts and that may be messing with the name resolution in version 8. 

Bob S


> On May 12, 2016, at 14:32 , Bob Sneidar <bobsneidar at iotecdigital.com> wrote:
> 
> Hi all. Here's a real stinker:
> 
> I have a main card, and a Database Setup card. I have a function handler in the Database Setup card called getConnection(). All this function does is populate an array with the state and contents of certain fields and buttons on the Database Setup card and return the array. 
> 
> Now in 6.7 the current card can be any card in the stack and the function works as expected. In version 8 however it *ONY* works if the current card is the Database Setup card! 
> 
> Here's an example of a command in that function:
> put the hilited of button "btndbPrimary" of me into aConnection ["enabled"]
> 
> This button is a checkbox which is hilited if I am currently connected to a database. If I am using version 8, and the current card is NOT Database Setup, it will return false, and field values will return empty. 
> 
> Now I have tried to create a new simple stack to demonstrate this, but it works in the new stack. But a project I developed in 6 and opened in 8 (I assume there is a conversion going on there) it does not work correctly. 
> 
> Now here is a twist. If I first use the command:
> put the long name of me into tThisCardID
> 
> and then substitute *me* with tThisCardID like so:
> put the hilite of button "btndbPrimary" of tThisCardID into aConnection ["enabled"]
> 
> THAT WORKS!! It seems that *me* is only referring to the correct card if it is the current card in my project, and only in version 8 and only with converted stacks. 
> 
> I can probably fix this by replacing every instance of *me* with the long name of the card or object it is referring to, but that will be a helluvalotta work. I'd rather figure out what is going on here. I wouldn't mind sending a copy of the stack to someone at RunRev, but because this stack access company data that I cannot generally divulge to others, I would have to connect to some dummy data for you to see what it is doing. 
> 
> Bob S





More information about the Use-livecode mailing list