niteshmourya / app-inventor-for-android

Automatically exported from code.google.com/p/app-inventor-for-android
Apache License 2.0
1 stars 0 forks source link

Public Code Snippets #482

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Wouldn't it be nice to have a feature in the Blocks Editor where you could 
highlight a block and submit it as a Public Code Snippet? A description box 
could pop up with standard comments required for submission (who, what etc.).

Since we're programming online anyway, it would be convenient to search through 
submitted snippets for, say, a "ClearList" procedure that has already been 
written (yes, the Clear method does not exist in lists--you have to iterate 
through and remove items until empty). The star system in place right now would 
tell people how reliable the snippet is--to a degree. Maybe another system is 
better.

I'm just wondering how many people have written the same code blocks I have to 
clear a PickList and what kind of time would have been saved.

My 2 cents...

For those interested, attached is my ClearList function.

-=WordTickler=-

Original issue reported on code.google.com by wordtickler on 18 Oct 2010 at 4:08

Attachments:

GoogleCodeExporter commented 9 years ago
To all the people who follow this issue
It can be done by setting it to an empty list
See this forum post for info:
https://groups.google.com/group/appinventor/browse_thread/thread/e93354000da1602
e#

Original comment by shivalw...@gmail.com on 19 Oct 2010 at 3:50

GoogleCodeExporter commented 9 years ago
Releasing proven code so others can use it, or even post improvements is a 
great idea.

Original comment by robert.s...@gmail.com on 19 Oct 2010 at 1:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
...and looking at submitted snippets would have shown me that there is an 
easier way to clear the ListPicker :)

-WordTickler=-

Original comment by wordtickler on 20 Oct 2010 at 4:41

GoogleCodeExporter commented 9 years ago

Original comment by ma...@google.com on 28 Oct 2010 at 8:17

GoogleCodeExporter commented 9 years ago
WordTickler, I have started a site for that. if you get a chance, check it out. 
http://www.TheAIRepository.info I am also looking for contributors to post 
sample blocks and code and help make this a goto community driven site for AI 
development.

Original comment by barnes.t...@gmail.com on 23 Nov 2010 at 1:24

GoogleCodeExporter commented 9 years ago
The ability to copy a chunk of code from one users (or your own) app and use it 
on another app own would certainly speed development.

Original comment by knmb...@gmail.com on 30 Dec 2010 at 3:56

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I agree!  Some way to export, import, reference and share code blocks 
seemlessly is a must have.

Original comment by cyberp...@gmail.com on 27 Jan 2011 at 11:52

GoogleCodeExporter commented 9 years ago
Check out the making templates tutorial on tAIR.info.
Make the routine you want to share into a template then you can reuse it or 
send it to other folks by sending the source.

tair.info/faq/how-to-s/templates

Original comment by barnes.t...@gmail.com on 27 Jan 2011 at 12:04

GoogleCodeExporter commented 9 years ago
The template pattern is suitable for top-down implementation.  However, it 
doesn't help when you want to integrate a few low level components into your 
project after you've started coding and design.  For example, I would like to 
use the detailed coded sample  numbersOnCanvas.zip within my project, but I 
would have to re-type it (figuratively) entirely.

Original comment by agetz...@gmail.com on 24 May 2011 at 6:27