Children's Education App for Measuring with a Ruler

Share tips, tools, and other resources for helping educators bring LiveCode into the classroom

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

bogs
Posts: 2208
Joined: Sat Feb 25, 2017 10:45 pm

Re: Children's Education App for Measuring with a Ruler

Post by bogs » Wed Mar 14, 2018 3:01 pm

Sorry Greg, widgets are far FAR outside of my experience. I believe -hh has the most of them around, though, maybe he'll chime in and be able to help, if he has't already made something close to what your looking for. That guy is incredibly prolific.
Image

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1765
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Children's Education App for Measuring with a Ruler

Post by [-hh] » Wed Mar 14, 2018 3:06 pm

Drag (using LC 8/9) an SVG-icon-widget to your stack. Open the property inspector and paste the following into the iconPath field.

Code: Select all

M 58.726562 69.275391 L 58.726562 175.76562 L 71.816406 175.76562 L 71.816406 69.275391 L 58.726562 69.275391 z M 83.845703 69.275391 L 83.845703 175.76562 L 729.8457 175.76562 L 729.8457 69.275391 L 458.8457 69.275391 L 458.8457 111.07422 L 329.71484 111.07422 L 329.71484 69.275391 L 83.845703 69.275391 z M 341.71484 69.275391 L 341.71484 99.09375 L 446.81641 99.09375 L 446.81641 69.275391 L 341.71484 69.275391 z M 183.23438 76.134766 A 46.429999 46.429999 0 0 1 183.85547 76.140625 A 46.429999 46.429999 0 0 0 182.36133 76.214844 A 46.429999 46.429999 0 0 1 183.23438 76.134766 z M 179.25 76.5 A 46.429999 46.429999 0 0 0 177.73633 76.728516 A 46.429999 46.429999 0 0 1 179.25 76.5 z M 191.69336 76.589844 A 46.429999 46.429999 0 0 1 192.58984 76.697266 A 46.479999 46.479999 0 0 0 191.69336 76.589844 z M 174.67773 77.322266 A 46.429999 46.429999 0 0 0 173.20508 77.699219 A 46.429999 46.429999 0 0 1 174.67773 77.322266 z M 195.83789 77.384766 A 46.429999 46.429999 0 0 1 197.18164 77.685547 A 46.479999 46.479999 0 0 0 195.83789 77.384766 z M 199.9668 78.572266 A 46.429999 46.429999 0 0 1 201.63086 79.121094 A 46.479999 46.479999 0 0 0 199.9668 78.572266 z M 170.23828 78.589844 A 46.429999 46.429999 0 0 0 168.75977 79.128906 A 46.429999 46.429999 0 0 1 170.23828 78.589844 z M 204.03711 80.164062 A 46.429999 46.429999 0 0 1 205.91602 81.003906 A 46.479999 46.479999 0 0 0 204.03711 80.164062 z M 165.93555 80.294922 A 46.429999 46.429999 0 0 0 164.51367 80.982422 A 46.429999 46.429999 0 0 1 165.93555 80.294922 z M 207.89062 82.103516 A 46.429999 46.429999 0 0 1 209.99219 83.304688 A 46.479999 46.479999 0 0 0 207.89062 82.103516 z M 161.81055 82.429688 A 46.429999 46.429999 0 0 0 160.46875 83.251953 A 46.429999 46.429999 0 0 1 161.81055 82.429688 z M 211.63477 84.449219 A 46.429999 46.429999 0 0 1 213.80469 85.998047 A 46.479999 46.479999 0 0 0 211.63477 84.449219 z M 157.93359 84.955078 A 46.429999 46.429999 0 0 0 156.65625 85.925781 A 46.429999 46.429999 0 0 1 157.93359 84.955078 z M 215.14453 87.146484 A 46.429999 46.429999 0 0 1 217.32812 89.060547 A 46.479999 46.479999 0 0 0 215.14453 87.146484 z M 154.3418 87.84375 A 46.429999 46.429999 0 0 0 153.10938 88.990234 A 46.429999 46.429999 0 0 1 154.3418 87.84375 z M 179.16602 88.605469 L 179.16602 156.39453 A 34.42 34.42 0 0 1 179.16602 88.605469 z M 191.16602 88.625 A 34.42 34.42 0 0 1 191.16602 156.41406 L 191.16602 156.39453 L 191.16602 88.625 z M 218.41992 90.203125 A 46.429999 46.429999 0 0 1 220.51758 92.449219 A 46.479999 46.479999 0 0 0 218.41992 90.203125 z M 151.05469 91.072266 A 46.429999 46.429999 0 0 0 149.9082 92.376953 A 46.429999 46.429999 0 0 1 151.05469 91.072266 z M 221.44336 93.636719 A 46.429999 46.429999 0 0 1 223.3457 96.134766 A 46.479999 46.479999 0 0 0 221.44336 93.636719 z M 148.0957 94.621094 A 46.429999 46.429999 0 0 0 147.04688 96.087891 A 46.429999 46.429999 0 0 1 148.0957 94.621094 z M 224.13672 97.386719 A 46.429999 46.429999 0 0 1 225.79492 100.08594 A 46.479999 46.479999 0 0 0 224.13672 97.386719 z M 145.52539 98.412109 A 46.429999 46.429999 0 0 0 144.56641 100.08398 A 46.429999 46.429999 0 0 1 145.52539 98.412109 z M 226.44727 101.39648 A 46.429999 46.429999 0 0 1 227.83008 104.25 A 46.479999 46.479999 0 0 0 226.44727 101.39648 z M 143.32422 102.47461 A 46.429999 46.429999 0 0 0 142.52344 104.26562 A 46.429999 46.429999 0 0 1 143.32422 102.47461 z M 228.40039 105.75586 A 46.429999 46.429999 0 0 1 229.43164 108.57031 A 46.479999 46.479999 0 0 0 228.40039 105.75586 z M 141.54492 106.71875 A 46.429999 46.429999 0 0 0 140.89453 108.67773 A 46.429999 46.429999 0 0 1 141.54492 106.71875 z M 229.91211 110.35938 A 46.429999 46.429999 0 0 1 230.60547 113.05469 A 46.479999 46.479999 0 0 0 229.91211 110.35938 z M 140.19727 111.10938 A 46.429999 46.429999 0 0 0 139.72266 113.22656 A 46.429999 46.429999 0 0 1 140.19727 111.10938 z M 230.92578 115.01367 A 46.429999 46.429999 0 0 1 231.32031 117.61523 A 46.479999 46.479999 0 0 0 230.92578 115.01367 z M 139.28906 115.62695 A 46.429999 46.429999 0 0 0 139.02148 117.82617 A 46.429999 46.429999 0 0 1 139.28906 115.62695 z M 231.45898 119.82617 A 46.429999 46.429999 0 0 1 231.5957 122.5 A 46.479999 46.479999 0 0 0 231.45898 119.82617 z M 138.83008 120.22461 A 46.429999 46.429999 0 0 0 138.7832 122.51562 A 46.429999 46.429999 0 0 1 138.83008 120.22461 z M 138.83008 124.80664 A 46.429999 46.429999 0 0 0 139.02148 127.20117 A 46.429999 46.429999 0 0 1 138.83008 124.80664 z M 231.45898 125.20703 A 46.479999 46.479999 0 0 1 231.32227 127.41406 A 46.429999 46.429999 0 0 0 231.45898 125.20703 z M 139.28906 129.40234 A 46.429999 46.429999 0 0 0 139.72266 131.80273 A 46.429999 46.429999 0 0 1 139.28906 129.40234 z M 230.92383 130.0293 A 46.479999 46.479999 0 0 1 230.60547 131.97461 A 46.429999 46.429999 0 0 0 230.92383 130.0293 z M 140.19727 133.91992 A 46.429999 46.429999 0 0 0 140.89453 136.35156 A 46.429999 46.429999 0 0 1 140.19727 133.91992 z M 229.91211 134.66992 A 46.479999 46.479999 0 0 1 229.43164 136.45898 A 46.429999 46.429999 0 0 0 229.91211 134.66992 z M 141.54492 138.31055 A 46.429999 46.429999 0 0 0 142.52344 140.76367 A 46.429999 46.429999 0 0 1 141.54492 138.31055 z M 228.40039 139.27344 A 46.479999 46.479999 0 0 1 227.83008 140.7793 A 46.429999 46.429999 0 0 0 228.40039 139.27344 z M 143.32422 142.55469 A 46.429999 46.429999 0 0 0 144.56641 144.94531 A 46.429999 46.429999 0 0 1 143.32422 142.55469 z M 226.44727 143.63281 A 46.479999 46.479999 0 0 1 225.79492 144.94336 A 46.429999 46.429999 0 0 0 226.44727 143.63281 z M 145.52539 146.61719 A 46.429999 46.429999 0 0 0 147.04688 148.94141 A 46.429999 46.429999 0 0 1 145.52539 146.61719 z M 224.13672 147.64258 A 46.479999 46.479999 0 0 1 223.3457 148.89453 A 46.429999 46.429999 0 0 0 224.13672 147.64258 z M 148.0957 150.4082 A 46.429999 46.429999 0 0 0 149.9082 152.65234 A 46.429999 46.429999 0 0 1 148.0957 150.4082 z M 221.44336 151.39258 A 46.479999 46.479999 0 0 1 220.51758 152.58008 A 46.429999 46.429999 0 0 0 221.44336 151.39258 z M 151.05469 153.95703 A 46.429999 46.429999 0 0 0 153.10938 156.03906 A 46.429999 46.429999 0 0 1 151.05469 153.95703 z M 218.41992 154.82617 A 46.479999 46.479999 0 0 1 217.32812 155.96875 A 46.429999 46.429999 0 0 0 218.41992 154.82617 z M 154.3418 157.18555 A 46.429999 46.429999 0 0 0 156.65625 159.10352 A 46.429999 46.429999 0 0 1 154.3418 157.18555 z M 215.14453 157.88281 A 46.479999 46.479999 0 0 1 213.80469 159.03125 A 46.429999 46.429999 0 0 0 215.14453 157.88281 z M 157.93359 160.07422 A 46.429999 46.429999 0 0 0 160.46875 161.77734 A 46.429999 46.429999 0 0 1 157.93359 160.07422 z M 211.63477 160.58008 A 46.479999 46.479999 0 0 1 209.99219 161.72461 A 46.429999 46.429999 0 0 0 211.63477 160.58008 z M 161.81055 162.59961 A 46.429999 46.429999 0 0 0 164.51367 164.04688 A 46.429999 46.429999 0 0 1 161.81055 162.59961 z M 207.89062 162.92578 A 46.479999 46.479999 0 0 1 205.91602 164.02539 A 46.429999 46.429999 0 0 0 207.89062 162.92578 z M 165.93555 164.73438 A 46.429999 46.429999 0 0 0 168.75977 165.90039 A 46.429999 46.429999 0 0 1 165.93555 164.73438 z M 204.03711 164.86523 A 46.479999 46.479999 0 0 1 201.63086 165.9082 A 46.429999 46.429999 0 0 0 204.03711 164.86523 z M 170.23828 166.43945 A 46.429999 46.429999 0 0 0 173.20508 167.33008 A 46.429999 46.429999 0 0 1 170.23828 166.43945 z M 199.9668 166.45703 A 46.479999 46.479999 0 0 1 197.18164 167.34375 A 46.429999 46.429999 0 0 0 199.9668 166.45703 z M 195.83789 167.64453 A 46.479999 46.479999 0 0 1 192.58984 168.33203 A 46.429999 46.429999 0 0 0 195.83789 167.64453 z M 174.67773 167.70703 A 46.429999 46.429999 0 0 0 177.73633 168.30078 A 46.429999 46.429999 0 0 1 174.67773 167.70703 z M 191.69336 168.43945 A 46.479999 46.479999 0 0 1 185.16602 168.95508 A 46.429999 46.429999 0 0 1 183.85547 168.88867 A 46.429999 46.429999 0 0 0 191.69336 168.43945 z M 179.25 168.5293 A 46.429999 46.429999 0 0 0 182.36133 168.81445 A 46.429999 46.429999 0 0 1 179.25 168.5293 z
This displays a carpenters level. You can set the color,the hiliteColor, the width, the height and the angle by script or using the property inspector. When setting the angle you have, as always with SVG-icon-widgets, first to compute the width and height needed for that angle.

