-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complex example #48
Comments
Maybe you could check the option class I created, it has an Options collection: |
@constrict0r, that's some hefty work indeed. Pretty cool!
|
@constrict0r Thanks, but I'm not sure, which question your answer answers. 🤷🏻♂️ Could you please elaborate a little bit more? Thank you! @niieani So, you mean I need to:
|
@rbukovansky , something like this?: source "$( cd "${BASH_SOURCE[0]%/*}" && cd .. && pwd )/lib/oo-bootstrap.sh"
import util/class
class:Location() {
public string x
public string y
}
Type::Initialize Location
class:Vehicle() {
public Location location
public string name
Vehicle.getter() {
@return:value $(this location toString)
}
Vehicle.Set() {
[reference] toSet
this location x = $($var:toSet x)
this location y = $($var:toSet y)
}
}
Type::Initialize Vehicle
string xSample=33
string ySample=55
Location locationSample
$var:locationSample x = $xSample
$var:locationSample y = $ySample
echo '--------------'
$var:locationSample
Vehicle vehicleSample
$var:vehicleSample Set locationSample
echo '--------------'
$var:vehicleSample Results:
|
@constrict0r Holy crackers! 😮 Thanks a lot! 👍 |
Hi, I just love your framework (finally I don't see myself lost coming from C# and Swift worlds), but is there any complex example? I'm currently looking for these:
1] How do you create collections of class objects?
2] How to have class properties which are based on other classes? I mean:
Is it possible at all?
Thank you.
The text was updated successfully, but these errors were encountered: