Danny Thomas knew the warmth of the spotlight for more than 50 years, and it knew the warmth of him.

His death yesterday at the age of 79 was sudden and unexpected, but at least Danny Thomas had one last romp in the public eye before he left, having just completed a few very visible weeks on the talk show circuit to promote his ingenuous autobiography, "Make Room for Danny."

This was almost the actor's dream of dying in the wings after a powerhouse performance. On Saturday night Thomas appeared as the guest star, playing a cantankerous doctor on NBC's hit comedy series "Empty Nest," which is co-produced by Thomas's son Tony. The old pro was still in total command of his keen comic instincts and pinpoint timing.

As he had always been, Danny Thomas was an open invitation to be entertained, and you could see in his eyes how hurt he would be if the invitation had been turned down. What if you weren't in the mood? He would put you in the mood.

One of his last appearances was what producer Robert Morton affectionately calls "a silly walk-on" on NBC's "Late Night With David Letterman" in January. Letterman has a passion for a trademark Thomas sight gag called a "spit-take"; someone says something disconcerting while the comic is taking a drink and then, in pop-eyed alarm, he spits the drink out with a loud pbfpbfpbf.

Thomas, plugging his book on a local New York show that originates in the NBC studio next to Letterman's, agreed to drop by and demonstrate what a properly executed spit-take looks like. Letterman's scheduled guest at that moment was Macaulay Culkin, 10-year-old star of the huge hit movie comedy "Home Alone."

Culkin listened while Thomas whispered the cue in his ear and then, at precisely the right moment, turned to Thomas as he drank from a cup of water and asked, as instructed, "Is that your nose, or are you eating a banana?" Fwoosh, the water spewed forth, the audience cheered, and Thomas took his leave to a roar of applause that made him grin wide.

"He did the plug, he did the gag, and he exited on the laugh," recalls Morton admiringly. "It was very impressive, a nice moment, and it was a lot of fun for all of us to meet him. Many of our writers came down from their offices to see him for themselves." Even the coldhearted Letterman seemed charmed.

Among those watching was another of Thomas's talented offspring, actress Marlo, married to Phil Donahue. She was so impressed that she came on the Letterman show two nights later to do a spit-take of her own. It was good. But not as good as the old man's.

Much of the humor on "Make Room for Daddy," the 1953 sitcom that became "The Danny Thomas Show" when it moved from ABC to CBS in 1957, was broad and explosive, but the series, like its star, had a sentimental streak a mile wide, and beneath the bombast, there was a gentle spirit. Next to "I Love Lucy," the Thomas show was probably the biggest domestic sitcom hit of the decade, outrunning by many years even such classics as Jackie Gleason's "The Honeymooners."

Certainly its theme song, an up-tempo Spencer-Hagen arrangement of "Danny Boy," was impressed upon the public mind as the music you hear when Danny Thomas is about to come from behind the curtain.

With his producers and writers, Thomas created a '50s television family that had more punch and character than such bland vanilla models as Ozzie and Harriet's or Stuart and June Erwin's. The cast included Marjorie Lord as wife Kathy (having taken over the role from Jean Hagen as of the 1957 season), with Angela Cartwright, Rusty Hamer and Sherry Jackson as the wisecracking kids.

The first character who pops into many people's heads when they think of the show, however, is bellicose Uncle Tonoose (Hans Conried), a madcap Lebanese relative who appeared only occasionally. Thomas really had an Uncle Tonoose and lived with him and an Aunt Julia when growing up the son of Lebanese immigrants in Toledo, Ohio.

And the premise for the sitcom came from Thomas's own experiences as an itinerant entertainer who sometimes seemed a stranger to his own kids. When he came home from the road after touring, they really did say "make room for daddy" at the Thomas house.

"Nobody knew much about television then. We invented it as we went along," Thomas recalls in ABC founder Leonard H. Goldenson's new memoir "Beating the Odds." Goldenson notes that ABC and "Make Room for Daddy" were born the same year. Much later, after Thomas had gone on to CBS, Goldenson visited Thomas at his Beverly Hills home.

"His living room is almost the size of Madison Square Garden. Almost," Goldenson writes. "Enormous murals of the Lebanese countryside cover the walls. It's very appropriate. After all, Danny Thomas's mother was a cousin of Kahlil Gibran, mystical author of 'The Prophet.' "

With Sheldon Leonard, who directed most of the "Daddy" episodes, Thomas formed a producing partnership that led to such TV landmarks as "The Andy Griffith Show," "The Dick Van Dyke Show" and "The Real McCoys" -- programs that upheld the family model that "Daddy" had helped perfect.

The model is still in place. It was still in place 30 years after "Daddy" premiered when America made room for Cosby.

Success came to Danny Thomas in 1940, when he changed his name from Amos Jacobs and opened at the 5100 Club on the North Side of Chicago, after a meandering career that had included such jobs as supplying horse hoof noises for "The Lone Ranger" on radio.

Thomas always credited his big break to Saint Jude, to whom he had prayed in a moment of despair. Soon a big star in the small world of nightclubs, Danny Thomas went on to Hollywood, but the movies were not good to him. "I have hobnobbed with the top moguls of the movie business," Thomas writes in his autobiography, "all of whom unsuccessfully tried to get me to have my nose fixed before appearing in their movies."

It turned out that what he had was a nose for television, where he achieved success so great that Thomas vowed to pay back the saint who'd heard his prayers, and did that by founding and helping to endow the St. Jude Children's Research Hospital in Memphis. Thomas did so much charitable work in his career that sometimes it seemed like one long benefit. As an entertainer, Danny Thomas belonged to the great old guard, the veterans who remembered vaudeville and the Great Depression and the Palace Theater and all had a collection of anecdotes about Jolson. Danny Thomas told jokes, yes, but also long, involved stories, some of which came from the hard times of his youth, a few of which might be said to have achieved the status of folk tale.

Like Sammy Davis Jr., who died last year, Danny Thomas belonged to a performing generation that has all but vanished. "I was talking to George Burns about it a while ago," Thomas told a Chicago reporter in December, "and as far as we can tell, we're the last of a breed."

At times, Thomas could indeed be maudlin, once appearing on a talk show to gush about the wonder of holding a grandchild in his arms, "this issue of my own loins." But to compensate, Thomas maintained a repertoire of self-deprecating jokes that he called "treacle cutters" -- laugh lines that undercut sentimental excess. He was his own sharpest critic, and his own best editor.

The older he got, the more natural the sentimentalism seemed. He attempted a comeback in a 1970 series called "Make Room for Granddaddy," and although it was not a success, it certified Thomas as a paternal icon, everybody's grandpa.

"My father-in-law was not only a 20th-century entertainment figure, he also founded St. Jude's Research Hospital," Phil Donahue said yesterday, "and, most importantly of all, he lit up like a Christmas tree whenever he was with the whole family, as he was this past holiday season -- his last, and our most joyful one."

Beneath the show-biz shmaltz, there was a roguish energy. Beneath the false humility, there was a real humility. What always came through with Danny Thomas was a genuine love of people, and when that's what you give, that is what you get back.