Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[ALLY] Layout Bind or Context in stylized Layouts

From: mike:myers:cybarite at: 10-Nov-2000 19:39

I have created a sytlized button that I want to use to leverage the view style. style more-info-button button 20x20 "..." [view/new/offset layout [ h1 "Customer Information" txt "Some explanatory text here" button "Back" [unview] ] 150x150] [view/new/offset layout [ size 250x250 h1 "Purpose Information" txt "Explain here how the field is used. This is not for customer usage." button "Back" [unview] ] 150x150] Works beautifully with only a line of code. currency-more-info: more-info-button. But what I want to do is create these and pass the values that will appear in the h1 and txt values. And others as I need to add them. This will give standard look and feel on the more-info buttons and reduce the support code. For example: add-more-info: func [aHeading someDetail] [ to-block rejoin ["h1 " aHeading " txt " someDetail " button "Back" [unview] " ] ] This would be invoked by: currency-more-info: more-info-button add-more-info "Currency" "Choose USD or local currency" add-more-info "Currency Purpose" "Determines whether local or USD is used. Refer to user specification document 12-September-2000 Section 14.1.3" Or look the detail text up in a dictionary. But when I create the function and return it as a block into layout, I am getting a message that h1 is not understood in this context. I think I need to bind it so that layout understands. But I don't know how to make this bind. Any explainers who can spare the time?