I fix the Rev standalone settings stack

Brian Thomas runrev at rivertext.com
Mon Jun 14 03:49:34 EDT 2004


I'm really grateful to the Rev team for all the work they did not Rev 
version  2.2 to help with my If Monks project. However, I do think 
that fixes like this should be available for downloading.

First of all, the fixes below are so simple that I have no doubt that 
almost all of you have all already fixed your own copy of the 
Standalone Builder.  And I don't keep up with this list.

::  Perhaps this has already been fixed in the version that you can 
download now. However, there is no indication on the web site of any 
version beyond Rev. 2.2. There is no indication of any bug fixes 
available for Rev 2.2.

Am I the only non-technical owner of Revolution? I'm an artist using 
Revolution to create a world. I barely know a global variable from a 
whole in the ground.

I was able to fix the Standalone builder only because the solution 
was obvious after I compared the scripts for the buttons that worked 
to the scripts of the two buttons that didn't work

I think fixes like this should be made available for folks like me to 
download. So I'm going to post these fixes as a way to make that 
point.



:: 1.  There are 2 "choose" btns on this page. The problem is with 
the "Choose" btn for Document icon - the lower one on the page. 
Without this line you get an error message that says that it cannot 
not "open the icon file". That appears to be because it cannot find 
the file. Note the 17th line of the script

"choose" btn of group Windows of card Windows of stack revStandalone settings


on mouseUp
   if the platform is "Win32"
   then put "Icon Files" & cr & "*.ico" into tFilter
   else put empty into tFilter
   answer file "Select a file:" with filter tFilter
   if it is empty then exit mouseUp
   put it into tFile
   try
     get revGetIcoFile(tFile)
   catch tError
     if word 1 of tError = "Standalone:" then
       answer error word 2 to -1 of tError
     else
       throw tError
     end if
     exit to top
   end try

set the itemDel to "/"  -- *******  add this line here !!!!

   put item 1 to -2 of the fileName of stack (the cRevTargetStack of 
this stack)&"/" into tMainStackPath
   put the number of chars of tMainStackPath into tChars
   if char 1 to tChars of tFile = tMainStackPath then delete char 1 to 
tChars of tFile
   put tFile into fld "documenticonFile"
   send closeField to fld "documenticonFile"
end mouseUp

:: 2. This button does not save the path to the file in the field 
next to the button. It disappears as soon as you leave the Mac OS 
(Pre-OS X) page. I haven't bothered to figure out if this is only a 
cosmetic issue or not. But it certainly is unnerving. Note the last 
line of the script

"Choose" btn of group MacOS of card Mac  OS" os stack revStandaloneSettings

on mouseUp
   answer file "Select a file:"
   if it is empty then
     if fld "includeResources" is not empty then answer question "You 
did not select a file.  Would you like to remove your previous 
choice?" with "No" or "Yes"
     if it is "yes" then put empty into fld "includeResources"
     exit mouseUp
   end if
   put it into tFilePath
   if getResources(tFilePath) is empty then
     answer error "No resources found in file." with "Cancel"
     exit mouseUp
   end if
   put it into tFile
   put item 1 to -2 of the fileName of stack (the cRevTargetStack of 
this stack) into tMainStackPath
   put the number of chars of tMainStackPath into tChars
   if char 1 to tChars of tFile = tMainStackPath then delete char 1 to 
tChars of tFile
   put tFile into fld "includeResources"
     send closeField to fld "includeResources"  -- *******  add this 
line here !!!!
end mouseUp



-- 
Brian

b_t at rivertext.com
http://www.rivertext.com/

a worker's guide to western civilization

http://www.rivertext.com/stuff

one American city's dissent


More information about the use-livecode mailing list