jejacks0n/mercury — Issue #175: modal and lightview button types thow exception when function is provided
Author: diolan
Created: 2012-03-06 05:00:52+00:00
State: open

I have added the button to the main panel (coffeescript code):

templatesPanel: ['Templates', 'Available Templates',
lightview: ->
debugger
"/pages/1/templates.html"
]

The Mercury.Toolbar.Button::build function throws an exception even before my function is called (see debugger at the beginning). The exception is thrown in mixed.apply:
when 'lightview'
@handled[type] = if jQuery.isFunction(mixed) then mixed.apply(@, @name) else mixed

The exception is TypeError with type: "apply_wrong_args"

I see you use mixed.call for panels and mixed.apply for modal and lightview. What is the reason?