chunk: can't find background
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
chunk: can't find background
I'm following the video series for the summer school exactly, yet ran into a problem... when I go to run SQLite it says - card "contacts": execution error at line 25 (Chunk: can't find background), char 23
Looking at Elenor's code it's exactly the same, so what's wrong? I've underlined the line of code in question. Thanks!
local sDatabaseConnectionID
on preOpenCard
# mobGUIStart ---> Inserted by mobGUI plugin
if "MobGUILib-1382476204176.13208" is not among the lines of the stacksInUse then start using stack "MobGUILib-1382476204176.13208"
mobGUIPreOpenCard me
# mobGUIEnd
set the uText of group "title" to "Contacts"
end preOpenCard
on databaseConnect pType
if pType is "SQLite" then
put specialFolderPath("documents") & "/contacts.sqlite" into tDatabasePath
put revOpenDatabase("sqlite",tDatabasePath,,,) into sDatabaseConnectionID
else if pType is "Direct MySQL"
else if pType is "Web MySQL"
end databaseConnect
on databaseSelectAllNames
if the uOptionText of group "databaseType" is "SQLite" or the uOptionText of group "databaseType" is "Direct MySQL" then
put empty into field "contacts"
put "SELECT firstname,lastname,contact_id FROM contacts" into tSQLQuery
put revDataFromQuery(comma,return,sDatabaseConnectionID,tSQLQuery) into tContacts
put tContacts into field "contacts"
end if
end databaseSelectAllNames
Looking at Elenor's code it's exactly the same, so what's wrong? I've underlined the line of code in question. Thanks!
local sDatabaseConnectionID
on preOpenCard
# mobGUIStart ---> Inserted by mobGUI plugin
if "MobGUILib-1382476204176.13208" is not among the lines of the stacksInUse then start using stack "MobGUILib-1382476204176.13208"
mobGUIPreOpenCard me
# mobGUIEnd
set the uText of group "title" to "Contacts"
end preOpenCard
on databaseConnect pType
if pType is "SQLite" then
put specialFolderPath("documents") & "/contacts.sqlite" into tDatabasePath
put revOpenDatabase("sqlite",tDatabasePath,,,) into sDatabaseConnectionID
else if pType is "Direct MySQL"
else if pType is "Web MySQL"
end databaseConnect
on databaseSelectAllNames
if the uOptionText of group "databaseType" is "SQLite" or the uOptionText of group "databaseType" is "Direct MySQL" then
put empty into field "contacts"
put "SELECT firstname,lastname,contact_id FROM contacts" into tSQLQuery
put revDataFromQuery(comma,return,sDatabaseConnectionID,tSQLQuery) into tContacts
put tContacts into field "contacts"
end if
end databaseSelectAllNames
Re: chunk: can't find background
Hi.
The error is saying, basically, there is no group (background) named "dataBasetype"
Is there one? In the message box, type in:
True or false?
Craig Newman
The error is saying, basically, there is no group (background) named "dataBasetype"
Is there one? In the message box, type in:
Code: Select all
answer there is a group "dataBaseType"
Craig Newman
Re: chunk: can't find background
It says false - I've been following the instructions so I'm not sure what I missed.
Re: chunk: can't find background
Hi again.
I do not know much about summer school. The very name gives me the shivers.
But however you made your stack, either by importing one or building from whole cloth, there is that object gone missing. It would be the same if you asked in msg:
answer there is a field "someFieldNotYetCreated"
You get "false" there as well, and for the same reason.
Is it possible the group exists, but is under another name? Can you find it by hand? If not, and you simply create a group with that name, does the script run without failure, even though it may not do anything useful?
Craig
I do not know much about summer school. The very name gives me the shivers.
But however you made your stack, either by importing one or building from whole cloth, there is that object gone missing. It would be the same if you asked in msg:
answer there is a field "someFieldNotYetCreated"
You get "false" there as well, and for the same reason.
Is it possible the group exists, but is under another name? Can you find it by hand? If not, and you simply create a group with that name, does the script run without failure, even though it may not do anything useful?
Craig
Re: chunk: can't find background
Haha it's the summer academy from Livecode - I'm using the video series and following along
We were given a file named contacts.sqlite that I put into documents, so as far as I know it's basically linking that file which has a database of names and contact info to the button SQLite that's on the app.
Currently I'm rewatching the video to see if there's something I've missed, but so far the code is exactly the same - so unless they completely skipped a step (doubtful) it should work for me.

We were given a file named contacts.sqlite that I put into documents, so as far as I know it's basically linking that file which has a database of names and contact info to the button SQLite that's on the app.
Currently I'm rewatching the video to see if there's something I've missed, but so far the code is exactly the same - so unless they completely skipped a step (doubtful) it should work for me.
Re: chunk: can't find background
From when Eleanor starts doing the code in the card I have everything the same..
So this databaseType, where exactly would it be located that I can see if it's there or not?
So this databaseType, where exactly would it be located that I can see if it's there or not?
Re: chunk: can't find background
Like I said, summer is not for school. I know no Eleanors.
Where did your stack come from? There is a reference to a group named "databaseType". Who authorized that?
Craig
Where did your stack come from? There is a reference to a group named "databaseType". Who authorized that?
Craig