
590 S.W.2d 490 (1979)
Larry Edwin SCHAFFER, Appellant,
v.
The STATE of Texas, Appellee.
No. 57574.
Court of Criminal Appeals of Texas, Panel No. 3.
December 5, 1979.
Jack W. Beech, Fort Worth, for appellant.
Charles F. Campbell, Jr., Dist. Atty., Hillsboro, Robert Huttash, State's Atty., Austin, for the State.
Before ROBERTS, PHILLIPS and DALLY, JJ.


*491 OPINION
DALLY, Judge.
This is an appeal from a conviction for attempted aggravated sexual abuse of a child. The punishment, enhanced by proof of a prior felony conviction, was assessed at imprisonment for fifty years.
This appeal was originally abated so that the trial court could enter a judicial determination regarding appellant's competency to stand trial pursuant to Art. 46.02, Sec. 5(g), V.A.C.C.P. Schaffer v. State, 583 S.W.2d 627 (Tex.Cr.App.1979). That determination has now been made and placed in the record. The appeal is reinstated; appellant's first ground of error is overruled. In other grounds of error, appellant contends that the trial court erred in refusing to allow appellant to present an insanity defense.
The procedural background of this case is explained in an earlier opinion in this case, see Schaffer v. State, 583 S.W.2d at 628, and needs no repetition here. The first trial of appellant ended in a mistrial on April 28, 1977. Appellant made no effort to present an insanity defense at that aborted proceeding. It is uncontroverted that appellant's counsel, on May 12, 1977, received a letter from the trial court, dated May 9, informing him that the case was set for retrial on May 16, 1977. On May 16, appellant filed a motion for leave to file notice that defendant would present evidence of insanity which asserted that appellant did not have adequate time to file a notice prior to that date. Appellant filed his notice of intention to present evidence on insanity with the court and the prosecuting attorney on May 16. That same day, the trial court postponed trial until May 18, for other reasons, and held a hearing on the motion for leave to file. The trial court ruled that appellant had failed to comply with Art. 46.03, Sec. 2, V.A.C.C.P., and that no good cause for this noncompliance had been shown. The trial court ordered appellant not to raise the insanity defense at trial and the defense was not raised, but evidence for the bill of exceptions was offered.
The letter from the trial court which informed appellant of the trial date setting is not in the record; however, appellant filed an affidavit to substantiate his allegations about the timing of these events. During the May 16 pretrial hearing on this matter appellant's recitation of this factual background was not disputed and, after listening to the arguments from both sides, the trial judge stated:
"The only question in my mind is as to the effect of setting the case twice. He didn't comply with it the first time without a doubt. As to whether or not he's entitled to ten days notice on a second setting, which he has not had time to do, let's go to the chambers and see if we can find any cases...." (Emphasis added.)
With this statement, the record sufficiently reflects that notice of the setting for the second trial was issued less than ten days prior to the date of that trial.
Art. 46.03, Sec. 2, V.A.C.C.P., in pertinent part, reads:
"Sec. 2. (a) A defendant planning to offer evidence of the insanity defense shall file a notice of his intention to offer such evidence with the court and prosecuting attorney:
"(1) at least 10 days prior to the date the case is set for trial; ...
"(b) Unless notice is timely filed pursuant to Subsection (a) of this section, evidence on the insanity defense is not admissible unless the court finds that good cause exists for failure to give notice."
Appellant failed to comply with the ten-day notice requirement. Where notice is not timely filed, the trial court generally has the discretion to decide whether the good cause is present. There are no cases interpreting the meaning of "good cause" under this statute. We hold, however, that there is good cause for an untimely filing as a matter of law where the defendant has not been given at least ten days notice of the date of trial, even if it is a subsequent setting.
The defendant cannot know when he will be going to trial until he receives some *492 notification from the trial court. In this case, appellant could have filed a notice of his intention to present insanity evidence on the day that he was notified of the trial date and the filing would still have been untimely. If the trial court does not give ten days advance notice of the trial date, the trial court has precluded the defendant from having a reasonable chance to comply with the statute.
The State argues that from the time of his indictment on April 1, 1977, appellant had ample opportunity to file a notice of his intention to present evidence of insanity. We disagree. That appellant did not present an insanity defense at the first trial did not foreclose his raising such a defense at the second trial. The first trial ended on April 28. The declaration of a mistrial did not, standing alone, place appellant on notice that a second trial was imminent. The mistrial thus did not place appellant under a legal obligation to immediately begin filing motions to meet statutory deadlines applicable to a retrial of the case. Appellant was placed on notice about the second trial when the trial court notified him of the date of the trial setting. This notification came less than ten days before trial; appellant had good cause for failing to comply with the statute. If the State was not prepared to meet an insanity defense, it could have requested appropriate relief from the trial court.
Appellant was not allowed to present an insanity defense before the jury. This error is not reversible unless appellant's evidence would have properly raised the insanity issue. The trial court agreed that appellant's bill of exceptions on this issue would be the psychiatric testimony presented by appellant in the punishment phase before the court. Appellant called Dr. Blaine McLaughlin, whose qualifications in the field of psychiatry were stipulated to by the State. Dr. McLaughlin testified that appellant had a schizophrenic personality, a mental illness which gave appellant delusions and a compulsion to "act out" these delusions. Dr. McLaughlin testified that, although he first interviewed appellant in May, 1976, about six weeks after the offense, the appellant's history had shown a continuing pattern of this delusional behavior for about ten years. He further testified that appellant had been in and out of psychiatric treatment situations, including several in-patient programs, throughout this period. Dr. McLaughlin and Randy Godsey, a staff psychologist at the Rusk State Hospital, indicated that a manifestation of this illness was indecent exposure, the conduct which was the subject of appellant's prior felony conviction. Appellant's counsel specifically questioned Dr. McLaughlin on the effect this mental illness would have on appellant's ability to conform to the law.
"Q. And as a result of that mental disease did you form any opinion as to whether [Appellant] could conform his conduct to the requirements of the law he allegedly violated, which is sexual abuse of a child?
"A. Yes, sir. I found that he's mentally ill and that he cannot manage to live up to the realityreality codes of behavior, which he understands intellectually, but cannot conform his behavior to them.
"Q. Is it your testimony he's incapable of conforming his conduct to the requirements of the law?
"A. Yes, sir.
"Q. Now, is his mental disease manifested in any ways other than the criminal conduct which he has shown in this case?
"A. Yes. He has other acts...."
V.T.C.A. Penal Code, Sec. 8.01, defines the insanity defense as follows:
"(a) It is an affirmative defense to prosecution that, at the time of the conduct charged, the actor, as a result of mental disease or defect, either did not know that his conduct was wrong or was incapable of conforming his conduct to the requirements of the law he allegedly violated.
"(b) The term `mental disease or defect' does not include an abnormality *493 manifested only by repeated criminal or otherwise anti-social conduct."
The State argues that the evidence did not show that appellant was insane, under the statutory definition, at the time of the offense. The evidence offered by appellant indicated that the mental illness and its accompanying delusional compulsions had continuously characterized appellant's behavior for about ten years. Dr. McLaughlin's testimony is sufficient to raise the defense. The trial court erred in preventing appellant from presenting evidence which he was entitled to offer before the jury.
The judgment is reversed and the cause remanded.
