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

[REBOL] Re: Elegant way to reference a function?

From: lmecir:mbox:vol:cz at: 4-Dec-2001 8:46

Hi Patrick, your solution (display: :my-show-photo-function) seems to be perfect. Do you have any problem with that? Aliases aren't well suited, they are more permanent, than you might need. ----- Original Message ----- From: "Patrick Philipot" <[pat665--ifrance--com]> To: <[rebol-list--rebol--com]> Sent: Monday, December 03, 2001 10:44 PM Subject: [REBOL] Elegant way to reference a function? Hi all, What is the elegant way to reference a function? Let me explain a little bit my context : I am working on a program that selects items using criterion (may be the plural criteria is required here, but I'm french you know). Theses items are photos, for example, or texts such as FAQ. For photos, the person who is on the photo is a criterion. To select photos, it is just a matter of a click on a checkbox. With this, it is easy to see photos with marc and chouchou (marc is my son, chouchou is my cat). It is possible to make exclusion, for a FAQ program, it will be possible to search for FAQ with 'bind and 'use but not with 'view. Back to the question : I don't want the main program to know about photos, or FAQ or anything else. However it's not the same to show a photo or to display a FAQ. So I need a generic function, used during the test, that will be replaced with minimum effort (I'm actually from the south of france ;-) with the required function. To be more practical, if I have a button like this on a window. button "show me" [display] I want the function display to be : - a simple test function when debuging or - a function that shows a photo or - a function that displays a FAQ text I have thought of aliases, but there are a bit problematic to me (because I don't know to get rid of them). I think may be it is as simple as : display: :my-show-photo-function Any idea, or suggestions ? Patrick