If you would allow the wizard to freely switch the staff from two hands (weilded) to one (held) and back again, why would you not do this for a bow?
I also can't find the specific rule you reference - that you do not threaten at all while weilding a ranged weapon. On page 122 I find that you threaten the area into which you can make a melee attack, and I find that an AoO must be a melee attack, but not that you do not threaten at all when weilding a ranged weapon.
J
The whole "ranged weapons aren't melee weapons" concept is confusing you or something? Unless you want to use Two Weapon Fighting rules, you can only wield one weapon at a time. If you are wielding a ranged weapon, you aren't wielding a melee weapon (except in the case of thrown weapons of course), and thus do not threaten the area around you. If you dropped the ranged weapon before the end of your turn, then I would allow you to make an unarmed AoO.
Also, a spell isn't a melee weapon, and it's not a ranged weapon. You can keep wielding your staff while casting the spell, you just don't have both hands on it.
Also see the D&D FAQ:
The whip is considered a ranged weapon. As far as I can
tell, that means that striking with a whip provokes an attack of opportunity! Surely that's not correct? I have a hard time believing that swinging a whip opens up my defenses that much more than, say, swinging a spiked chain. That also means than a whip wielder can't use the whip (as an attack of opportunity) to trip that orc when it tries to run past.
Using a whip indeed provokes an attack of opportunity. It
takes more time and effort to crank up a whip attack than it
does to, say, pull a crossbow trigger. (With the exception of the
sling, most ranged weapons are a tad handier and quicker than
a whip more than 15 feet long.) A spiked chain is a melee
weapon and considerably less ponderous that a whip (mostly
because it's much shorter).
No, you can't make an attack of opportunity with a whip, but
you could prepare a whip attack or delay attacking until a foe
comes within range.