Problem! Inaccessible substack

Richard Gaskin ambassador at fourthworld.com
Fri Feb 4 23:24:34 EST 2005


Chipp Walters wrote:
> Also, I'd consider uninstalling Devolution if you can and then try 
> again. Richard's an incredible programmer (thorough and very picky), and 
> he programmed all of Devolution inside the Metacard IDE, not the 
> Revolution IDE. He doesn't spend as much time in the Rev IDE as MC, so I 
> would assume Devolution probably hasn't logged as many hours inside Rev 
> as MC either. If, in fact there is an obscure conflict, I expect it 
> would be Revolution's IDE doing something *not expected* rather than 
> Richard's code having a problem.

That's very kind, but not always true. ;)

> But, as a last resort, removing all plugins is always a good idea 
> (including mine as well).

Ordinarily that would be optimal:  pull plugins to cut down the 
potential solution space, putting them back in batches if the problem 
went away with them removed (just as with extensions conflicts in Mac 
Classic).

But if I read his post correctly, he has a stack named "33" -- most 
everyone's tools choke on stacks named with only numerals, since 
attempting to address them by shot name is also a valid reference by 
number, but likely to a different stack.

His post mentions that the Rev IDE doesn't even show it at all.  So even 
without potentially wonky plugins (and it's true I spend relatively 
little time in the Rev IDE) the situation cannot improve.

Try it:  name a substack "33" and play around with the IDE.  Strange 
things happen.  Here I see blank entries in the Exec Err dialog pop up a 
lot, esp. when I select File->Quit.

This has come up here before, in Dec. '03: 
<http://lists.runrev.com/pipermail/use-revolution/2003-December/027697.html>.

Here's the repair script from that post:

on mouseup
    put "MyMainStackName" into tMainStack  --< your main stack name
    get the substacks of stack tMainStack
    repeat with i = 1 to the number of lines of it
       if the short name of stack i of stack tMainStack is a number then
          set the name of stack i of stack tMainStack to (i&"xxxx")
       end if
    end repeat
end mouseup

The trick to that is being very explicit about referring to the substack 
  by including its mainstack in the descriptor ("stack <substackname> of 
stack <mainstackName>").  Referring to stacks by number is rarely done 
(I'm not even sure what the rules are -- order of loading?), and since 
the engine can only have one stack in memory with a given name at a time 
there's usually no need to refer to them by anything other than their 
name -- except in this case in which the name is also an integer. :)

So that script uses a very explicit substack descriptor to prepend an 
alphabetic character to the name, and once that's done all future 
references to it by short name alone will work fine.

But even better than repair is prevention, so I just entered a feature 
request in Bugzilla to have the IDE prevent purely numeric strings when 
naming stacks:
<http://support.runrev.com/bugdatabase/show_bug.cgi?id=2582>

I've never namd any object with an integer only because some xTalk book 
or snother I read a decade ago told me not to.  But with a minor tweak 
to the IDE we can cut people's required reading down by ten years. :)

--
  Richard Gaskin
  Fourth World Media Corporation
  __________________________________________________
  Rev tools and more: http://www.fourthworld.com/rev


More information about the use-livecode mailing list