LiveCode tutorial text chunk

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

wanglucas
Posts: 27
Joined: Thu Mar 19, 2020 2:25 am

LiveCode tutorial text chunk

Post by wanglucas » Wed Mar 25, 2020 9:42 pm

Hello All im following along in the tutorial section for the text chunk section(video 1 23:25)

and I keep getting a cant find card error on the (below) section
set the text of field “NoteText” of card “cardNoteEdit” to tNote


when i get rid of the code
"set the text of field 'NoteText' of card 'cardNoteEdit"

https://imgur.com/DT7SXC

and just have the code

go to card “cardNoteEdit”

https://imgur.com/9FxClw1

i dont get any errors so i know it has to be something wrong with my fields but im not sure what

ive already doubled checked and all my field names match up with whats in the script
i would add a picture of all this here but the board wont let me...

PS also does anyone know how to post images on this forum
Last edited by wanglucas on Thu Mar 26, 2020 3:20 am, edited 3 times in total.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7653
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: LiveCode tutorial text chunk

Post by FourthWorld » Wed Mar 25, 2020 9:49 pm

Without a URL to the tutorial in question I can only guess about what's wrong, but given the odd naming style in the example code I'm wondering if:

Code: Select all

 go to card “cardNoteEdit” 
...maybe should be:

Code: Select all

 go to card “NoteEdit”
Did you name the card? Is the name "cardNoteEdit", or "NoteEdit", or something else?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

bogs
Posts: 4620
Joined: Sat Feb 25, 2017 10:45 pm

Re: LiveCode tutorial text chunk

Post by bogs » Wed Mar 25, 2020 9:59 pm

wanglucas wrote:
Wed Mar 25, 2020 9:42 pm
PS also does anyone know how to post images on this forum
Yes, when you hit the magic number of {10} posts, you will be able to attach stuff and post links and like that. On the bright side, your almost half way there !
Image

wanglucas
Posts: 27
Joined: Thu Mar 19, 2020 2:25 am

Re: LiveCode tutorial text chunk

Post by wanglucas » Wed Mar 25, 2020 10:04 pm

