Hi Klaus

Well i put the above code to the stack with the on mouseUp like this
Code: Select all
//SWITCH MENUS
put the short name of the target into tTarget
switch tTarget
answer "btn1"
break
case "m2_btn"
answer "btn2"
break
// case "m3_btn"
// case "m4_btn"
// case "m5_btn"
// case "m6_btn"
// case "m7_btn"
end switch
put the short name of the target into tTarget <-- to get the btn names
every button is empty only the on mouseup - mouse end.
the result i get is nothing..like no btn pressed.
when i test the code above in a new empty project is working
the mainstack have the bellow code
Code: Select all
on preOpenStack
-- use switch with "the environment" property to determine if the app is running on mobile or in development
switch the environment
-- if its development, do pretty much what andre was already doing
case "development"
-- set default folder
set the itemdel to "/"
set the defaultfolder to item 1 to -2 of the effective filename of this stack
put "databin.sqlite" into tDatabase -- using a variable to store the path to the database file rather than using the path directly in revopendatabase
break
case "mobile"
-- if its mobile, point to where the database should be.
-- the documents folder is readable and writable.
-- the engine folder path is only readable.
-- when the file was included using the "copy files" pane
-- of the standalone settings, it will end up in the engine folder, next to the executable
-- but since the engine folder isn't writable you have to copy it to the right place if its not already there.
put specialfolderpath("documents") & "/databin.sqlite" into tDatabase
-- see if the database is already in the documents folder
-- if not, copy it there from the engine folder
if there is not a file tDatabase then
put URL ("binfile:" & specialfolderpath("engine") & "/databin.sqlite") into URL ("binfile:" & tDatabase)
end if
break
end switch
-- since aagDBLib should now be a substack you don't hvae to specify a
-- path to the file. Just the stack name.
start using stack "aagDBLib"
-- open the database using the variable tDatabase to point to the file
-- if its on mobile the tdatabase will point to the file in specialfolderpath(documents)
-- otherwise it will point to a file sitting next to the demo stack.
get revOpenDatabase("sqlite",tDatabase,,,)
-- catch any errors as andre already did.
if it is a number then
dbSetDefaultConnectionID it
else
answer error it
end if
end preOpenStack
//SWITCH MENUS
on mouseUp
//put the short name of the target into tTarget
switch tTarget
case "m1_btn"
//show the bar and btn
answer "test"
visual effect curl up
go to card recpel
set the useUnicode to true
-->label
put uniDecode(the unicodetext of fld "rec100","UTF8") into tText
set the unicodelabel of this stack to uniEncode (tText,"UTF8")
break
case "m2_btn"
answer "testing"
break
// case "m3_btn"
// case "m4_btn"
// case "m5_btn"
// case "m6_btn"
// case "m7_btn"
end switch
end mouseUp