"blddrgable()" connects function "onDropBld" to the drop-event of some
.divs. That function does some stuff, and after doing it, it calls
blddragable again to unbind all previous drop-functions and rebind
itself to the drop event.

Now... jslint notifies me, that onDropBld get's "used" before it is
defined. If I change the order, same result.

Now, it is totally correct to define these functions this way, because
on execution of them they both will exist - otherwise there will be no
drop event handling.

> $j(this).swap($j(ui.draggable));
> blddrgable();
> }
>
> "blddrgable()" connects function "onDropBld" to the drop-event of some
> .divs. That function does some stuff, and after doing it, it calls
> blddragable again to unbind all previous drop-functions and rebind
> itself to the drop event.
>
> Now... jslint notifies me, that onDropBld get's "used" before it is
> defined. If I change the order, same result.
>
> Now, it is totally correct to define these functions this way, because
> on execution of them they both will exist - otherwise there will be no
> drop event handling.
>
> HOW can I tell jslint that it is okay to be that way?
>
> My workaround was to write
>
> /*global onDropBld*/
>
> but that not exactly says what is going on. Better recommendations?

The global trick obviously only works if the functions are global.
Ideally, you should have no more than one global function, so it is
not a general solution.

> > $j(this).swap($j(ui.draggable));
> > blddrgable();
> > }
> >
> > "blddrgable()" connects function "onDropBld" to the drop-event of some
> > .divs. That function does some stuff, and after doing it, it calls
> The global trick obviously only works if the functions are global.

It also works with non-global functions, but is an ugly, ugly hack!

> Ideally, you should have no more than one global function, so it is
> not a general solution.

yes. And I am workung hard on restructuring my .js to do exactly that!
your jslint is of GREAT value and a really really big time saver.

> 1) Make gboxJSON2 an inner function of blddrgable.

gboxJSON2 is allready defined outside, so making it inner won't do any
good.