Jump to content
Sign in to follow this  
sbsmac

A step towards Object Oriented scripting

Recommended Posts

Vote here if you are interested in extending the use of SetVariable and GetVariable to arbitrary objects.  This is some way from true OO but it should be clear that being able to set named properties for objects would provide much more convenient aggregation than the current mechanism which requires you to layout out complex data structures as arrays.  This feature would take us a lot close to Perl-style hash-based OO.

Share this post


Link to post
Share on other sites

I wonder how far this vote will get us - but I voted for it as well thumbs-up.gif

Even though I would go a step further and request the appropriate syntax with it, so something like

_x = car1.speed

and not

_x = getVariable [speed, car1]

Thanks in advance for implementing biggrin_o.gif

Regards,

VictorF

Share this post


Link to post
Share on other sites

I agree that the proper syntax would be the obvious next step but figured it might be easier to extend the existing mechanism rather than starting to alter syntax.  Still, I won't be complaining if BIS would like to take this a bit further    biggrin_o.gif

Actually having thought about it a bit I wonder if the reason for the current restriction is that BIS were trying to avoid problems with locality.  Vehicles must already have support for transferring attributes across the network unlike many other objects.  Nevertheless, I still think the concept would be very useful even if restricted to the local machine.

*edit*

Quote[/b] ]I wonder how far this vote will get us - but I voted for it as well

Thanks to all who voted so far. It might be worth mentioning that Suma has stated that he _will_ be using the voting mechanism as a way of judging which bugs/features are most wanted. No guarantee that it gets added but there's more chance if you vote for it.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×