<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 13, 2013 at 5:31 PM, Anders Gärdenäs <span dir="ltr">&lt;<a href="mailto:anders.gardenas@gmail.com" target="_blank">anders.gardenas@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p style="margin-bottom:0.0001pt"><span style="font-family:&#39;Times New Roman&#39;,serif;font-size:12pt">The purpose of the option is to always get all
the coordinates (from a pdf or a trajectory file).</span></p></div></blockquote><div><br></div><div style>If you always want to get all the coordinates, what&#39;s the point of a user-visible option and all the complexity the selections bring? Why not simply use the atom coordinates directly? </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p style="margin-bottom:0.0001pt"><span style="font-family:&#39;Times New Roman&#39;,serif;font-size:12pt">So are there any other options that will behave in the
same whey where there is a default option?</span></p></div></blockquote><div><br></div><div style>For all the other option types, it is possible to provide a simple default value, so the selection options are unique in this sense. The main difference, as I already said, is that it is difficult to arrange it such that the default selection text could be parsed at the time the option is declared. For all other option types currently there, it is close to trivial to provide a default value that just gets interpreted at the time the option is declared.</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">If there aren’t will I try to implement an option
like: </span><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">defaultSelectionText</span>(“…”);
if there is does it depend how much time I got (I am working here as a summer job
) and what my supervisors wants.<br></p></div></blockquote><div><br></div><div style>Just let me know whether you will, so that we can avoid duplicate work. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><p style="margin-bottom:0.0001pt"></p>

<p style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">If I implement it isn’t
smarter to make it “universal” so it works for every option instead of only
Selection, it might come handy for other types of options?</span></p></div></blockquote><div><br></div><div style>I suspect that it will create more confusion than it is worth to be able to say &quot;IntegerOption(...).defaultText(&quot;1&quot;)&quot;, and have that &quot;1&quot; parsed into an integer at some later time... But that said, it _may_ be beneficial to add some code into the core option implementation to make this easy to implement also for other types of options. It really depends on whether there is some synergy with the current approach to default values: If the new implementation doesn&#39;t allow simplifying anything in the existing code, then it probably makes the internal option logic more convoluted, and doesn&#39;t really improve the code.</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">

<p style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">I don’t rely know how it shod behave </span><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">with or without
required()</span>, nevertheless I guess it shod work like the rest of the default
options.<br></p></div></blockquote><div><br></div><div style>Currently, specifying .defaultValue() essentially makes .required() a no-op. That may be reasonable here as well.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><p style="margin-bottom:0.0001pt"></p>

<p style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"> </span><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"> –select</span> without a value shod probably
work as before, (triggers an interactive prompt )  even if there is a default text.</p></div></blockquote><div><br></div><div style>Sounds reasonable. </div><div style><br></div><div style>Best regards,</div><div style>Teemu</div>
</div></div></div>