Subj : Re: UIFC Issue
To   : Mlong
From : Digital Man
Date : Mon Oct 12 2020 06:52 pm

 Re: Re: UIFC Issue
 By: Digital Man to Mlong on Mon Oct 12 2020 06:23 pm

>   Re: Re: UIFC Issue
>   By: Mlong to Mlong on Mon Oct 12 2020 02:46 pm
>
>  > Here's how I am dealing with this weirdness, if it gives you any hints as
>  > to what is wrong in the source:
>
>  >  if (selection&MSK_GET) {
>  >      // actually put ctrl-x
>  >      selection ^= 0x50000000;
>  >      uifc.msg("You pasted into index " + selection);
>  >  } else if (selection&MSK_PUT) {
>  >      // actually get ctrl-v
>  >      selection ^= MSK_PUT;
>  >      uifc.msg("You copied from index " + selection);
>  >  }
>
> The proper way (if it works, which I don't know has been confirmed in JS):
> would be like this:
>         if ((sleection & MSK_ON) == MSK_COPY) {
>             selection &= MSK_OFF;
>             uifc.msg("You copied from index" + seleection);
>         }
> There have been issues in the past with JS numbers > 0x7fffffff, so it's
> possible there might be a hitch that needs to be resolved before it works
> 100% for you. Let me know how you fare,

I played around with JS uifc the copy/cut/paste mode flags and it seemed to work as expected. Here's a little test script I wrote, if it's of any help:

load("uifcdefs.js");
if(!uifc.init("Test app"))
   exit(-1);
js.on_exit("uifc.bail()");
do {
   var selection = uifc.list(WIN_CUT|WIN_COPY|WIN_PASTE, "test", ["one",
      "two", "three"]);
   uifc.msg(format("selection = %x", selection));
} while(selection != -1);


                                           digital man

Synchronet "Real Fact" #94:
Synchronet v3.16c was released in August of 2015 (5 years after v3.15b).
Norco, CA WX: 85.0�F, 32.0% humidity, 8 mph E wind, 0.00 inches rain/24hrs

---
� Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net