the forum wont let me post the link unfortunately ((video 1 23:25)



and yes the card name is correct

if i just have

go to card “cardNoteEdit”

the code works fine

bogs
Posts: 4620
Joined: Sat Feb 25, 2017 10:45 pm

Re: LiveCode tutorial text chunk

Post by bogs » Wed Mar 25, 2020 10:41 pm

Wanglucas,

We won't, as fourthworld said, know which video your talking about without a link. Even though you can't post a link such as
http://lessons.livecode.com/m/2592/l/12 ... omatically

You might be able to copy the link, paste it, and then make it less 'link like' by changing parts of it, like this -
[http:]lessons_livecode_com/m/2592/l/124649-show-or-hide-a-scrollbar-automatically

until the forum lets you post it.

As for your card names, try this.
open the message box
move your mouse cursor over the stack you are working with, but don't click, make sure the message box keeps the focus
type

Code: Select all

put the cardNames of the mouseStack
hit ctrl + enter or the return key
paste the list that shows up in your next post.
apic_cardNames.png
I'll deal...
Image

wanglucas
Posts: 27
Joined: Thu Mar 19, 2020 2:25 am

Re: LiveCode tutorial text chunk

Post by wanglucas » Thu Mar 26, 2020 12:22 am

thats not the same lesson im currently on


i updated my original post with imgur "links" to hopefully make my question more clear

bogs
Posts: 4620
Joined: Sat Feb 25, 2017 10:45 pm

Re: LiveCode tutorial text chunk

Post by bogs » Thu Mar 26, 2020 12:43 am

Um, what I asked you to do is *not* part of a lesson, it is a way to have LiveCode itself tell us what is in your stack, in a manner you can copy and paste right here.

Until you have 10 posts, you will not be able to attach or post a link, not even to images on imgur.
Image

wanglucas
Posts: 27
Joined: Thu Mar 19, 2020 2:25 am

Re: LiveCode tutorial text chunk

Post by wanglucas » Thu Mar 26, 2020 2:42 am

i understand now

i tried the select all command in my message box and got this error

Message execution error:
Error description: Chunk: error in object expression
Hint:

wanglucas
Posts: 27
Joined: Thu Mar 19, 2020 2:25 am

Re: LiveCode tutorial text chunk

Post by wanglucas » Thu Mar 26, 2020 3:20 am

also i reached 10 post and i have updated the first post with links to the screenshots so hopefully that makes it easier

bogs
Posts: 4620
Joined: Sat Feb 25, 2017 10:45 pm

Re: LiveCode tutorial text chunk

Post by bogs » Thu Mar 26, 2020 9:43 am

Well it should make it easier, but the only one that came up was the second one heh. From that one, I can see the card your trying to reach exists, at least.

In your next post, click the 'Attachments' tab below the edit box
aPic_Attachments.png
So attached...
aPic_Attachments.png (20.08 KiB) Viewed 634 times
or just drag your picture into the box your typing in, and attach it to the post so we can be sure to see it.

Not sure I understand where the 'select all' thing came from, or what you were trying to do there. If your talking about how to copy the text out of the message box, you just highlight it with your mouse and copy it, either with the Os keyboard shortcut for copy, or by going to the Lc menu -> edit -> copy.

Then you paste it here. If you don't understand what I mean, let me know and I will make a video demo for you, it is a very handy way to do things, better than a screen shot sometimes.
Image

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 745
Joined: Wed Nov 22, 2006 3:42 pm
Location: France
Contact:

Re: LiveCode tutorial text chunk

Post by Thierry » Thu Mar 26, 2020 9:55 am

wanglucas wrote: when i get rid of the code
set the text of field 'NoteText' of card 'cardNoteEdit'
and just have the code
go to card “cardNoteEdit”
i dont get any errors so i know it has to be something wrong with my fields....
Hi wanglucas,

shooting a bit on the dark and considering your namings are fine;
could you try to modify your *culprit* line of code:

Code: Select all

 set the text of field 'NoteText' of card 'cardNoteEdit of stack 'YourStackName'
and see what's happening then...


Take care,

Thierry
Regex LiveCode sunnYrex
https://sunny-tdz.com

wanglucas
Posts: 27
Joined: Thu Mar 19, 2020 2:25 am

Re: LiveCode tutorial text chunk

Post by wanglucas » Thu Mar 26, 2020 3:52 pm

Hello All im following along in the tutorial section for the text chunk section(video 1 23:25)

and I keep getting a cant find card error on the (below) section
set the text of field “NoteText” of card “cardNoteEdit” to tNote
errorfield.png

when i get rid of the code
"set the text of field 'NoteText' of card 'cardNoteEdit"


and just have the code

go to card “cardNoteEdit”

errorfield1.png
i dont get any errors so through process of elimination i know that means the card itself is fine but something is wrong with the fields

ive already doubled checked and all my field names match up with whats in the script
i would add a picture of all this here but the board wont let me...

wanglucas
Posts: 27
Joined: Thu Mar 19, 2020 2:25 am

Re: LiveCode tutorial text chunk

Post by wanglucas » Thu Mar 26, 2020 4:09 pm

so i changed two things

i specified which stack the card belongs to

and i changed the card name and field name

still got an error..

errorfield2.png

wanglucas
Posts: 27
Joined: Thu Mar 19, 2020 2:25 am

Re: LiveCode tutorial text chunk

Post by wanglucas » Thu Mar 26, 2020 4:14 pm

also if you notice in the above picture the field and card parameters that are in quotes are still in neutral black color


but in the video im following along with, his parameters are blue

could this be related to the error im getting

the video in question
noerror.jpg

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 745
Joined: Wed Nov 22, 2006 3:42 pm
Location: France
Contact:

Re: LiveCode tutorial text chunk

Post by Thierry » Thu Mar 26, 2020 4:37 pm

Ok, you can drop: of stack ...
Not mandatory in your case.

However, the quotes in your lines are wrong !
Check carefully the quoting for your field and card name
and the one for your stack name; not the same.
sunnYscrrenshot 2020-03-26 à 16.34.37.png
Guess, re-editing these 2 lines would make a difference; at least hope so.

Regards,

Thierry
Regex LiveCode sunnYrex
https://sunny-tdz.com

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”