Strange behaviors in updating labels

17 views
Skip to first unread message

Charles Lotz

unread,
Dec 2, 2015, 5:53:09 PM12/2/15
to mitappinv...@googlegroups.com
Couldn't find this in a quick search- my apologies if it is a duplicate. Three related (apparently erroneous) behaviors noted, in steps D, J, and K.

Using 2.35 companion with December 1, 2015 version nb146i.

Steps to reproduce;

A- Create a new project and connect the companion.

B- Create multiple labels, and a clock


C- In the Blocks editor, set up a when Clock.timer to set all the labels' text, but with no arguments. Note the error.

D- Then add a call to update the first label with the current date / time. Note that there is no longer any error displayed, but in the Companion, there is no updating of Label1. 

Behavior 1- 
>> Expected result- either the error should remain, or in the connected Companion, Label1 should be updating.
>> Actual result- No error, and Label1 does not update in Companion.

E- Now remove the set label.text blocks that do not have a parameter. Still no error, but Label1 now begins updating in the Companion.


F- Drag the set label.text blocks back - still no error, and Label1 continues to update.
G- Now duplicate the date/time blocks and attach them to Label2. Still no error, Label1 continues to update, but Label2 does not. This appears to be an extension of behavior 1.

H- Again remove the set label.text blocks that still do not have a parameter. Still no error, and both Label1 and Label2 are now updating,


I- Now drag the set label.text blocks back - still no error, and both Label1 and Label2 continue to update.

(Screen same as step G.)

J - Remove the time / date blocks from Label2. An error will now be shown, essentially the same as in step C. However, in the Companion, both Label1 and Label2 will continue to update.

Behavior 2- 
>> Expected  result- Either there should be an error, or only the label to which the time / date blocks are attached should be updating..
>> Actual result- The labels that are updating via behavior 1 continue to update, regardless of whether it has the attached time / date blocks, with no error.

K- Drag the disconnected  time / date blocks onto one of the labels below. The error will be cleared. Label1 and Label2 will continue to update, and the label to which the time / date blocks are now attached will not.

Behavior 3- 
>> Expected  result- Either there should be an error, or the labels to which the time / date blocks are attached should be the ones updating..
>> Actual result- The labels that are updating via behavior 1 continue to update, while the label that now has the attached time / date blocks does not, with no error.



SteveJG

unread,
Dec 2, 2015, 6:01:53 PM12/2/15
to MIT App Inventor Forum
Did you notice, you have multiple empty puzzle pieces.   Perhaps fill them, even with an empty Text block and you might get a different result?

Charles Lotz

unread,
Dec 2, 2015, 6:07:20 PM12/2/15
to MIT App Inventor Forum
Yes, the missing parameters appear to be the root of the problem and the problem does not appear if all of the blocks have all of their parameters. The issue is twofold- one, the error is cleared in cases where it should not, and two, under these conditions the updating of the labels becomes disconnected from the parameters.
Reply all
Reply to author
Forward
0 new messages