Learn it with livecode (calculator tutorial problem)
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 8
- Joined: Sat Mar 28, 2015 7:16 pm
Learn it with livecode (calculator tutorial problem)
Hi there ...
I'm new to livecode and an indy subscriber ....
In the lesson of day 2 regarding groups in the calculator lesson , i am getting a problem .... When i group together the number keys and put the code in them .... no number is displayed on the label field on the top named "display". although no error is shown in the errors section in code.
on deep investigation of what the problem is , i found out that the numbers i am pressing indeed appear in the contents section of the label in the inspector of the label but isn't shown on the front as is shown in the video to the tutorial ...
pretty confused as to how its possible ...
hope anyone of you can help as to what i am doing wrong here..
Regards:
Shahzad
I'm new to livecode and an indy subscriber ....
In the lesson of day 2 regarding groups in the calculator lesson , i am getting a problem .... When i group together the number keys and put the code in them .... no number is displayed on the label field on the top named "display". although no error is shown in the errors section in code.
on deep investigation of what the problem is , i found out that the numbers i am pressing indeed appear in the contents section of the label in the inspector of the label but isn't shown on the front as is shown in the video to the tutorial ...
pretty confused as to how its possible ...
hope anyone of you can help as to what i am doing wrong here..
Regards:
Shahzad
Re: Learn it with livecode (calculator tutorial problem)
Hi Shahzad,
1. welcome to the forum!
2. I don't know what exactly "Learn it with LC" is, so I need to guess a bit
a. the text has the same color as its background, so it appears invisible.
b. There is an object right in front of that field so you cannot see its content.
c. that text field is just too small for its text size, so it appears clipped or not at all.
Please make sure this is not the case!
Best
Klaus
1. welcome to the forum!

2. I don't know what exactly "Learn it with LC" is, so I need to guess a bit
That can have a couple of causes:on deep investigation of what the problem is , i found out that the numbers i am pressing
indeed appear in the contents section of the label in the inspector of the label but isn't shown on
the front as is shown in the video to the tutorial ...
pretty confused as to how its possible ...
a. the text has the same color as its background, so it appears invisible.
b. There is an object right in front of that field so you cannot see its content.
c. that text field is just too small for its text size, so it appears clipped or not at all.
Please make sure this is not the case!
Best
Klaus
-
- Posts: 8
- Joined: Sat Mar 28, 2015 7:16 pm
Re: Learn it with livecode (calculator tutorial problem)
First case in my opinion isn't applicable
-
- Posts: 8
- Joined: Sat Mar 28, 2015 7:16 pm
Re: Learn it with livecode (calculator tutorial problem)
The second case is as the instructor has done himself ... the numbers come after 0 in sequence on every key pressed
-
- Posts: 8
- Joined: Sat Mar 28, 2015 7:16 pm
Re: Learn it with livecode (calculator tutorial problem)
in third case scenario , text field isn't small , nor the numbers are truncated
see i've pressed the keys but they do not appear in the label field where as they do appear in the contents field of the label as soon as i press them under 0 .... don't know why ... should i post my livecode file for your review ?
see i've pressed the keys but they do not appear in the label field where as they do appear in the contents field of the label as soon as i press them under 0 .... don't know why ... should i post my livecode file for your review ?
Re: Learn it with livecode (calculator tutorial problem)
Hi omekkainteractive,
Looks like there is a CR (carriage return = new line) right after the 0!
That will of course make all text/number that you "put after fld "display" appear
in the SECOND line but only the FIRST line is visible of that field!
Know what I mean?
Best
Klaus
OK, that image does indeed shed some light on this misteryomekkainteractive wrote:in third case scenario , text field isn't small , nor the numbers are truncated
see i've pressed the keys but they do not appear in the label field where as they do appear in the contents field of the label as soon as i press them under 0 .... don't know why ... should i post my livecode file for your review ?

