2016년 12월 25일 일요일

Getting .Text Property Information With For Loops


I am trying to make an app that is effectively tracking inventory movement.  I have a series of customizable fields that can be set to the item, how many items go out (count), and how many come back in (wcount).

I figured I'd be able to simplify the block process by turning each category (A-J) of items into their own For loop (A0-A9, B0-B9...J0-J9), but I can't figure out how to make App Inventor recognize the terms as the actual button and textbox ".Text" properties, and not just text strings.


dropPackageblocks.jpg 표시 중

--
Now that I'm looking at my post after a night of sleep, I figured that it might be a little confusing.

Is there a way to convert a text block (join "button1" ".Text") and have it be recognized as the property button1.Text?

-- 
I suggest checking out Fusion Tables for your inventory app.
It supports tables natively.
Start with the Pizza Party tutorial,
And check out the FAQ if you get problems ...

-- 
It's less a question of how to post the stuff to a data base, and more a question of "do I need to deal with these 300 bits of information as individual series of blocks every time I interact with them, or can I simplify it to a simple FOR loop every time?"

-- 
If you are keeping your data as lists, you can hide your loops in procedures.

See this doc for an example ...


For more examples, see the Lists section of this FAQ ...

-- 
That's what I was afraid of.  :)

-- 
For future reference, and for anyone else wrestling with this problem, I just stumbled onto:
Apparently you can only get to the block by directly typing it in, not through any of the menus.

-- 
FYI,  A separate Any seciton appears in the Blocks Editor components pane after you have created at least one such component.

-- 

댓글 없음:

댓글 쓰기