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

probing events...

 [1/15] from: media::quazart::com at: 30-Oct-2001 10:17


Hi! trying to decifer the events returned in a detect feel within view's root window... rebol [] print "Running.." view layout [ box 200x200 "A Box" navy feel [ detect: func [face event] [ probe event ] ] ] doesn't print anything... I guess the event system is a "module" or something like that ... thus invisible !? is there a way to run-time decifer what is in the event? I can print first, second, third, fourth, etc but I don't know what their names are or what they are used for... thanks!

 [2/15] from: amicom:sonic at: 30-Oct-2001 7:41


Try: probe reduce [event/1 event/2 ... event/6] -Bo

 [3/15] from: media:quazart at: 31-Oct-2001 11:47


thanks... anyway of knowing the attribute names instead of referencing the object with offsets? -Maxim

 [4/15] from: rotenca:telvia:it at: 31-Oct-2001 18:19


Hi, Media This come from from old doc: http://www.rebolforces.com/archive/view099users.html#HandlingEvents ----------- Event Refinements /type Returns event type. The event types are: 'down, 'middle-down, 'right-down - mouse down event for the left, middle or right mouse button (pressing down on the mouse button) 'up, 'middle-up, 'right-up - mouse up event for the left, middle, or right mouse button (releasing the mouse button) 'move - mouse move event (position of the mouse cursor over a REBOL/View window 'key - keyboard event (keyboard input) 'time - time event (unique time index - latest event has the highest number) 'resize - resize window event (whenever the window is resized) 'close - close window event (exiting the REBOL/View window session) 'active - window active, occurs when window becomes active again after being inactive while another application was active 'inactive - window inactive, occurs when window becomes inactive as when another application becomes active /offset Returns the mouse cursor offset relative to the REBOL/View window. The offset returned has different meaning depending on the event type: 'down, 'middle-down, 'right-down - the offset when the mouse button is pressed. 'up, 'middle-down, 'right-down - the offset when the mouse button is released. 'move - the offset at the moment the mouse is moved. The frequency at which mouse move events are sent to the event port will vary per system. When the mouse cursor is outside the REBOL/View window, no move events are sent to the event port. 'key - the mouse cursor offset at the moment of keyboard input. When the mouse cursor is outside the REBOL/View window and a keyboard event occurs, the offset value will be positive or negative of the current REBOL/View window size. 'time - the offset of the mouse at the moment the event is sent. 'resize - the offset of the mouse as the window is being resized. Resize events are sent every as the window is being resized. /key Returns the ASCII character relative to the event. With 'key events, this returns the character pressed that triggered the event. The only exceptions are the arrow keys Up, Down, Left, Right, and the End and Home keys. These key events are handled internally by REBOL for changing the caret position in edit windows. These key events return word representations. The word representations for the Up, Down, Left, Right, End and Home keys are 'up, 'down, 'left, 'right, 'end or 'home, respectively. For the mouse up and down events as well as 'time , 'resize and 'move, the character returned is always #"^@", which is represented in REBOL as a null character. /control Returns a logic value, true or false, depending on whether the control key is pressed when the event is sent. This works with the mouse up and down events as well as 'move, 'key, 'resize and 'time. /shift Returns a logic value, true or false, depending on whether the shift key is pressed when the event is sent. This works with the mouse up and down events as well as 'move, 'key, 'resize and 'time. /time Returns an integer representing a unique time index for the event. /face Returns the top-level face object of the window that was active when the event occurred. --- Ciao Romano

 [5/15] from: jeff:rebol at: 31-Oct-2001 9:31


Currently there are 7 fields in an event, in order: type key offset time shift control face double-click -jeff
> anyway of knowing the attribute names instead of > referencing the object with offsets?
<<quoted lines omitted: 13>>
> > > trying to decifer the events returned in a detect feel > > > within view's root window...
. . .

 [6/15] from: holger:rebol at: 31-Oct-2001 9:51


On Wed, Oct 31, 2001 at 09:31:41AM -0800, Jeff Kreis wrote:
> Currently there are 7 fields in an event, in order: > > type key offset time shift control face double-click
That's 8 :). Correct description though. -- Holger Kruse [holger--rebol--com]

 [7/15] from: jeff:rebol at: 31-Oct-2001 10:05


Oops.. I must have been using a zero-based counting scheme. (:

 [8/15] from: media:quazart at: 31-Oct-2001 14:47


most usefull... thanks everyone :-) -MAx

 [9/15] from: joel:neely:fedex at: 31-Oct-2001 15:04


Hi, Holger, [holger--rebol--com] wrote:
> On Wed, Oct 31, 2001 at 09:31:41AM -0800, Jeff Kreis wrote: > > > > Currently there are 7 fields in an event, in order: > > > > type key offset time shift control face double-click > > That's 8 :). Correct description though. >
I think Jeff is learning to count in zero-origin fashion! ;-)
> > type key offset time shift control face double-click
0 1 2 3 4 5 6 7 -- This sentence contradicts itself -- no actually it doesn't. -- Doug Hofstadter joel<dot>neely<at>fedex<dot>com

 [10/15] from: ammonjohnson:y:ahoo at: 31-Oct-2001 16:20


Did I see Double-Click in there??? Woe! Why am I using Frank's version??? Does View Really detect Double-Clicks? Thanks!! Ammon

 [11/15] from: rotenca:telvia:it at: 1-Nov-2001 0:26


> Did I see Double-Click in there??? Woe! Why am I using Frank's version??? > Does View Really detect Double-Clicks?
yes, but i didn't find any doc about it, why? --- Ciao Romano

 [12/15] from: holger:rebol at: 31-Oct-2001 15:55


On Wed, Oct 31, 2001 at 04:20:34PM -0700, Ammon Johnson wrote:
> Did I see Double-Click in there??? Woe! Why am I using Frank's version??? > Does View Really detect Double-Clicks?
Yes. For the second click of a double-click the 'double-click field in the event is set to true. -- Holger Kruse [holger--rebol--com]

 [13/15] from: arolls:idatam:au at: 1-Nov-2001 16:12


You haven't written it yet, Romano? I am so disappointed in you! ;) Anton

 [14/15] from: g:santilli:tiscalinet:it at: 1-Nov-2001 12:31


Hello Jeff! On 31-Ott-01, you wrote: JK> Oops.. I must have been using a zero-based counting scheme. JK> (: ROTFL!! Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/

 [15/15] from: rotenca:telvia:it at: 1-Nov-2001 17:11


Hi Anton,
> > > Did I see Double-Click in there??? Woe! Why am I using > > Frank's version???
<<quoted lines omitted: 3>>
> You haven't written it yet, Romano? > I am so disappointed in you!
Sorry. ;-) I was asking if it is legal to use this feature (is it supported under all OS?). Or if it is documented somewhere and i didn't find it.
> ;) Anton
---- Ciao Romano

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted