President Obama praised the press as central to democracy Wednesday in a final "farewell" that was part ironic homage to the media and part admonition to the incoming Trump administration.

Democracy "doesn't work if we don't have a well-informed citizenship...America needs you, and democracy needs you," he said, before taking questions in a final press conference that followed a final speech last week in Chicago.

It was a premeditated (and well-signaled) pre-emptive shot at President-elect Donald Trump, whose views toward the press were at times openly hostile during the campaign. As his inauguration approaches Friday, Trump's shots at the media (mostly via Twitter) have persisted.

Obama underscored the need of a free press to "cast a critical eye on the powerful. You'd done it, for the most part, in ways that I could appreciate for fairness, even if I didn't always agree with your conclusions. Having you in this building has made this place work better. It keeps us honest, made us work harder."

Related Training: Finding and Nurturing the Secret Stories Others Miss

That might have given pause to critics of his relations with the press and of his administration's actions on a myriad of full disclosure issues. They've been uneven. But the thrust remained at obvious counterpoint to the overt hostility Trump and aides have at times demonstrated.

Obama reached back to his pre-White House years and noted the presence of Christi Parsons of the Los Angeles Times and Chicago Tribune, who covered him as a state legislator in Springfield, Illinois, and Chicago Sun-Times reporter Lynn Sweet.

And it was no accident that he didn't choose a larger nearby venue but, instead, the White House press room. Its fate (even if unlikely to change) has been at least one topic of discussion between Trump communications strategists and representatives of a frustrated White House Correspondents' Association.

Then it was on to expected questions on important matters of the day — the commutation of Chelsea Manning's sentence, Russian belligerence, his counsel to Trump and dramatic change in Cuba policy, among others. And, unavoidably, he exhibited a stark contrast with the flamboyant, at times indiscreet, even occasionally nasty rhetorical style of his successor.

Where Trump is hot, Obama was cool. Whereas Trump opts for the unequivocal, Obama opted for his characteristic, former academic's nuance and layered responses, including on matters of national security, immigration and race relations.

Even the pre-selection of questioners reflected a sharp difference in outlook. It was a varied group as far as ethnicity, race and gender. Two of the first five questioners he acknowledged were Latinas. A reporter for an LGBT publication got a chance, too.

And the group included Jeff Mason, a Reuters reporter who is president of the White House Correspondents' Association, who is involved in discussion with the incoming administration on early disputes and anxieties.

But, as fretful as the White House press corps is about Trump, Obama's own track record on press matters is bumpy. It's been especially so on the release of government records, even after promising the most open administration ever.

Despite some clear advances, including improvements to the Presidential Records Act, he's exhibited the tendency of successive administrations, regardless of political party, to inhibit media access.

Whether it was use of the Freedom of Information Act, handling of the so called "open meetings law, reliance on so-called "secret law" memos or going after media for alleged leaks, he's not been anywhere near as sensitive to press desires as he's suggested.

One Associated Press analysis concluded that the administration has topped previous records in not fulfilling FOIA requests.

Still, Wednesday was a day on which he sought to pay his respects to those assembled before him. And, with graciousness and a sense of history, he saved the last question for Parsons.

That was not a big surprise. She'd mulled a slew of different queries in the even she was called upon. And, in fact, hers was far, far better than those of at least one friend with whom she'd corresponded. Far better. I assure.

How will the Obamas speak to their daughters about the meaning of the election and how will they interpret it for them?

Obama spoke about the need for resilience and hope and how "the only thing that is the end of the world is the end of the world."

"Both of them have grown up in an environment where they could not help but be patriotic, to love this country deeply, to see that it is flawed but that they have responsibilities to fix it. And they need to be active citizens."

He continued in that vein and then concluded with praise for the American dream and the need to work hard to improve a great but flawed nation.

"In my core, I think we're going to be OK…We just have to fight it, work for it, not take it for granted. And I know you will help us do that."

"Thank you very much, press, corps, good luck."

And, with that, he exited the narrow confines of the James S. Brady Briefing Room as TV reporters rose quickly and did their final post-Obama press conference stand-ups.