My two cents worth.<div><br class="webkit-block-placeholder"></div><div>After the constructor runs the instance should be ready to use. If you can make the constructor more <span class="Apple-style-span" style="font-style: italic;">tidy, </span>providing&nbsp;it still works properly, I would do so. Any parameters that don&#39;t relate to preparing the instance for use are a convenience. I don&#39;t like a lot of parameters, even the tidy version is a few too many for me. Since you sub-class LinearGo I don&#39;t think the amount of parameters are as much of an issue as they would be if you had to instantiate and use LinearGo within your applications code.<br>
<br><div class="gmail_quote">On Sat, Mar 22, 2008 at 9:10 AM, Moses Gunesch &lt;<a href="mailto:moses@goasap.org">moses@goasap.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><font face="Arial">Need y&#39;all&#39;s opinion on something...</font></div><div><font face="Arial"><br></font></div><div><span style="font-family:Arial">Unfortunately LinearGo&#39;s constructor inputs are going to need to change on the next release (see my previous email – this release will add a <i>useFrames</i> option).&nbsp;Sorry, I know that is really inconvenient because it means that your tween classes will need to be fixed – but this should be the last time this happens for LinearGo.</span></div>
<div><font face="Arial"><br></font></div><div><span style="font-family:Arial">A&nbsp;<i>useFrames</i> option will be added to the constructor.&nbsp;I also realized at this update that <i>easing</i> has an&nbsp;<i>extraEasingParams</i> setting, but <i>easingOnCycle </i>doesn&#39;t – oops. So <i>extraEasingParamsOnCycle</i>&nbsp;is being added to LinearGo as well.</span></div>
<div><font face="Arial"><br></font></div><div><font face="Arial"><br></font></div><div><span style="text-decoration:underline"><font face="Arial">Option A: </font></span><font face="Arial">This would be the most complete version of the constructor – on the downside it&#39;s pretty ugly.</font></div>
<div><br></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="color:#7f0055">public</span> <span style="color:#7f0055">function</span> LinearGo(delay<span style="white-space:pre">        </span> <span style="white-space:pre">                </span>: <span style="color:#373737">Number</span>=NaN,</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="white-space:pre">                        </span>duration <span style="white-space:pre">                </span>: <span style="color:#373737">Number</span>=NaN,</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="white-space:pre">                        </span>easing <span style="white-space:pre">                        </span>: <span style="color:#373737">Function</span>=<span style="color:#7f0055">null</span>,</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="white-space:pre">                        </span>extraEasingParams<span style="white-space:pre">        </span>:&nbsp;<span style="color:#373737">Array</span>=<span style="color:#7f0055">null</span>,</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="white-space:pre">                        </span>cycles<span style="white-space:pre">                        </span>: <span style="color:#373737">Number</span>=NaN,</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="white-space:pre">                        </span>easingOnCycle<span style="white-space:pre">                </span>: <span style="color:#373737">Function</span>=<span style="color:#7f0055">null</span>,</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="white-space:pre">                        </span>extraEasingParamsOnCycle:&nbsp;<span style="color:#373737">Array</span>=<span style="color:#7f0055">null</span>, // NEW</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="white-space:pre">                        </span>useRelative<span style="white-space:pre">                </span>: <span style="color:#373737">Boolean</span>=<span style="color:#7f0055">false</span>,</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="white-space:pre">                        </span>useRounding<span style="white-space:pre">                </span>: <span style="color:#373737">Boolean</span>=<span style="color:#7f0055">false</span>,</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="white-space:pre">                        </span>useFrames<span style="white-space:pre">                </span>: <span style="color:#373737">Boolean</span>=<span style="color:#7f0055">false</span>, // NEW</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="white-space:pre">                        </span>pulseInterval<span style="white-space:pre">                </span>: <span style="color:#373737">Number</span>=NaN)&nbsp;</div><div><font face="Monaco" size="3"><span style="font-size:11px"><br></span></font></div>
<div><font face="Monaco" size="3"><span style="font-size:11px"><br></span></font></div><div><span style="text-decoration:underline"><font face="Arial">Option B:</font></span><font face="Arial">&nbsp;Omit the 2 <i>extraEasing</i> inputs considering how infrequently they are actually used.&nbsp;This cleans up the constructor quite a bit. Subclasses could of course choose to add them back in if that is their preference, and of course any tween can first be instantiated then these special settings can be applied afterwards.</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"></div><div><font face="Arial"><br></font></div><div><font face="Arial">(If you&#39;re unfamiliar, these params are settings for Back &amp; Elastic easings like overshoot and amplitude, very few people know how to use them effectively so they are practically a moot point.)&nbsp;</font></div>
<div><font face="Arial"><br></font></div><div><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><div><span style="font-family:Helvetica;font-size:12px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="color:rgb(127, 0, 85)">public</span>&nbsp;<span style="color:rgb(127, 0, 85)">function</span>&nbsp;LinearGo(delay<span style="white-space:pre">        </span>&nbsp;<span style="white-space:pre">        </span>:&nbsp;<span style="color:rgb(55, 55, 55)">Number</span>=NaN,</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="white-space:pre">                        </span>duration&nbsp;<span style="white-space:pre">        </span>:&nbsp;<span style="color:rgb(55, 55, 55)">Number</span>=NaN,</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="white-space:pre">                        </span>easing&nbsp;<span style="white-space:pre">                </span>:&nbsp;<span style="color:rgb(55, 55, 55)">Function</span>=<span style="color:rgb(127, 0, 85)">null</span>,</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="white-space:pre">                        </span>cycles<span style="white-space:pre">                </span>:&nbsp;<span style="color:rgb(55, 55, 55)">Number</span>=NaN,</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="white-space:pre">                        </span>easingOnCycle<span style="white-space:pre">        </span>:&nbsp;<span style="color:rgb(55, 55, 55)">Function</span>=<span style="color:rgb(127, 0, 85)">null</span>,</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="white-space:pre">                        </span>useRelative<span style="white-space:pre">        </span>:&nbsp;<span style="color:rgb(55, 55, 55)">Boolean</span>=<span style="color:rgb(127, 0, 85)">false</span>,</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="white-space:pre">                        </span>useRounding<span style="white-space:pre">        </span>:&nbsp;<span style="color:rgb(55, 55, 55)">Boolean</span>=<span style="color:rgb(127, 0, 85)">false</span>,</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="white-space:pre">                        </span>useFrames<span style="white-space:pre">        </span>:&nbsp;<span style="color:rgb(55, 55, 55)">Boolean</span>=<span style="color:rgb(127, 0, 85)">false,</span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="white-space:pre">                        </span>pulseInterval<span style="white-space:pre">        </span>:&nbsp;<span style="color:rgb(55, 55, 55)">Number</span>=NaN)</div>
</div></span></div></div><div><font face="Arial"><br></font></div><div><font face="Arial">So what do you think... completeness or tidiness?</font></div><div><font face="Arial"><br></font></div><font color="#888888"><div><font face="Arial">-moses</font></div>
<div><font face="Monaco" size="3"><span style="font-size:11px"><br></span></font></div><div><font face="Monaco" size="3"><span style="font-size:11px"><br></span></font></div><div><font face="Monaco" size="3"><span style="font-size:11px"><br>
</span></font></div></font></div></div><br>_______________________________________________<br>
GoList mailing list<br>
<a href="mailto:GoList@goasap.org">GoList@goasap.org</a><br>
<a href="http://goasap.org/mailman/listinfo/golist_goasap.org" target="_blank">http://goasap.org/mailman/listinfo/golist_goasap.org</a><br>
<br></blockquote></div><br></div>