Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
QTRecordAudioXtra
Color Dialog behavior
Wheel Mouse
File Save Button
ISOinteractive (Isometric Collision Path Editor) in BETA!
A Lingo Timer Script
Direct Media Balance Slider
Large Integer and Base Conversion Integer Parent Script
Show Recordset's Current Record
MADPlayer
MediaMacros Xtras Mall
 

 

 

Behavior Custom Alert

Added on 7/8/1999

 

Compatibilities:
D6_5 D7 D8 Mac PC Script

This item has not yet been rated

Author: Penworks (website)

Creates a custom alert with the above properties. Requires MUI Xtra Reproduced with permission from Penworks Lingo User"s Journal

-- Custom alert handler
-- Buttons can be #OkCancel, #AbortRetryIgnore, #YesNoCancel,
-- #YesNo, or #RetryCancel
-- Icons can be #stop,#note,#caution,#question,#error or #none
-- Default (button) can be #Ok, #Cancel, #Abort, #Retry, #Ignore,
-- #Yes, or #No (but must be on the dialog, of course)
-- Return value is symbol of button (#Ok, #Cancel, #Abort, etc.)

on customAlert buttons, default, icon, moveable, message, title
  set alertObj =new(xtra "MUI")
  if (not objectP(alertObj)) then
    return(#failed)
  end if
  
  if icon =#none then
    set icon =0
  end if
  
  set alertInitList =[:]
  setAProp(alertInitList, #buttons, buttons)
  setAProp(alertInitList, #default, default)
  setAProp(alertInitList, #icon, icon)
  setAProp(alertInitList, #moveable, moveable)
  setAProp(alertInitList, #message, message)
  setAProp(alertInitList, #title, title)
  
  -- Now choose the default
  if (symbolP(default)) then
    case buttons of
      #OkCancel:
        set default =getPos([#Ok, #Cancel], default)
        
      #AbortRetryIgnore:
        set default =getPos([#Abort, #Retry, #Ignore], default)
        
      #YesNoCancel:
        set default =getPos([#Yes, #No, #Cancel], default)
        
      #YesNo:
        set default =getPos([#Yes, #No], default)
        
      #RetryCancel:
        set default =getPos([#Retry, #Cancel], default)
    end case
    setAProp(alertInitList, #default, default)
  end if
  
  
  set result = Alert( alertObj, alertInitList )
  set alert =0            -- Discard the object
  
  case buttons of
    #OkCancel:
      return(getAt([#Ok, #Cancel], result))
      
    #AbortRetryIgnore:
      return(getAt([#Abort, #Retry, #Ignore], result))
      
    #YesNoCancel:
      return(getAt([#Yes, #No, #Cancel], result))
      
    #YesNo:
      return(getAt([#Yes, #No], result))
      
    #RetryCancel:
      return(getAt([#Retry, #Cancel], result))
      
    otherwise:
      return(#unsupported)
  end case
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail