Quit vs Exit

T. R. Ponn alptex2 at orwell.net
Sun Mar 27 14:24:41 EST 2005


Stewart,

Here's the essence of what I do (a lot of irrelevant code chopped out 
here).  I used to have a lot of this in the openStack as opposed to 
breaking out separate functions.  What you don't see here in the 
abridged version is a lot of other setup stuff that is platform 
specific.  You can streamline it for your application from here:

on openStack
  put whichMachine(platform()) into thisMachine
  do "setUp"&thisMachine
  set the maxHeight of this stack to "475"
  set the maxWidth of this stack to "640"
  set the resizable of this stack to true
end openStack

function whichMachine thisPlatform
  if thisPlatform="MacOS" then
    set the itemDelimiter to "." -- OS versions are of the form "x.y.z"
    if item 1 of the systemVersion >= 10 then
      put "OSX" into thisMachine
    else
      put "Mac" into thisMachine
    end if
    set the itemDelimiter to ","
  else if thisPlatform="Linux" then put "Lin" into thisMachine
  else if thisPlatform="Win32" then put "Win" into thisMachine
  else if thisPlatform="BSD" then put "BSD" into thisMachine
  else if thisPlatform="HP-9000/700" then put "HPX" into thisMachine
  else if thisPlatform="SGI IRIS" then put "Iri" into thisMachine
  else if thisPlatform="IBM RS/6000" then put "RS6" into thisMachine
  else if thisPlatform="Intel SVR4" then put "SOL" into thisMachine
  else if thisPlatform="SPARC" then put "SPC" into thisMachine
  else if thisPlatform="SPARC Solaris" then put "SSO" into thisMachine
  else put "???" into thisMachine
  return thisMachine
end whichMachine

on setUpMac
  put "Quit/Q" into line 2 of btn "File" of card "Main"
  put "Help/?" into line 1 of btn "Help" of card "Main"
  set the decorations of this stack to default
end setUpMac

on setUpOSX
  put "Quit/Q" into line 2 of btn "File" of card "Main"
  put "Help/?" into line 1 of btn "Help" of card "Main"
  set the decorations of this stack to default
end setUpOSX

on setUpWin
  put "Exit/E" into line 2 of btn "File" of card "Main"
  put "Help/H" into line 1 of btn "Help" of card "Main"
  set the decorations of this stack to "minimize, maximize, menu"
end setUpWin


Best Regards,

Tim Ponn




Stewart Lynch wrote:

>In Dan Shaver's book "Revolution, Software at the speed of Thought" he
>refers to a solution for the Macintosh 'Quit' vs Windows 'Exit' menu
>option.  He suggest that we get the code from Richard Gaskin's Intependent
>Study Tutorial that ships with Revolution.
>
>Unfortunately, this shipped with earlier versions of Revolution and not
>the latest version.  Can anyone send me this stack or tell me how to deal
>with this problem?
>
>*******************************************
>........
>:  o/  : Stewart Lynch
>: <|   : Director of Instruction, Technology and Information Services
>: / >  : Richmond School District
>:......:   Richmond, BC Canada
>Internet: slynch at richmond.sd38.bc.ca
>https://public.sd38.bc.ca/~slynch
>tel. (604) 668-6128 fax: (604) 668-6006
>*******************************************
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>  
>




More information about the use-livecode mailing list