Your First Block

Modified: 2008/02/07 17:21 by Suzanne - Categorized as: How To Guides
Edit

Blocks

You can now upload blocks that you have created, and share these blocks with other Popfly members.

To help you get started with block creation, we have created a block building guide that includes example code and a test harness. Since Popfly's JavaScript editor does not yet include syntax highlighting or debugging tools, we recommend that you use Microsoft Visual Web Developer 2008 Express for creating blocks. (It's a free download.) Consider the Popfly web editor area to be a "block uploader."

To upload a block, click on the "Create Stuff" menu in Popfly and select the "Block" link. Copy your block code and paste it into the appropriate "Block Code" or "Block Description" areas. Save your block with a meaningful name. This is very important if you want others to use the block that you created.

A great way to get started with building blocks is to learn from existing blocks. To see the code behind a block, first make sure you are in the block editor (click on the "Create Stuff" menu in Popfly and select the "Block" link). Click on a block in the blocks list. You will see two parts for every block: the "Block Description", which describes the block using XML, and the Block Code which is written in JavaScript, and contains the logic for the block.

Privacy. Terms of Use. Trademarks.
ScrewTurn Wiki version 2.0.22. Some of the icons created by FamFamFam.