Howto:Extend Nasal: Difference between revisions

Jump to navigation Jump to search
m
Line 285: Line 285:
= Wrapping Classes as Nasal Objects (ghosts) =
= Wrapping Classes as Nasal Objects (ghosts) =
'''To be written by Hooray & Zakalawe'''
'''To be written by Hooray & Zakalawe'''
Quoting: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg17546.html
<pre>
Absolutely agreed that making as much data as possible 
available is valuable - as you say, I'm always amazed by the neat 
things people do in nasal scripts. [...]
I'm still thinking on different ways to make the core datasets a 
bit more 'lazy'.
</pre>


Quoting: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg29032.html
Quoting: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg29032.html
Line 299: Line 308:
If that sounds impossible, then I'd strongly advocate creating separate special purpose-functions in the short term, that do *one* thing, and be more easily  
If that sounds impossible, then I'd strongly advocate creating separate special purpose-functions in the short term, that do *one* thing, and be more easily  
subsumed if/when we properly expose the C++ types to Nasal.
subsumed if/when we properly expose the C++ types to Nasal.
</pre>


Quoting: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg29034.html
<pre>
Yes I'd like to second the idea of returning objects (with attributes
Yes I'd like to second the idea of returning objects (with attributes
and methods for doing interesting things), I'm guessing we don't need to
and methods for doing interesting things), I'm guessing we don't need to
Line 308: Line 320:
box (2 or 4 lat/lon pairs), and if the same could be done with other
box (2 or 4 lat/lon pairs), and if the same could be done with other
navigation elements in nav.dat it would be most excellent!
navigation elements in nav.dat it would be most excellent!
</pre>


Quoting: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg29035.html
<pre>
Well, this is exactly what all the query methods on FGPositioned do - the  
Well, this is exactly what all the query methods on FGPositioned do - the  
problem is, they return FGPositioned subclasses, which aren't much use to Nasal  
problem is, they return FGPositioned subclasses, which aren't much use to Nasal  
Line 320: Line 335:
proper naGhosts, and could have a forwards-compatible APi when the ghosts are  
proper naGhosts, and could have a forwards-compatible APi when the ghosts are  
written.
written.
</pre>
</pre>


Navigation menu