Closed benloh closed 1 year ago
requested review from @jdanish
added 1 commit
In GitLab by @moravick on Aug 29, 2022, 08:33
could we get a list of the working prop methods? i.e. eq, gt, etc?
@moravick there's two ways you can do this:
The easiest is actually to use the GUI: Do an addProp for each proptype (string, number, boolean), then do a prop xxx <method>
. You'll see all the methods listed. Then do the same for each feature (e.g. featProp xxx <method>
The second easiest way is to code dive: search for class-sm-string
, class-sm-number
and class-sm-boolean
. At the bottom of the file is a list of methods
.
Then search for feat-agentwidgets
(etc.) and look for the list of methods
at the bottom of the file.
added 1 commit
added 1 commit
In GitLab by @jdanish on Sep 3, 2022, 07:54
I think this can be merged in with help.
mentioned in commit ae3104b18445b6d3d78f899f637a035646f9909f
Merged with feature-help
branch in !268
Merges dev-bl/if -> dev-next
Branch:
dev-bl/if
This adds two new keywords:
ifProp
andifFeatProp
targeted at making it easier for students to constructif
statements.ifExpr
still works.ifProp
ifProp
lets you construct conditions taking advantage of built-in gvar prop methods. e.g.ifFeatProp
Similarly,
ifFeatProp
accesses gvar prop methods for featProps. e.g.ifProp
comparison to another propifProp
has a code-only feature that allows you to use another property as the argument for a prop method. e.g.But there are a few caveats:
prop methods
Note that prop methods are strings, not symbol operators (e.g.
gt
, not>
). The methods are actual javascript method names, so it is not easy to use symbols to replace them. That can potentially be a 2.0 feature.The prop methods can be entered using the GUI, so it should be relatively easy to construct the
if
statements. And like other block commands, the consequent block will be added automatically when you create or edit the line.