Good evening Jafar, See comment below
On 12/11/16 16:00, Jafar Al-Gharaibeh wrote: > My comment below. > > On Fri, Nov 11, 2016 at 9:59 PM, Bruce & Breeanna Rennie > <[email protected] <mailto:[email protected]>> wrote: > > Good afternoon to all, > > I have modified the original example program that Steve submitted > to the following > > procedure main() > local w, el := list(), pl := list() > w := open("resize", "g", "size=400,400", "resize=on") > while push(pl,Pending(w)) do { > push(el,Event(w)) > x := WAttrib(w, "width"); > WAttrib(w, "size="||x||","||x) > write("pl:", ximage(pl)) > write("el:", ximage(el)) > } > close(w) > end > > link ximage > > > When I run this with the following command line > > test021 >test021.out > > I get the output as shown in the attached file. When one looks at > the file, one notices that Pending() returns the same list each > time and not a new list. > > > That is correct. Pending() returns the window's event queue if the > queue has any events, otherwise it fails. You could replace the while > push above with L := Pending() and you'd have access to the event > queue directly. each event code in the list is followed by the x/y > mouse pointer location - I think - of where the event took place. You > can also create artificial event by pushing values directly to the > list or via Pending() itself something like: > > Pending(w, -10, 100, 200) Pending() is NOT failing. It is blocking - not returning at all until there is or are events. If you look at the attached output file, the data suggests that Pending() is also returning lists of length 0. This is why I was able to remove the repeat {} loop from the original code. I actually had both write statements after the while loop but inside the repeat loop and neither was executed. From what you have said, the expected results from Pending() is not quite matching the actual results obtained. I have tried looking through the RTL code but as yet I have not been able to find the relevant section. It will be at least 3 to 4 days (at present) before I can devote any time to looking at this further. regards Bruce Rennie > > --Jafar > > The values contained in this list are updated by Pending(). When > it starts its good vibration mode, on each call it returns the > alternate extremes. The other thing noticed is that Pending() > appears to block while waiting to return some events. > > regards to all > > Bruce Rennie > ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ Unicon-group mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/unicon-group