What is also possible but requires additional scripting (effectively making an own widget) would be to achieve that the "level" works correctly.

@bogs.
Just saw the overcrossing of our posts. Widgets are simpler than you believe, it's only the first hurdle that's rather high. Your learning curve would be similarly steep as with LC Script. But such a widget (showing the correct "level") would need a full day for coding.
Last edited by [-hh] on Wed Mar 14, 2018 3:19 pm, edited 2 times in total.
shiftLock happens

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2720
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: Children's Education App for Measuring with a Ruler

Post by richmond62 » Wed Mar 14, 2018 3:08 pm

Measure.png
This will NOT win any prizes for artisticness, but ALL I did was find a PNG image of a ruler on the internet, do a "Bitmap Trace" in Inkscape

https://inkscape.org/en/

save the result as an SVG file, and use my "SVG Importer" to turn that into a Widget in LiveCode 8.1.8.
Measure.livecode.zip
(1.27 KiB) Downloaded 33 times
SVG Importer.livecode.zip
(72.49 KiB) Downloaded 32 times
Obviously you can do exactly the same thing with whatever image suits your needs 8)

bogs
Posts: 2208
Joined: Sat Feb 25, 2017 10:45 pm

Re: Children's Education App for Measuring with a Ruler

Post by bogs » Wed Mar 14, 2018 3:25 pm

