"Dedication, or the Stuff of Dreams" is a rueful play about limits -- of artistic ambition, of physical endurance, of love. In it, the director of a small-town children's theater, played by Nathan Lane, deceives a wealthy dying woman (a majestic Marian Seldes) into believing that he has the same disease that is killing her. The lie, a ruse to get a look inside a storied, abandoned playhouse that she owns, has an unexpected payoff: The old woman offers to give him the building upon her death.

Terrence McNally, the oft-honored Broadway playwright ("Master Class," "Love! Valor! Compassion!"), has composed an elegy of sorts to the intense allegiance that theater people feel to the stage and a way of life that is on more intimate terms with disillusionment than with glory. The dramatist, however, seems to have concluded that this bittersweet thought is a mere jumping-off point, and so he pads his narrative with all manner of melodramatic distraction. What might have been a light repast ends up a bloated smorgasbord.

The idea of Lane, with his sad-clown countenance, as a hapless kids' entertainer, and the patrician Seldes as a dowager liberated by illness from the need for pleasantries helps McNally achieve comic liftoff. Audiences at off-Broadway's 59E59 Theater lap up Seldes's peppery asides and Lane's wide-eyed did-she-just-say-that? glances. The repartee is strong enough to have prompted the theater company, Primary Stages, to extend "Dedication's" run two weeks, to Oct. 2, though Lane stays with the production only until Sept. 4. He's then in rehearsals with Matthew Broderick for a Broadway revival of "The Odd Couple."

Seldes's portrayal is indeed all a theatergoer could hope for. Her Annabelle Willard, ill with esophageal cancer, sweeps in from the back of the theater midway through Act 1 to shore up a sagging play. She crowds out on the other characters as if she were a road hog, oblivious to her own dangerous driving habits and flipping off the safer drivers. (For such do-gooder causes as "Save the Whales," she no longer has patience. Her alternative slogan? "Eat the Whales.") Draining the martinis that her rough-hewn chauffeur (R.E. Rodgers) keeps at the ready, Annabelle has come to a point in her illness where pain obliterates empathy. To Lane's Lou Nuncle, she confesses that she's willing to trade her theater for the temporary balm of sex -- and an assist from him for a more permanent form of relief.

If "Dedication" dealt more convincingly with the needs of these characters, gave the actors a more fully developed notion of what they are supposed to mean to each other, the work might have been a more vibrant exploration of how art can matter in the minor leagues. But McNally drags out subplots and extraneous detail here like a desperate salesman, and it gives the impression that somewhere along the way, he forgot what he really wanted to sell.

Into the play, directed with little flair by Michael Morris, the writer introduces a hodgepodge of themes: infidelity, homosexuality, intergenerational rivalry, even euthanasia. Nuncle's partner and/or beard, Jessie (a drab Alison Fraser), is or isn't content with Lou and the children's theater they run in a local mall, where a British expat (Michael Countryman) handles the technical duties (and, on the sly, Jessie). For a bit of garden-variety conflict, there's the surprise arrival of Jessie's daughter (Miriam Shor), a rock star whose soaring career is the envy of her actress mother. The rocker's boyfriend (Darren Pettie) is a devoted doormat.

By the time Lou confides to Jessie that Annabelle wants to be put out of her misery (with a pillow), and it's revealed that Jessie pulled the plug on her own mother, you simply stop counting the curveballs. That Annabelle's chauffeur is addicted to soap operas comes to seem a more pertinent commentary than the playwright may have intended.

It's too bad "Dedication" veers from the story of a theater career in the middle of nowhere. You find yourself curious about the circumstances that pushed Lou into a life of kiddie shows, and there is in the lie about Lou's cancer -- made up by Jessie, actually -- the hint of a life containing other deceptions. Lane, by the way, delivers a disarming, appealing performance as Lou, even if the role's requirements include a flashback to childhood, when the stage-struck Lou twirled before a mirror like a ballerina.

In some other plays, such as "Frankie and Johnny in the Clair de Lune," McNally has demonstrated an unerring sensitivity to the longings and insecurities of lonely people. In "Dedication," that instinct is less apparent. The evening is not without flashes of cleverness, but your longing is for something that links them to something deeper.

Dedication, or the Stuff of Dreams, by Terrence McNally. Directed by Michael Morris. Sets, Narelle Sissons; costumes, Laura Crow; lighting, Jeff Croiter; music and sound, Lindsay Jones. Approximately 2 hours 15 minutes. Through Oct. 2 at Primary Stages/59E59 Theater, New York. Call 212-279-4200 or visit www.ticketcentral.com.

The repartee between Nathan Lane and Marian Seldes gives Terrence McNally's play its comic thrust.

Lane and Alison Fraser as "partners" who run a children's theater.