realbasic-nug
[Top] [All Lists]

Re: EnableMenuItems and ShowModal

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: EnableMenuItems and ShowModal
From: Karen <keatk@verizon.net>
Date: Sun, 29 Jun 2008 14:10:28 -0400
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <A58BB6AC-49F5-434C-A7F6-83507AF14904@great-white-software.com>
References: <16E3110B-4D30-472C-B05A-0D968C396998@verizon.net> <A58BB6AC-49F5-434C-A7F6-83507AF14904@great-white-software.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com

On Jun 29, 2008, at 1:34 PM, Norman Palardy wrote:
Hmmmmmm ... it is called here in 2008r2


When I made my quick simple example i had a mistake which meant the wrong window was active which is why it appeared not to work in R2.

In my 2007R3 App (which I can't test in 2008R2)

I have a method on window that configures the window and then shows it:

Sub ShowLots(DisplayLotList() as cLot)
Dim i, ub as Integer, lot as clot, LotStr as String, Item as LotMenuItem
  ReDim UnSavedModification(-1)
  LotMenu.DeleteAllRows

  ub = LotsMenu.Count - 1
  for i = ub DownTo 0
    LotsMenu.Remove i
  Next

  ub = UBound(DisplayLotList)
  ReDim UnSavedModification(ub)

  If ub = -1 then
    MsgBox("No Lots To Display")
    Self.Close
  ElseIf ub = 0 Then
    LotNavControl.Visible = False
  End if

  me.LotList = DisplayLotList
  CurrentRecord = -1

  For i = 0 to ub
    lot = LotList(i)
    ModifiedComments.Append lot.Comment
    LotStr = "A:" + lot.AnalRef + " B:" + Lot.MI_ID + " L:" + Lot.LotID
    LotMenu.AddRow(LotStr, i + 1)
    LotsMenu.Append New LotMenuItem(LotStr, i + 1)
  Next
  Record = 1

  me.ShowModal  ' <---------------------------------------

End Sub


And the EnableMenuItems does does fire though controls on the window are responsive and the window is active..

If I change:
  me.ShowModal

to:
 me.Show

then EnableMeuItems fires and my items are enabled as expected!

- Karen




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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


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