[-hh] wrote:
Wed Mar 14, 2018 3:06 pm
@bogs.
Just saw the overcrossing of our posts. Widgets are simpler than you believe, it's only the first hurdle that's rather high. Your learning curve would be similarly steep as with LC Script. But such a widget (showing the correct "level") would need a full day for coding.
Always glad to see you chime in -hh :D and thank you for the encouragement, but I am so rarely in a version of Lc that has anything to do with widgets (aside from helping people that have a problem in those versions) that I think I'll leave that fun to you. Besides, you do so wonderfully with it, I'm thinking of nominating you as 'the widget master' :wink:

I may dabble in Lc script at some point when I finally have some leisure though. I'm certainly starting to get curious about the Mc http things lately.
Image

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1765
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Children's Education App for Measuring with a Ruler

Post by [-hh] » Wed Mar 14, 2018 3:36 pm

@Richmond.
richmond62 wrote:Obviously you can do exactly the same thing with whatever image suits your needs
Inkscape can do what Potrace can do, nothing more, because it uses internally Potrace for that.

You can have (nearly) the same faster with a simple stack that also uses Potrace (a 'lite' javascript version), see "Trace_To_SVG" in "Sample Stacks": Simply import an image and you have it as traced svg in an svg icon widget.
shiftLock happens

