realbasic-betas.mbox
[Top] [All Lists]

App.EnableMenuItems is not fired ?

To: REALbasic Betas <realbasic-betas at lists dot realsoftware dot com>
Subject: App.EnableMenuItems is not fired ?
From: Emile Schwarz <emile dot schwarz at wanadoo dot fr>
Date: Sat, 30 Aug 2003 13:39:50 +0200
References: <20030829224443 dot 9337B18000B5 at mwinf0601 dot wanadoo dot fr>
Hi,

I have the following code in EnableMenuItems:

 // FileClose is activated if there is a Window to close
 If WindowCount > 0 Then
   FileClose.Enable
Else
   FileClose.Enabled = False
 End If

and when running (in the IDE) with no open window (no visible nor invisible window), the File.Close MenuItem is activated and the FileClose Menu Handler is fired.

I had the bad idea to put in the FileClose Menu Handler:

Window(0).Close

so when there is no open window available to be closed, I've got an exception.

I have changed my code, but the question is:

Is-it intended behavior ?
(of course, I cannot believe that it could be an intended behavior)

Cheers,

Emile



---
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

<Prev in Thread] Current Thread [Next in Thread>