Seems ok to me..

DW

On Wed, Oct 21, 2009 at 5:38 PM, David Mineer <[email protected]> wrote:

> I have a function in a controller.  I want this controller function to be
> as universal as possible doing it's specific duties.
>
> So, I have a value called "rows".  I want the function to first check for
> event.getValue("rows") and use that if it exists.  If not, then I want it to
> use event.getArgument('rows') if it exists.  If neither exist, I want a
> default value, which let's say, will be 25.  So is this how I do it:
>
> event.getValue('rows',event.getArgument('rows',25))
>
> I am telling MG that if there is a 'rows' in the event object, then use
> it.  If not then default to 'rows' in the getArgument object.  If that ain't
> there, then you get a 25.
>
> Is this the best way.  Maybe I am doing something fundamentally wrong.
>
> TIA,
>
> --
> David Mineer Jr
> ---------------------
> The critical ingredient is getting off your
> butt and doing something. It's as simple
> as that. A lot of people have ideas, but
> there are few who decide to do
> something about them now. Not
> tomorrow. Not next week. But today.
> The true entrepreneur is a doer.
>
> >
>


-- 
“Come to the edge, he said. They said: We are afraid. Come to the edge, he
said. They came. He pushed them and they flew.”

Guillaume Apollinaire quotes

--~--~---------~--~----~------------~-------~--~----~
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to