kabirthapar
Posts: 2
Joined: Thu Apr 07, 2016 12:25 pm
Contact:

Re: Children's Education App for Measuring with a Ruler

Post by kabirthapar » Thu Jul 12, 2018 11:11 am

I am also searching the School Management App. One of my friend suggested Emulate School Management app. Has anyone used this app earlier?
You only live once and if you do it right once is enough.

capellan
Posts: 513
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: Children's Education App for Measuring with a Ruler

Post by capellan » Mon Jul 16, 2018 4:06 am

Just for reference, check this new version of an old stack
that I found in my archives.

You could check the scripts of every control and:

1) move and rotate the ruler (in steps of 1 or 15 grades) using
left, middle, right mouse buttons with optional alt key
to rotate in clockwise direction.

2) change grid size (click the button named 1/4, 1/2, 1 inch)

3) measure angles moving both (orange and green) oval graphics.

Al
Stack Ruler v01.JPG
Stack screenshot
Rulerv01.zip
compressed stack
(29.87 KiB) Downloaded 7 times

bogs
Posts: 2208
Joined: Sat Feb 25, 2017 10:45 pm

Re: Children's Education App for Measuring with a Ruler

Post by bogs » Mon Jul 16, 2018 3:05 pm

That is pretty slick, Al.
Image

capellan
Posts: 513
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: Children's Education App for Measuring with a Ruler

Post by capellan » Wed Jul 18, 2018 11:26 pm

bogs wrote:
Mon Jul 16, 2018 3:05 pm
That is pretty slick, Al.
Thanks a lot, hopefully the OP find it useful too, although still
requires scripts for drawing lines as described in the first post.

Al

Post Reply

Return to “Educational Outreach”