Error description: Chunk: source is not a container
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Error description: Chunk: source is not a container
dDates looks like this:
5/14
5/13
5/12
5/11
5/10
5/9
5/8
I am not trying to puch each line into a separate field with the code below but getting the error AFTER field wdate7 IS filled in with line 1 of dDates. So, my stupid brain says "well every source was a container at some point if it worked once"
put "7" into dateField
repeat for each line tLine in dDates
switch dateField
case 1
put tLine into fld "wdate1" in group "gWeek"
BREAK
case 2
put tLine into fld "wdate2" in group "gWeek"
BREAK
case 3
put tLine into fld "wdate3" in group "gWeek"
BREAK
case 4
put tLine into fld "wdate4" in group "gWeek"
BREAK
case 5
put tLine into fld "wdate5" in group "gWeek"
BREAK
case 6
put tLine into fld "wdate6" in group "gWeek"
BREAK
case 7
put tLine into fld "wdate7" in group "gWeek"
BREAK
end switch
put dateField - 1 into dateField
end repeat
5/14
5/13
5/12
5/11
5/10
5/9
5/8
I am not trying to puch each line into a separate field with the code below but getting the error AFTER field wdate7 IS filled in with line 1 of dDates. So, my stupid brain says "well every source was a container at some point if it worked once"
put "7" into dateField
repeat for each line tLine in dDates
switch dateField
case 1
put tLine into fld "wdate1" in group "gWeek"
BREAK
case 2
put tLine into fld "wdate2" in group "gWeek"
BREAK
case 3
put tLine into fld "wdate3" in group "gWeek"
BREAK
case 4
put tLine into fld "wdate4" in group "gWeek"
BREAK
case 5
put tLine into fld "wdate5" in group "gWeek"
BREAK
case 6
put tLine into fld "wdate6" in group "gWeek"
BREAK
case 7
put tLine into fld "wdate7" in group "gWeek"
BREAK
end switch
put dateField - 1 into dateField
end repeat
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Error description: Chunk: source is not a container
Hi.
What is in "dDates"?
Anyway, running the handler as is, where dDates is simply "dDates", since you did not do anything with it, so it has one line, produces no error.
That is, assuming there is a field "wDate7".
Craig Newman
What is in "dDates"?
Anyway, running the handler as is, where dDates is simply "dDates", since you did not do anything with it, so it has one line, produces no error.
That is, assuming there is a field "wDate7".
Craig Newman
Re: Error description: Chunk: source is not a container
Its just a variable with 7 lines of datesDavJans wrote:dDates looks like this:
5/14
5/13
5/12
5/11
5/10
5/9
5/8
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Error description: Chunk: source is not a container
As I mentioned earlier it it does put the correct data into field "wdate7"
So I did some testing and I have narrowed it down if it helps any of you smarter people help me.
case 7
answer "Hi"
put tLine into fld "wdate7" in group "gWeek"
BREAK
In this case I get a popup that tells me Hi as expected
Then it puts the correct data into field "wdate7"
then I get the error
now, if I switch it up like so:
case 7
put tLine into fld "wdate7" in group "gWeek"
answer "Hi"
BREAK
In this case the correct data is put into field "wdate7"
Then I get the error, No pop up greeting me.
So I did some testing and I have narrowed it down if it helps any of you smarter people help me.
case 7
answer "Hi"
put tLine into fld "wdate7" in group "gWeek"
BREAK
In this case I get a popup that tells me Hi as expected
Then it puts the correct data into field "wdate7"
then I get the error
now, if I switch it up like so:
case 7
put tLine into fld "wdate7" in group "gWeek"
answer "Hi"
BREAK
In this case the correct data is put into field "wdate7"
Then I get the error, No pop up greeting me.
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Error description: Chunk: source is not a container
I fixed it
put stuff into fld "whatever" OF group "whatever" not IN group
put stuff into fld "whatever" OF group "whatever" not IN group
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Error description: Chunk: source is not a container
There's a quicker way to get the data into the field without running a repeat loop:
This assumes that your dates are in the right order, with field 1 being line 1 of the date list.
Code: Select all
put "7" into dateField
put ("wdate"&dateField) into tFld -- creates the field name
put line dateField of dDates into field tFld of group "gWeek"
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com