ghkweon / dwscript

Automatically exported from code.google.com/p/dwscript
0 stars 0 forks source link

Add overloaded compile method which reads the script from stream #402

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Please add an overloaded compile method to the TDelphiWebScript which takes 
TStream as a parameter. This would allow to read/compile scripts from a stream 
without user needing to load the stream content into temp string first.

Original issue reported on code.google.com by ain.val...@gmail.com on 22 May 2013 at 8:13

GoogleCodeExporter commented 8 years ago
There are several LoadTextFromXxx utility functions in dwsXPlatform, including 
loading from a stream, which facilitates that and take care of encoding as well.

The idea behind using a String rather than a stream is that it eliminates any 
ambiguity about the ownership and release of the passed TStream reference, and 
the script engine needs a string buffer anyway.

Original comment by zar...@gmail.com on 23 May 2013 at 10:38