Hi Rob...

Thanks for responding. 

> Expecting a user to press the spacebar to "hit" your
#defaultPushButton seems odd -- that's the Enter key's job, and Mui
supports it.

In Windows, along with the enter key, you can use the spacebar on
buttons that have the focus in a dialog boxes.  I'm not sure if this is
also true for the Mac.

> You're using General Purpose coding style to produce a dialog you
could get from Standard style

I always go for the general purpose MUIs.  There are other MUIs in my
project anyway.  Supertramp notwithstanding, I usually take the long way
home.

You mentioned tabbing to the right button to get the focus, yet below is
a MUI from a handler called showAbout() that I wrote for a separate
projector that does indeed put that focus dotted line on a #pushbutton.
I can't really figure out why it works on my showAbout() handler but not
my editAnswerWarningNext() handler.

Also, I was under the impression that #dialogUnit is the most versatile.
A while back, I did some MUI testing on a Windows 95 machine and it had
some settings for displaying large or small fonts in the UI.  I
understood #dialogUnit to be relative measurements, which took care of
having large fonts bleed off the sides of fixed dimension dialog boxes.

- Michael M.

P.S.  Thanks for the link.
http://www.director-online.com/buildArticle.php?id=888

on showAbout()
  beep
  gAbout = new(xtra "MUI")
  winList = getWindowPropList(gAbout)
  winList.type = #normal
  winList.name = "About Understanding the Hazard"
  winList.callback = "aboutChoice"
  winList.width = 280
  winList.height = 40
  winList.mode = #dialogUnit
  
  theList = []
  
  widget = getItemPropList(gAbout)
  widget.type = #pushButton
  widget.title = "Confidentiality"
  widget.locH = 10
  widget.locV = 10
  widget.height = 20
  widget.width = 80
  add theList, widget
  
  widget = getItemPropList(gAbout)
  widget.type = #pushButton
  widget.title = "Some How-To's"
  widget.locH = 100
  widget.locV = 10
  widget.height = 20
  widget.width = 80
  add theList, widget
  
  widget = getItemPropList(gAbout)
  widget.type = #pushButton
  widget.title = "Credits"
  widget.locH = 190
  widget.locV = 10
  widget.height = 20
  widget.width = 80
  add theList, widget 
  
  initialize(gAbout, [#windowPropList: winList, #windowItemList:
theList])
  run(gAbout)
end



on editAnswerWarningNext()  
  -- determine what the dialog box says...
  gMUI = [:]
  theInstance = xtra("mui").new()
  gMUI.addProp(#instance, theInstance)  
  -- create the window properties first...
  theWindowProps = gMUI.instance.getWindowPropList()
  theWindowProps.name = "Editing Your Answer(s)"
  theWindowProps.callback = "editAnswerWarningNextDecision"
  theWindowProps.mode = #dialogUnit
  theWindowProps.xPosition = -1
  theWindowProps.yPosition = -1
  theWindowProps.height = 75
  theWindowProps.width = 280
  theWindowProps.toolTips = FALSE  
  -- create all the widgets next...
  theWindowItems = []  
  -- window begin
  tempWidget = gMUI.instance.getItemPropList()
  tempWidget.type = #windowBegin
  theWindowItems.add(tempWidget)
  -- icon
  tempWidget = [#value:"", #type:#bitmap,
#attributes:[#bitmapIcon:#question], #title:"", #tip:"", #locH:10,
#locV:10, #width:25, #height:25, #enabled:TRUE]
  theWindowItems.add(tempWidget)
  -- label
  theMsg = "Your response to this Knowledge Check is incomplete."
  theMsg = theMsg & RETURN & RETURN & "Are you sure you want to skip it
and move ahead to the next screen?"
  tempWidget = [#value:theMsg, #type:#label, #attributes:[],
#title:"check item", #tip:"tip", #locH:43, #locV:12, #width:300,
#height:40, #enabled:TRUE]
  theWindowItems.add(tempWidget)  
  -- Yes button
  tempWidget = [#value:1, #type:#pushButton,
#attributes:[#textSize:#large, #textAlign: #left, #textStyle:[#bold]],
#title:"Yes", #tip:"", #locH:43, #locV:50, #width:60,  #height:13,
#enabled:TRUE]
  theWindowItems.add(tempWidget)
  -- No button
  tempWidget = [#value:2, #type:#defaultpushButton,
#attributes:[#textSize:#large, #textStyle:[#bold]], #title:"No",
#tip:"", #locH:113, #locV:50, #width:60,  #height:13, #enabled:TRUE]
  theWindowItems.add(tempWidget)
  -- Don't show again
  -- theValue = gTools.pProgress.pBackButtonAnswerReminder
  -- tempWidget = [#value:FALSE, #type:#checkBox,
#attributes:[#textSize:#large, #textStyle:[#bold]], #title:"Do not show
me again.", #tip:"", #locH:43, #locV:77, #width:180,  #height:13,
#enabled:TRUE]
  -- theWindowItems.add(tempWidget)  
  -- window end
  tempWidget = gMUI.instance.getItemPropList()
  tempWidget.type = #windowEnd
  theWindowItems.add(tempWidget)  
  ------------------------------------------------
  gMUI.instance.initialize([#windowPropList: theWindowProps,
#windowItemList: theWindowItems])
  gMUI.instance.run()  
  theDialog = gMui
  gMui = [:] -- void the global, better for memory
  return theDialog
end



[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/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