Chris (and lingo-l crowd):

The way that I get values from text fields in MUI is kind of kludgy, but it
works. In my callback handler, I scan for the element number of the editable
text I want to use, and set a global to the value of the associated element
list, like this...

on testDialogCB action, elementNumber, elementList
  global gMUI
  global gBtnResult, gTxt
  
  -- gFixedRoll = VOID
  case(elementNumber) of
    -- 4 is the element number of the text I want the value of;
    -- yours will be different depending on how you create your
    -- MUI dialog box. 2/12/2001 age
    4:
      -- get the value and put it in a global
      gTxt = elementList.value

    otherwise:
      put elementNumber
  end case
  
  if action = #itemClicked then
    --put action, elementList.title
    --put gMUI
    
    case(elementList.title) of
        
      "OK":
        -- get the text out of the editable text field...
        -- moved this above...2/12/2001 age
        Stop(gMUI,0) --
        gBtnResult = #OK
        gMUI = VOID
        
      "Cancel":
        Stop(gMUI,0)
        gBtnResult = #Cancel
        gMUI = VOID
      otherwise:
        
        
    end case
    
  -- else if action = #itemChanged then
    -- put action, elementList.title

   end if
end

>From here, you will need to have your handler act upon the value of the
global set in the callback, probably after clicking the OK button. This
method has the added advantage of allowing you to scan multiple editable
fields in a dialog, if that is your cup of tea (or other beverage.)

Note: My MUI code is a modified version of the fine examples in Gary
Rosenzwieg's book "Using Director 8 Special Edition", which belongs on every
serious Lingo coder's desk (it won't stay on your bookshelf too long.)

HTH,

Allan

Allan Evans    [EMAIL PROTECTED]
now back in Arlington, VA by popular demand :)
Multimedia programming from...wherever I am!
"No matter where you go, there you are." - BB 


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to