< Back to IRCAM Forum

A new window GUI object for OM?

Hi again OM developpers,

I have a request:
in some case, a very simple separate window such as warning window wich make possible to print on the screen some message (a string) for the user, in place of a print to the listener would be very appreciated.
For instance, with two (optional ?) buttons with arbitray text (it could be “Cancel” or “no” and “OK” or “yes” or so) which execute some user-defined function (such as “(abort)” and “(take it)” ) may make possible some usefull interaction with the user in to evaluate a part of a patch before evaluating all of it.
I know it’s easy to make in LW, but I don’t have LW to make it (too expensive !!!).

All te best,
Fred

PS:
Finally I found everyting here, it’s working:

Anyway a standard view/window GUI to operate decision in OM patch chain would probably make possible new ways to interact :slight_smile:

Dear Fred,

I don’t really seem to understand you well here. Can you give us an example when this happens. In OM you have plenty of Y/N dialogs implemented already, However this is not our priority for the time being. We have already a long list of to do’s that will be issued in march 2021 for the coming new version (6.18) and most of them are focused on the musicproject, plenty of new GUI, etc…

Keep you posted.

Best
K

Hello Karim,

The dialog object I can see in OM are in Classes > Kernel > Interface Boxes.
The ones which I’d like to use ressembles to the single- or multiple-item-list and popup-menu. But I find that the necessity to “block” them before evaluating not very convenient since in some cases the user has to un-block and re-block to update its content and ten to validate its selection (if I well understood te online doc). If using a separate window, instead an menu embeded into te patch itself, content of te window can be dynamically updated and then the User just has to make its selection (so that one click only is required), for instance when using capi::text-input-pane class I’m actually using to develop a project.

I open to make a demo for you as soon as I finished the project.

Bests.
Fred
I

Ok got you there.
This could be done. By the way do you know the existence of the “new lisp function feature”? This could approach your quest:

Thank you Karim for answering.
Yes I know it and like to use it.
I forgot to say that I also (and mainly) need is to ask the user to enter some text/values as an answer to a question dependin on the input.
For instance, let say that a process returns N values, with N quite big, and let te user to explore the values step by step by telling which part (subsequence) he wants to evaluate (it could be values sent to a chord-seq or a voice). By using a separate window includin relevant information, the user can make its own choices freely, step by step. A LW class such as capi::text-input-pane make it easy (and more interactive).

Have a good night !

fred

Hello Karim and lispers,

here is a example of the interface I’m thinking about.
I need it to prevent OM to be not able to answer (crashing without unexpectingly quiting) as soon as I suspect it will.


Bests.

Hi Fred,

As Karim says, there are a few of such basic windows (yes/no dialog, enter text etc.) that are already implemented in OM and available for you to use either in your code, or in OM patches.
For instance: om-y-or-n-dialog, om-get-user-string, etc.

For more specific needs (as in your example above) you would beed to make your own, either with LispWorks or with the OM API, which you can both use within OM (you don’t need a LW license for that).

For instance:

  (om-make-window 
   'om-window 
   :size (om-make-point 300 300)
   :subviews (list 
       (om-make-dialog-item 
          'om-button 
          (om-make-point 10 10)
          (om-make-point 100 30)
          "Hello")
         ))

Jean

Pointers to write your own dialogs:

  • With OM API (an intermediate-level “portable” API on top of LW, that is used to create all the UI in OM) : there used to be a (very old) text document listing all the functions in this “OM-API” but you can also just browse the contents of the “api/om-LW” folder in the OM code. It is not that big :slight_smile:

  • With LispWork’s CAPI: see LispWorks documentation and manuals (here is for instance the Linux manual: http://www.lispworks.com/documentation/lw71/CAPI-U/html/capi-u.htm)

1 Like

Edit: now re-reading your previous messages I think you have found all this already (and you even built the dialog you needed!)
But you might still find these in-built OM functions pointers useful (I hope) :slight_smile:
Good evening !

Hi Jean,

thank’s for this capi link, it’s different to the pdfs available from the actuel main doc page of Lispworks website.

Have a good day.