close
Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Opened 10 months ago

Closed 7 months ago

#522 closed enhancement (invalid)

Add possibility to directly specify the window number in READINFO&Co

Reported by: rmsyam Owned by:
Priority: low Milestone: YAM future release
Component: ARexx interface Version: 2.5
Severity: minor Keywords:
Cc: OS Platform: All
Blocked By: Blocking:
Release Notes:

Description (last modified by damato)

Problem

There is currently a limitation in the READINFO/READPRINT/READCLOSE/READSAVE commands work with having multiple read windows open. The same applied to the write window routines.

Analysis

A user have to currently explicitly switch between windows via MAILREAD WINDOW X or via MAILWRITE WINDOW X in the write window case instead of directly specifying the window number/reference these commands should be performed on.

Enhancement recommendation

To improve handling of multiple read/write windows via ARexx it would be good to have an additional WINDOW parameter for every Arexx command operating on a specific read/write window. This parameter could be an integer with the window number or a unique reference number (even better).

Attachments (0)

Change History (7)

comment:1 Changed 10 months ago by damato

  • Status changed from new to pending

According to the official API documentation this should not be the case. See here:

Documentation/ARexx API/MAILREAD?

All you potentially have to do is call MAILREAD without any WINDOW parameter and it should immediately open a new read window and return the number/index of the read window. Then you can use this index in subsequent ARexx commands.

So please verify that this still works and if not this should be rather a bug report than an enhancement request.

comment:2 follow-up: Changed 10 months ago by tboeckel

  • Milestone set to YAM 2.10
  • Status changed from pending to accepted

Although you can open several read windows using MAILREAD and get a window number as return value the READCLOSE command takes no parameter and will always close the last opened read window. Any further read window cannot be closed afterwards via ARexx as there is only one global ActiveRexxRMData pointer.

The same limitation applies for all write windows opened via ARexx. All commands following i.e. MAILWRITE will implicitly reference the last opened write window. This is major restriction in case more than one write window was spawned via ARexx. Here we also have only a single global ActiveRexxWMData pointer.

comment:3 in reply to: ↑ 2 Changed 10 months ago by damato

  • Component changed from undefined to ARexx interface
  • Description modified (diff)
  • Milestone changed from YAM 2.10 to YAM future release
  • OS Platform changed from undefined to All
  • Priority changed from undecided to low
  • Severity changed from major to minor
  • Summary changed from Possibility to open several read/write windows via ARexx to Add possibility to directly specify the window number in READINFO&Co
  • Version changed from nightly build to 2.5

Replying to tboeckel:

Although you can open several read windows using MAILREAD and get a window number as return value the READCLOSE command takes no parameter and will always close the last opened read window. Any further read window cannot be closed afterwards via ARexx as there is only one global ActiveRexxRMData pointer.

The same limitation applies for all write windows opened via ARexx. All commands following i.e. MAILWRITE will implicitly reference the last opened write window. This is major restriction in case more than one write window was spawned via ARexx. Here we also have only a single global ActiveRexxWMData pointer.

I agree that the current solution is somewhat suboptimal. However, one can perfectly use YAM with multiple read/write windows by always switching between them via the following example pseudo-code sequence:

/* Open two read windows */
firstWindowNr = MAILREAD QUIET
secondWindowNr = MAILREAD QUIET

/* Print the body of the first read window */
MAILREAD QUIET WINDOW firstWindowNr
READPRINT 1

/* Print body of second read window */
MAILREAD QUIET WINDOW secondWindowNr
READPRINT 1

/* Close first read window */
MAILREAD QUIET WINDOW firstWindowNr
READCLOSE

/* Close second read window */
MAILREAD QUIET WINDOW secondWindowNr
READCLOSE

Of course, always having to switch via MAILREAD between the windows seems to be somewhat awkward. In addition, there is a limitation in case two parallel running ARexx scripts are running. However, there are potentially hundreds of situations where parallel scripts might do something wrong/incorrect. Nevertheless, I agree that we could do better here and thus scheduling this to "future" version seems to be appropriate to me so that we can discuss its priority later again and assign it to a future YAM version.

I will also change the ticket content to better match the purpose.

comment:4 Changed 10 months ago by tboeckel

I admit I didn't really notice that MAILREAD can also be used to switch between multiple read windows.

Christoph, does this solution solve your problem? As Jens pointed out we will invest more work in this respect, but the proposed solution should work immediately for you without any change in YAM.

comment:5 Changed 10 months ago by rmsyam

Yes tested this with MUIbase and it works! So for now this is fine.
Thanks for having helped.

comment:6 Changed 10 months ago by damato

Ok, perfect. Please also note that I recently reworked the whole ARexx online documentation for better readability and being more compatible to what YAM 2.9 actually implements. Have a look at the update docs here https://yam.ch/wiki/Documentation/ARexxAPI

comment:7 Changed 7 months ago by tboeckel

  • Resolution set to invalid
  • Status changed from accepted to closed

Closing this one as there is nothing to be done.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber

  • Christoph Pölzl(Reporter, Participant)