Looks like there is a CR (carriage return = new line) right after the 0!
That will of course make all text/number that you "put after fld "display" appear
in the SECOND line but only the FIRST line is visible of that field!
Know what I mean?
Best
Klaus
-
- Posts: 8
- Joined: Sat Mar 28, 2015 7:16 pm
Re: Learn it with livecode (calculator tutorial problem)
Alright now ...
i've gone through the problem one more time and found what the problem was ... though its a bit strange ...
When i place my cursor at the start of 0 that I've put in the contents of label field it gives the results as indicated in the tutorial....
and when i press return while inputting the 0 (at the end of 0) the numbers come down in the field .... which refers to your point of numbers getting truncated cause the field isn't wide enough ...
Regards:
Shahzad
(and thank you very very much) obliged and happy ....
i've gone through the problem one more time and found what the problem was ... though its a bit strange ...
When i place my cursor at the start of 0 that I've put in the contents of label field it gives the results as indicated in the tutorial....
and when i press return while inputting the 0 (at the end of 0) the numbers come down in the field .... which refers to your point of numbers getting truncated cause the field isn't wide enough ...
Regards:
Shahzad
(and thank you very very much) obliged and happy ....

Re: Learn it with livecode (calculator tutorial problem)
Hi Shahzad,
Okie Dokie, glad I could help!
Best
Klaus
Okie Dokie, glad I could help!

Best
Klaus
-
- Posts: 8
- Joined: Sat Mar 28, 2015 7:16 pm
Re: Learn it with livecode (calculator tutorial problem)
Hi Klaus ...
Can you please help me out with one little thing here as well...
I,ve completed the AC button tutorial but when it is pressed the resulting label doesn't turn to 0, whereas again i don't have the errors ...
Can you please guide in it as well , that is if you've got time ....
Regards:
Shahzad
Can you please help me out with one little thing here as well...
I,ve completed the AC button tutorial but when it is pressed the resulting label doesn't turn to 0, whereas again i don't have the errors ...
Can you please guide in it as well , that is if you've got time ....
Regards:
Shahzad
Re: Learn it with livecode (calculator tutorial problem)
Hi Shahzad,
you are not putting 0 into fld "display" at any time!?
Add this line BEFORE the ELSE line in the "on clearpressed" handler:
Best
Klaus
you are not putting 0 into fld "display" at any time!?
Add this line BEFORE the ELSE line in the "on clearpressed" handler:
Code: Select all
on clearpressed
...
put empty into lCurrentoperator
put 0 into fld "display"
ELSE
...
## END IF needs to be in a separate line here!
END IF
end clearpressed
Klaus
-
- Posts: 8
- Joined: Sat Mar 28, 2015 7:16 pm
Re: Learn it with livecode (calculator tutorial problem)
Thanks again but here i would like to mention that the tutorials have quite a lot of differences between the pdf or ppt provided and the videos ... When you're a complete beginner and you're told to just copy and paste and the result comes out right in the video whereas it doesn't in live expermentation, its quite frustrating ...
I know its my fault as well to check the logic first (which i will do the next time round) , still guidance should in itself be complete rather then taking you by hand and removing that hand in the middle ...
Attached is the screenshot of the pdf provided from which the instructor supposedly and in video have copy and pasted code and it worked pretty well (for him)
Thanks yet again ....
I know its my fault as well to check the logic first (which i will do the next time round) , still guidance should in itself be complete rather then taking you by hand and removing that hand in the middle ...
Attached is the screenshot of the pdf provided from which the instructor supposedly and in video have copy and pasted code and it worked pretty well (for him)
Thanks yet again ....
Re: Learn it with livecode (calculator tutorial problem)
The screenshot shows the missing line
...
put 0 into fld "display"
...
And yes, I heard that the tutorials are sometimes a bit "quick and dirty", which is no excuse of course!
Anyway, that's why we have this great forum
Best
Klaus
...
put 0 into fld "display"
...
And yes, I heard that the tutorials are sometimes a bit "quick and dirty", which is no excuse of course!
Anyway, that's why we have this great forum

Best
Klaus
-
- Posts: 8
- Joined: Sat Mar 28, 2015 7:16 pm
Re: Learn it with livecode (calculator tutorial problem)
and its already in the code that i sent you in the screenshot but when i entered your line of code exactly where you told me to , it started working ....
Best
Shahzad
Best
Shahzad