官术网_书友最值得收藏!

Making a simple calculator application

With even a basic familiarity with LiveCode, you can start to make something of use. Here we will make a very simple calculator stack.

Inspector clues, oh…

You will find yourself using the Inspector palette a lot, so take a moment to study how it behaves. When you select an object on the card you will see that the Inspector palette changes its appearance, sometimes even its height, to show the options for the item you have selected. It is smart enough to notice when you have selected multiple items, and will then show the align tools.

Sometimes you will want to keep an Inspector palette set to view the options of a particular object on the card, and to not switch to show a different object as you make other selections. In the upper right-hand side corner of the Inspector palette is a padlock icon, which will let you lock the inspector to the current object.

So far, most of the Inspector palette options haven't affected us, but one that is about to be relevant is the fact that you can set a name for an item that is different to its label. You may know from other programming languages, and this also applies to LiveCode, that some names are less legal than others. Perhaps you can't have spaces in the name, or use a colon, or backslash. If you name a button with a number, Button "1" may not be Button 1, and that could lead to confusion.

For the calculator keys we will set a label to make it look correct, and a name that doesn't lead to confusion. Speaking of those calculator keys…

主站蜘蛛池模板: 当阳市| 洛阳市| 巧家县| 芜湖市| 南溪县| 高要市| 荔波县| 台江县| 墨竹工卡县| 淮北市| 恩施市| 凉城县| 河间市| 邓州市| 东乡族自治县| 卓尼县| 新蔡县| 淮滨县| 特克斯县| 三亚市| 循化| 广东省| 曲沃县| 铜鼓县| 华池县| 彭泽县| 池州市| 怀宁县| 朔州市| 峨边| 塔城市| 科技| 永嘉县| 新干县| 安阳县| 丹东市| 营山县| 和顺县| 商丘市| 安仁县| 乌什县|