Code: Select all
on mouseUp
palette "Nonsense"
put the short name of the topStack into STAKK
if STAKK is empty then
put "Utter Cack!"
else
put STAKK
end if
wait 5 seconds
topLevel "Nonsense"
end mouseUp
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
on mouseUp
palette "Nonsense"
put the short name of the topStack into STAKK
if STAKK is empty then
put "Utter Cack!"
else
put STAKK
end if
wait 5 seconds
topLevel "Nonsense"
end mouseUp
Code: Select all
on mouseUp
local STAKK
palette "Nonsense"
put the short name of the topStack into STAKK
if STAKK is empty or STAKK begins with "rev" then
put "Utter Cack!"
else
put STAKK
end if
wait 5 seconds with messages
topLevel "Nonsense"
end mouseUp
Code: Select all
answer the stacks
answer the topStack
Code: Select all
topLevel myStack
Where the stack 'nonsense.livecode' is a stack I use for testing purposes and turned into a palette and saved it.Put the stacks wrote:/Applications/LiveCode 10.0.0 (dp 7).app/Contents/Tools/Toolset/palettes/message-box/revmessagebox.8.rev
/Users/stam/Downloads/nonsense.livecode
/Applications/LiveCode 10.0.0 (dp 7).app/Contents/Tools/Toolset/palettes/menubar/revmenubar.livecodescript
/Applications/LiveCode 10.0.0 (dp 7).app/Contents/Tools/Toolset/palettes/inspector/revinspector.livecodescript
The Dictionary on 'The Stacks' wrote:Since unsaved stacks have no file name, the file names of unsaved stacks are not included in the list. Instead, each unsaved stack is represented by a blank line in the list.
The file paths of substacks are included, but the stack names themselves are not. This means that if more than one stack in a file is open, that file's path appears more than once in the list returned by the stacks function.