transfering text?? please help!!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
If your fields contain only 1 line:
If multiple lines, then use:
Let me know if this works for you.
Best,
Mark
Code: Select all
on menuPick thepick
if thepick = "1.1" then
put field "bridlenumber" & tab & field "horsesname" & tab & field "ridersname" into field "result" of card 3 of stack "Compleat Show Entries"
end if
end menuPick
Code: Select all
on menuPick thepick
if thepick = "1.1" then
put joinTable(fld "bridlenumber",fld "horsesname",fld "ridersname") into field "result" of card 3 of stack "Compleat Show Entries"
end if
end menuPick
function joinTable
put the paramCount into myNrOfColumns
put 0 until myNrOfLines
repeat with x = 1 to myNrOfColumns
if number of lines of param(x) > myNrOfLines then
put number of lines of param(x) into myNrOfLines
end if
end repeat
put empty into myData
repeat with x = 1 to myNrOfLines
repeat with y = 1 to myNrOfColumns
put line x of param(y) & tab after myData
end repeat
delete last char of myData
put cr after myData
end repeat
delete last char of myData
end joinTable
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
oh you did it
it WORKS lol lol lol
oh thank you so much sparkout and BvG
you both have helped me sooo much i cant believe it LOL
i was going bald, pulling my hair out LOL
it has taken you guys half an hour, after i have spent nearly two weeks of trying to read god damn stuff
THANK YOU SO MUCH.
i will now go off and give you some peace, UNTIL i get to the next bit LOL
THANK YOU SO MUCH
regards
tanya
it WORKS lol lol lol
oh thank you so much sparkout and BvG
you both have helped me sooo much i cant believe it LOL
i was going bald, pulling my hair out LOL
it has taken you guys half an hour, after i have spent nearly two weeks of trying to read god damn stuff
THANK YOU SO MUCH.
i will now go off and give you some peace, UNTIL i get to the next bit LOL
THANK YOU SO MUCH
regards
tanya
LOL ok mark
i put in
on menuPick thepick
if thepick = "1.1" then
put jointable(fld "bridlenumber",fld"horsesname",fld"ridersname") into field "1.1" of card 3 of stack "Compleat Show Enteries"
end if
end menuPick
function joinTable
put the paramcount into myNrOfColumns
put 0 until myNrOflines
repeat with x = 1 to myNrOfColumns
if number of lines of param(x) > myNrOfLines then
put number of lines of param(x) into myNrOfLines
end if
end repeat
put empty into myData
repeat with x = 1 to myNrOfLines
repeat with y = 1 to myNrOfColumns
put line x of param(y) & tab after myData
end repeat
delete last chat of myData
put cr after myData
end repeat
delete last char of myData
end joinTable
and when i went to apply
i received this
compiling at 10:48:19 PM
Type Commands: missing ','
Object ComboBox Menu
Line delete last chat of myData
Hint of
no i put all that in, and i have no idea what i put in, i may add LOL
so what did i do wrong??
cheers
mark
oh and i did not see your post until i came back to say i was having rouble entering the second choice LOL LOL
but ran off to try yours
i put in
on menuPick thepick
if thepick = "1.1" then
put jointable(fld "bridlenumber",fld"horsesname",fld"ridersname") into field "1.1" of card 3 of stack "Compleat Show Enteries"
end if
end menuPick
function joinTable
put the paramcount into myNrOfColumns
put 0 until myNrOflines
repeat with x = 1 to myNrOfColumns
if number of lines of param(x) > myNrOfLines then
put number of lines of param(x) into myNrOfLines
end if
end repeat
put empty into myData
repeat with x = 1 to myNrOfLines
repeat with y = 1 to myNrOfColumns
put line x of param(y) & tab after myData
end repeat
delete last chat of myData
put cr after myData
end repeat
delete last char of myData
end joinTable
and when i went to apply
i received this
compiling at 10:48:19 PM
Type Commands: missing ','
Object ComboBox Menu
Line delete last chat of myData
Hint of
no i put all that in, and i have no idea what i put in, i may add LOL
so what did i do wrong??
cheers
mark
oh and i did not see your post until i came back to say i was having rouble entering the second choice LOL LOL
but ran off to try yours
Hi Tanya,
It should be: delete last char of myData, instead of chat.
It seems you typed everything manually? You could copy-paste...? :roll:
Mark
It should be: delete last char of myData, instead of chat.
It seems you typed everything manually? You could copy-paste...? :roll:
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
hi mark, the time difference is going to be a nightmare LOL
ok, now i copied and pasted your (text)
and it just keeps comming up with this
executing at 7:40:42 AM
Type Chunk: no such object
Object ComboBox Menu
Line put joinTable(fld "bridlenumber",fld "horsesname",fld "ridersname") into field "result" of card 3 of stack "Compleat Show Entries"
Hint bridlenumber
i have tried changing "results" to "1.1" which has made now difference (1.1 is also the name of the text table)
now i understand it is saying (i think) that there is no bridlename object, and so i double checked the name of the text box, and that all seems correct.
so i am at a loss of what to do.
cheers
ok, now i copied and pasted your (text)
and it just keeps comming up with this
executing at 7:40:42 AM
Type Chunk: no such object
Object ComboBox Menu
Line put joinTable(fld "bridlenumber",fld "horsesname",fld "ridersname") into field "result" of card 3 of stack "Compleat Show Entries"
Hint bridlenumber
i have tried changing "results" to "1.1" which has made now difference (1.1 is also the name of the text table)
now i understand it is saying (i think) that there is no bridlename object, and so i double checked the name of the text box, and that all seems correct.
so i am at a loss of what to do.
cheers
Hi Tanya,
I assumed that the field Bridlenumber is on the same card as your combobox, which contains the script, while field "Result" is on card 3 of your stack. If this assumption is wrong, then you have to adjust the script to refer correctly to all objects.
For example, you may ned to replace fld "Bridlenumber" with fld "Bridlenumber" of cd 2. I don't know where this field is exactly, which means that you have to figure this out for yourself.
Note that according to your script, there is a field Bridlenumber and not a field Bridlename.
Do not give objects names equal to numbers. I don't really think that calling a field "1.1" causes big problems, but I wouldn't recommend it anyway, because if you happen to call an object "1.0" it is an integer and will refer to the first object rather than to the object named "1.0".
Best,
Mark
I assumed that the field Bridlenumber is on the same card as your combobox, which contains the script, while field "Result" is on card 3 of your stack. If this assumption is wrong, then you have to adjust the script to refer correctly to all objects.
For example, you may ned to replace fld "Bridlenumber" with fld "Bridlenumber" of cd 2. I don't know where this field is exactly, which means that you have to figure this out for yourself.
Note that according to your script, there is a field Bridlenumber and not a field Bridlename.
Do not give objects names equal to numbers. I don't really think that calling a field "1.1" causes big problems, but I wouldn't recommend it anyway, because if you happen to call an object "1.0" it is an integer and will refer to the first object rather than to the object named "1.0".
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
ok mark.
i have changed text tables to oneone and onetwo.
i have changed bridlenumber to bridlename
and have changed the script to suit.
on menuPick thepick
if thepick = "oneone" then
put joinTable(fld "bridlename",fld "horsesname",fld "ridersname") into field "oneone" of card 3 of stack "Compleat Show Entries"
end if
end menuPick
function joinTable
put the paramCount into myNrOfColumns
put 0 until myNrOfLines
repeat with x = 1 to myNrOfColumns
if number of lines of param(x) > myNrOfLines then
put number of lines of param(x) into myNrOfLines
end if
end repeat
put empty into myData
repeat with x = 1 to myNrOfLines
repeat with y = 1 to myNrOfColumns
put line x of param(y) & tab after myData
end repeat
delete last char of myData
put cr after myData
end repeat
delete last char of myData
end joinTable
now i am not getting any warning signs of anything being wrong, but nothing is happening.
so i enter the names into the fields, and click the option, then i go check to text table and nothing is there???
so what am i doing wrong?? besides breathing at this point LOL
cheers
i have changed text tables to oneone and onetwo.
i have changed bridlenumber to bridlename
and have changed the script to suit.
on menuPick thepick
if thepick = "oneone" then
put joinTable(fld "bridlename",fld "horsesname",fld "ridersname") into field "oneone" of card 3 of stack "Compleat Show Entries"
end if
end menuPick
function joinTable
put the paramCount into myNrOfColumns
put 0 until myNrOfLines
repeat with x = 1 to myNrOfColumns
if number of lines of param(x) > myNrOfLines then
put number of lines of param(x) into myNrOfLines
end if
end repeat
put empty into myData
repeat with x = 1 to myNrOfLines
repeat with y = 1 to myNrOfColumns
put line x of param(y) & tab after myData
end repeat
delete last char of myData
put cr after myData
end repeat
delete last char of myData
end joinTable
now i am not getting any warning signs of anything being wrong, but nothing is happening.
so i enter the names into the fields, and click the option, then i go check to text table and nothing is there???
so what am i doing wrong?? besides breathing at this point LOL
cheers
Tanya,
*slap* ;-)
It is all a bit difficult, because I can't see what you're doing. So, I won't really slap you, don't worry.
Do you have a combobox with "oneone", "onetwo", etc. now, or is that still "1.1" and "1.2"? If it is "1.1" etc. the line
if thepick = "oneone" then
should read
if thepick = "1.1" then
but the names of the fields should not be numbers. Note that text in a combobox really is nothing but text and it is only used by the menuPick script. The text in the combobox normally doesn't need to correspond with field names. You can use numbers wherever you like, except for object names.
I hope you're getting close, but somehow I expect you to report another execution error ;-)
Best,
Mark
*slap* ;-)
It is all a bit difficult, because I can't see what you're doing. So, I won't really slap you, don't worry.
Do you have a combobox with "oneone", "onetwo", etc. now, or is that still "1.1" and "1.2"? If it is "1.1" etc. the line
if thepick = "oneone" then
should read
if thepick = "1.1" then
but the names of the fields should not be numbers. Note that text in a combobox really is nothing but text and it is only used by the menuPick script. The text in the combobox normally doesn't need to correspond with field names. You can use numbers wherever you like, except for object names.
I hope you're getting close, but somehow I expect you to report another execution error ;-)
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Hi Tanya,
It appears that I forgot a line at the end of the function. The function should be:
Does this help?
Best,
Mark
It appears that I forgot a line at the end of the function. The function should be:
Code: Select all
function joinTable
put the paramCount into myNrOfColumns
put 0 until myNrOfLines
repeat with x = 1 to myNrOfColumns
if number of lines of param(x) > myNrOfLines then
put number of lines of param(x) into myNrOfLines
end if
end repeat
put empty into myData
repeat with x = 1 to myNrOfLines
repeat with y = 1 to myNrOfColumns
put line x of param(y) & tab after myData
end repeat
delete last char of myData
put cr after myData
end repeat
delete last char of myData
return myData
end joinTable
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
ok mark,
i copied and pasted that into the script (like a good girl)
and i am getting no error messages, but
the text is still not going anywhere.
on the card 3 which is called Compleat Show Entries (3)
i have a test box that i turned into a table with 3 columns.
this box is called oneone
does this help at all ?
cheers
i copied and pasted that into the script (like a good girl)
and i am getting no error messages, but
the text is still not going anywhere.
on the card 3 which is called Compleat Show Entries (3)
i have a test box that i turned into a table with 3 columns.
this box is called oneone
does this help at all ?
cheers