The MooTools definition is (usually) that options are optional; the class
works with the defaults, but arguments are required. You can't have an Fx
instance without an element to modify. You can't have a Class instance
without an object to prototype. Some classes are less rigid though. You can
totally have a Request instance that you assign a url value to later (when
you call send). You can have a Keyboard instance that you attach keys to
later.

On Tue, Feb 23, 2010 at 12:09 AM, Ryan Florence <[email protected]>wrote:

> If I can call the class like this:
>
> new SomeClass();
>
> And get expected behavior I leave things as options.  But if you can't come
> up with a default option that makes the class actually work, it should
> probably be an argument.  It's sometimes a hard decision, I know.
>
>
> On Feb 22, 2010, at 9:11 PM, Dial wrote:
>
>  Is it better to pass in values as an option or a static variable?  I
>> want to be able to send in an array of arrays or a hash of arrays for
>> plotting graphs.  Most if the graph plugins I have seen parse a table
>> of data already on the page.  Most of my data is time based and all I
>> want to do is line graphing.  Like current users on during a specific
>> time plotted over a 24 hour period.  Just want some opinions.
>>
>
>

Reply via email to