Custom properties
Forum rules
Be kind.
Be kind.
- richmond62
- Posts: 5288
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Custom properties
Way back in Jeddah, KSA, in 1997, my children were stuck most of the time in the house (if you have ever been to Jeddah you'll know why), with a Performa Mac and, among many other educational programs something called 'Sammy's Science House', and one of MY favourite activities was this:
- -
Now if one stops for a minute and thinks about cladistics and taxonomy one will realise that a recreation of this program in xTalk could be best effected using custom properties.
- -
Now if one stops for a minute and thinks about cladistics and taxonomy one will realise that a recreation of this program in xTalk could be best effected using custom properties.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5288
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Custom properties
For the purposes of this stack I intend to make this place my spiritual home:
https://classroomclipart.com/
And this is useful for classification:
https://en.wikipedia.org/wiki/Linnaean_taxonomy
I shall work like this:
KINGDOM
PHYLUM
ORDER
FAMILY
GENUS
although for the fairly crude classification needed we will probably only need the first 4.
-
https://classroomclipart.com/
And this is useful for classification:
https://en.wikipedia.org/wiki/Linnaean_taxonomy
I shall work like this:
KINGDOM
PHYLUM
ORDER
FAMILY
GENUS
although for the fairly crude classification needed we will probably only need the first 4.
-
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5288
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Custom properties
Cannot say I am weeping into my cups that the fact that the Saudis have bulldozed the slum where we lived.

https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5288
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Custom properties
Half the battle to make software appealing (especially to Primary school children) is getting the graphics looking good:
- - -
- - -
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5288
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Custom properties
I could have stolen all the images from the original software for the illustration exercie here except for a number of problems:
1. All those images are bitmapped for display at a far lower screen size than is now standard.
2. I intend to deploy the end stack on the machines in my ESL school.
3. This sort of imagery makes me vomit:
- - -
Neither my children, nor myself at the same age, liked that sort of kiddy-kitsch; so I see no good reason to
force it on yound learners today.
1. All those images are bitmapped for display at a far lower screen size than is now standard.
2. I intend to deploy the end stack on the machines in my ESL school.
3. This sort of imagery makes me vomit:
- - -
Neither my children, nor myself at the same age, liked that sort of kiddy-kitsch; so I see no good reason to
force it on yound learners today.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5288
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Custom properties
Now, let's try a 'dry run':
- -
Currently this does NOT leverage custom properties:
- -
- -
Currently this does NOT leverage custom properties:
- -
- Attachments
-
- Taxonomy.oxtstack
- (382.31 KiB) Downloaded 124 times
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5288
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Custom properties
For anyone who wants to try "the real thing":
https://macintoshgarden.org/games/sammys-science-house
This is a Macintosh/Windows hybrid disk image.
https://en.wikipedia.org/wiki/Edmark
Almost all of Edmark's software is downloadable from the Internet Archive.
https://macintoshgarden.org/games/sammys-science-house
This is a Macintosh/Windows hybrid disk image.
https://en.wikipedia.org/wiki/Edmark
Almost all of Edmark's software is downloadable from the Internet Archive.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5288
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Custom properties
The point (when I get to it) of using custom properties is that I can have 50,000 objects (pictures) should I choose that share a single code, rather than having to hand-code each one.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5288
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Custom properties
Right . . . at long last to one way to use custom properties.
As each image of the things to be dropped on the drop-targets has a custom property 'PHYLUM' it is possible for ALL the objects to have the same script:
-
As each image of the things to be dropped on the drop-targets has a custom property 'PHYLUM' it is possible for ALL the objects to have the same script:
-
- Attachments
-
- Taxonomy_CP.oxtstack
- (412.76 KiB) Downloaded 89 times
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 5288
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Custom properties
The only slight snag about this method is having to put an objects's location into a field (every operation that involves fields slows things down: not that is this case any end-users are likely to notice the microsecond difference).
One way to circumvent this would be to store the location in another custom property:
-
One way to circumvent this would be to store the location in another custom property:
-
- Attachments
-
- Taxonomy_CP_2.oxtstack
- (412.54 KiB) Downloaded 94 times
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 3522
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: webtalk.tsites.co.uk
- Contact:
Re: Custom properties
Just an idea, but you could perhaps avoid setting scripts on each item at all.
An example, none of these 4 coloured images in this stack have any script applied to them.
They will report their name and their custom properties when dragged.
The entire script is in the card script, as shown. That might be a bit awkward to read on that screenshot, so here it is:
An example, none of these 4 coloured images in this stack have any script applied to them.
They will report their name and their custom properties when dragged.
The entire script is in the card script, as shown. That might be a bit awkward to read on that screenshot, so here it is:
Code: Select all
local tObjName
local tClassification
on mousedown
try
get the short name of (controlAtLoc(the mouseLoc))
put it into tObjName
if there is an image tObjName then
put the ttype of image tObjName into tClassification
if tClassification is "" then exit mousedown
put tClassification into fld "output"
revIDESetCursor "com.livecode.cursor.grabclose"
grab image tObjName
end if
catch e
end try
pass mousedown
end mousedown
on mouseup
revIDEResetCursor
if there is an image tObjName then
put the ttype of image tObjName into tClassification
else
put "" into tClassification
end if
if not (tClassification is "") then
put "mouse released. Was dragging image " & tObjName & " which is a type of " & tClassification into tDrop
put tDrop into fld "out2"
end if
pass mouseup
end mouseup
Who is online
Users browsing this forum: No registered users and 4 guests