Page 1 of 1

[SOLVED] Messagebox pending messages

Posted: Thu Feb 12, 2015 1:17 pm
by andy60
I don't know to erase these pending messages and the message box windows opens during my program's execution.
The http://lessons.runrev.com/m/4071/l/8537 ... and-tricks does not speak about it.
If i click on pending button i don't see nothing.

Re: Messagebox pending messages

Posted: Thu Feb 12, 2015 3:01 pm
by dunbarx
Hi.

You may not have any pending messages. Where in your code do you think these are queued?

The message box should only open if asked to, and this may come if, say, you: "put someData". If no container is specified (put someData into fld 1), the message box is the default.

Any of this help?

Craig Newman

Re: Messagebox pending messages

Posted: Fri Feb 13, 2015 5:35 am
by andy60
dunbarx wrote:Hi.

You may not have any pending messages. Where in your code do you think these are queued?

The message box should only open if asked to, and this may come if, say, you: "put someData". If no container is specified (put someData into vld 1), the message box is the default.

Any of this help?

Craig Newman
Hi Craig,
Thx for your help. I will check my code. I will let you know.

Re: Messagebox pending messages

Posted: Sat Feb 14, 2015 4:42 pm
by andy60
Dear Craig i continue to have problems, message box window appear if i load substack. Script checked, you can see the full script (substack of main stack):

sub stack load with script:

Code: Select all

on mouseUp
   go to stack "speed"
end mouseUp
substack code:

Code: Select all

local sDbId

on opencard
   opendb
end opencard

on closecard
   closedb
end closecard

command opendb
   put revOpenDatabase("sqlite","/Users/andreabertini/Documents/Browser/bookmarks.db") into tDb
   if tDb is an integer then
      put tDb into sDbId
   end if
   put sDbId
end opendb

command closeDb
   put revopendatabases() into tDbs
   repeat for each item tItem in tDbs
      revclosedatabase tItem
   end repeat
put empty into sDbId
end closeDb

function getData
   local tSql
   put "select * from speedUrl where idspeed=1" into tSql
   put  revdatafromquery(,,sDbId,tSql) into tData
   return tData
end getData

command FillFields
   put getData() into tData
   set the itemdelimiter to tab
   put item 2 of tData into field "Field1"
   put item 3 of tdata into field "Field2"
   put item 4 of tdata into field "Field3"
   put item 5 of tdata into field "Field4"
   put item 6 of tdata into field "Field5"
   put item 7 of tdata into field "Field6"
   put item 8 of tdata into field "Field7"
   put item 9 of tdata into field "Field8"
   put item 10 of tdata into field "Field9"
   put item 11 of tdata into field "Field10"
end FillFields

command ClearFields
   put "" into field "Field1"
   put "" into field "Field2"
   put "" into field "Field3"
   put "" into field "Field4"
   put "" into field "Field5"
   put "" into field "Field6"
   put "" into field "Field7"
   put "" into field "Field8"
   put "" into field "Field9"
   put "" into field "Field10"
end ClearFields

command SaveAll
   put field "Field1" into v1
   put field "Field2" into v2
   put field "Field3" into v3
   put field "Field4" into v4
   put field "Field5" into v5
   put field "Field6" into v6
   put field "Field7" into v7
   put field "Field8" into v8
   put field "Field9" into v9
   put field "Field10" into v10
   put "UPDATE speedUrl SET " & merge("name1='[[v1]]',url1='[[v2]]',name2='[[v3]]',url2='[[v4]]',name3='[[v5]]',url3='[[v6]]',name4='[[v7]]',url4='[[v8]]',name5='[[v9]]',url5='[[v10]]' ") &  "WHERE idspeed = 1" into tCmd
   revExecuteSQL sDbId, tCmd, "myArray"
end SaveAll
the stacks seems to work good, i don't understand it.

Re: Messagebox pending messages

Posted: Sat Feb 14, 2015 10:55 pm
by jacque
Here it is, at the end of the openDB handler:

put sDbId

A plain "put" that isn't placed into a variable will go into the message box.

Re: Messagebox pending messages

Posted: Sun Feb 15, 2015 4:50 am
by andy60
jacque wrote:Here it is, at the end of the openDB handler:

put sDbId

A plain "put" that isn't placed into a variable will go into the message box.
Great work, now it works well. Thx!

Posted: Mon Feb 16, 2015 6:33 pm
by Corei7vne
Bookmark to read later...
Cheers,
Corei7vne