Code snippets & grid

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
Chris_Wood
Posts: 11
Joined: Sun Jan 06, 2008 1:22 am

Code snippets & grid

Post by Chris_Wood » Sat Aug 23, 2008 7:31 am

1) A code snippet library, similar to the object library but just for text
2) Grid with column & row headers

Having played with trial versions for a number of months I've only just purchased RR having taken advantage of the cheap Enterprise deal. Having now tried out v3 beta I have to say the new debugger & documentation make it feel - for a beginner at least - like a totally different animal. It is just fabulous.

Best Regards

Chris

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sat Aug 23, 2008 9:16 am

Hi Chris,

You'll find 300+ code snippets at http://runrev.info .

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Chris_Wood
Posts: 11
Joined: Sun Jan 06, 2008 1:22 am

Code snippets & grid

Post by Chris_Wood » Tue Aug 26, 2008 1:08 am

Hi Mark,

Thanks for that I wasn't aware of your website.

Best Regards

Chris

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Tue Aug 26, 2008 2:09 am

I feel ya on the code snippet library. In fact I was going to attempt to make one, but alas, the A.D.D. kicked in and I never got to it.

As for the Grid Element/Object, you can make one yourself using the table element/object in Rev. And I believe there's a few examples around the Rev community. Check the Rev Online thing in the users section.

Obleo
Posts: 174
Joined: Mon Apr 10, 2006 10:35 pm
Contact:

Post by Obleo » Tue Aug 26, 2008 3:32 pm

actually when I first starting to us revolution I found there was many rev users willing to have code snippets and open stack examples to learn on there own web sites.

google found many of them. many of nice hidden ones that are not link to on the usually crowd sites. many link to web rings also.

The built in Revolution Search engine under the menu-bar in revolution it self works great for searching most things revolution. including searching mail list achieves. (which is great for me since I could never get a subscription to the list.)

Also found most of the web links of people on this forum had examples that where not listed in the built in Revolution Search engine.

The on-line scripting conference stacks where also a great help when moving over to the transcript language. There no longer linked from the main rev site it seems, but still online here.

http://support.runrev.com/scriptingconferences/

anything I found helpful I keep a snippet floating around on a simple home brew plug in stack. and used a simple copy and paste command to add it to a current stack. (like how the examples in rev documentation stack thing works) then Stored most of the scripts just using custom props.

There was also a 3rd party product floating around a few years back called the scripter's scrapbook for code snippets also. that used an online database.
there was few entries for revolution's / metacard Transcript on it. here found there site;

http://www.flexiblelearning.com/ssbk.htm

hope this help for now.

Obleo
Posts: 174
Joined: Mon Apr 10, 2006 10:35 pm
Contact:

Post by Obleo » Tue Sep 09, 2008 4:58 am

It took a little while digging thought my old mac to find this stack. But this was my first home-brew code snippet lib plug-in I built for revolution.

Image

It uses 4 basic scripts.

all the code snippets are store as custom properties within a card.


The refresh button is where I put the script to get the customkeys to fill the list field. ( the data names of the snippets) I stored the custom props on another empty-card named rpSnipStore the list field was named rpShowSnips

Code: Select all

--Put a list of snippets into field to nav list
on mouseUp
   put the customKeys of cd "rpSnipStore"  into field "rpShowSnips"
 end mouseUp
This was the list field script to display the contents of the custom prop names into the second field I named that field rpShowScrip (very simple)

Code: Select all

--put the hilited line stored contents into field to display it's contents
on mouseDown
   put the selectedText of me into mySelection
   put the mySelection of cd "rpSnipStore" into field "rpShowScript"
end mouseDown
and last the copy field contents to clipboard script again very simple.

Code: Select all

--copy the snippet to clipboard of field
on mouseUp
   set the clipboardData["text"] to the text of fld "rpShowScript"
end mouseUp
The plus button added opened an edtior to add more scripts, that code is not working correctly in version 3.0 and because I am lazy to debug that now. You can figure that out on your own since I got you started. or just use the property editor built in revolution and add them into though custom props.

When I fix the plus button editor code or basicly figure out why it is no longer working. I may just add this to rev online as another little tool. It not stylish but gets the job done.

Remeber you have the tools to build every little plug in to help your development along way with the revolution. Simply start off simple. you can make it more complex along the way.

hope this helps.

If you like the stack, site mail me. I not interested in adding this to my web site.

Obleo
Posts: 174
Joined: Mon Apr 10, 2006 10:35 pm
Contact:

Post by Obleo » Thu Oct 09, 2008 8:14 am

I had way to many site mail requests to download my version over building it from my examples posted above. I just added this stack to rev Online my user space. It is really nothing different than what I posted above. Besides fixing the add snippet script to work with rev 3.0

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Thu Oct 09, 2008 8:02 pm

thanks :-)

Obleo
Posts: 174
Joined: Mon Apr 10, 2006 10:35 pm
Contact:

Post by Obleo » Thu Oct 09, 2008 8:18 pm

no problem, of coarse I did end up breaking down and posted a much better version of it. my shrinkie dinkie script still needs work. But I am to busy working on paying projects to spend time working on a down and dirty plug in. (you could edit it your self.)

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Fri Oct 10, 2008 7:15 am

Any contribution, half completed or fully completed is better than no contribution at all :-)

Obleo
Posts: 174
Joined: Mon Apr 10, 2006 10:35 pm
Contact:

Post by Obleo » Fri Oct 10, 2008 8:00 pm

I update my persoanal used plug-ins often. So I try to update the stack at the revonline as I update to my needs. Since I already tagged this as a shared stack it sems reasonable. I think it all ready been updated twice since I 1st started sharing it at revonline.

Post Reply