Skip to first unread message
Assigned to aget...@gmail.com by taifu...@gmail.com

Dea Avega Editya

unread,
Jan 11, 2016, 8:31:54 PM1/11/16
to MIT App Inventor Forum

Hi everyone, i am working on my own app and in the middle of designing the main menu of the app. 
I want to add marquee text on the main menu, i use the simplest path shown in the forum (https://groups.google.com/forum/m/#!topic/app-inventor-instructors/wx_iGTH3m0E) using label as output for marquee text (by abraham getzler), but unfortunately i got this error message just like shown on this picture.

 


















I use this blocks above, exatcly the same as the guidance. The components i used are label and clock.

Could you tell me guys what's the problem?

Scott Ferguson

unread,
Jan 12, 2016, 12:47:26 AM1/12/16
to MIT App Inventor Forum
In your last block you probably should be using the Source length (95) not the Maximum_length which is why you are getting the error.
Your text is not that long so the segment block fails.
---
sf

Dea Avega Editya

unread,
Jan 12, 2016, 1:58:35 AM1/12/16
to MIT App Inventor Forum
Hi Scott, thanks for your reply. I followed your suggestion but i got new error message said: Bad Arguments to segment/ The operation segment cant accept the arguments

I used these blocks below:


Abraham Getzler

unread,
Jan 12, 2016, 12:52:59 PM1/12/16
to MIT App Inventor Forum
My marquee example was insufficiently bulletproof.
To correct it, use min(length(Feed),maximum_length) as the 
segment length in the assignment to the output label.

Without the min(), the segment() call can be abused with out-of-bounds parameters.

See attached for amended blocks.

Thanks to all who pointed this out.

ABG
blocks_bulletproofed.png

Dea Avega Editya

unread,
Jan 12, 2016, 10:32:53 PM1/12/16
to MIT App Inventor Forum
Alhamdulillah praise to God! my marquee text works perfectly now. 
Thanks for your clear suggestion Abraham. It's really nice to have you guys here.

Regards from Indonesia
Reply all
Reply to author
Forward
0 new messages