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

selective view feel...

 [1/8] from: max:quazart at: 23-Nov-2001 6:49


Hi Is it possible to enable event handling JUST for a subset of a window's faces? Say I add a new temporary face to the window's root pane... can I ask the view engine to feel only that face temporarily, or must I try to use the window's detect function and build a filter? this is a little harder since some of the internals of view aren't exactly clear and documented ;-) -Max

 [2/8] from: cyphre::seznam::cz at: 23-Nov-2001 16:13


Hi Max, If I understand properly, you have to make filter either using detect function or make handler using 'insert-event-func...but if you want to filter all feel's events you have to also filter 'time events (by setting 'rate or so...) Some time ago I sugessted Holger to add something like 'freeze 'unfreeze command( see http://www.escribe.com/internet/rebol/m16058.html ). for simplier and recursive selecting to which face(s) should events flow but I haven't got any response...Maybe my idea is wrong but this (or similar) aproach would be very handy not only for your event filtering needs... Regards Cyphre

 [3/8] from: max:quazart at: 23-Nov-2001 11:58


Cyphre, I've already got a detect feel on the window of glass (which re-direcst focus and enables anamonitor and snapshot system), but its quite easy to break since view keeps ressetting the feels of the window without my asking... especially when opening another window... It seems like all windows share the same feel object... ! Is an insert-event-func example available anywhere? Thanks! -MAx

 [4/8] from: rotenca:telvia:it at: 23-Nov-2001 18:42


Hi Maxim
> I've already got a detect feel on the window of glass (which re-direcst > focus and enables anamonitor and snapshot system), but its quite easy to > break since view keeps ressetting the feels of the window without my > asking... especially when opening another window... It seems like all > windows share the same feel object... !
Yes, it is system/view/window-feel. You shoul read the source of View to understand what happens (it is the best and also unique documentation on it)
> Is an insert-event-func example available anywhere?
Look at http://www.rebolforces.com/view-faq.html#sect3.3. BTW, i use it in my AnaMonitor. --- Ciao Romano

 [5/8] from: greggirwin:mindspring at: 23-Nov-2001 11:01


Hi Max, << Is an insert-event-func example available anywhere? >> Here's one someone sent me a while back, can't remember who though...maybe Cyphre or Anton. I stored it out of context and neglected to grab the source. Credit to...whomever. :) my-func: func [f e][probe e/type return e] view layout [ button 200x20 "insert my-func" [ if not find system/view/screen-face/feel/event-funcs :my-func [ insert-event-func :my-func ] ] button 200x20 "remove my-func" [remove-event-func :my-func] ] --Gregg

 [6/8] from: max:quazart at: 23-Nov-2001 13:13


Hi Gregg, nice detection idea, thanks (to you and to whoever) -MAx

 [7/8] from: brett:codeconscious at: 24-Nov-2001 6:47


Hi Max
> Is an insert-event-func example available anywhere?
I have one under the section titled "Window Level Event Handler" in: do http://www.codeconscious.com/rebsite/vid-notes.r There are other scattered later in the same online doc. Caveat - it is a work in (slow) progress. Brett.

 [8/8] from: cyphre:seznam:cz at: 24-Nov-2001 8:31


Hi MAx,
> Is an insert-event-func example available anywhere? >
have a look at: http://www.escribe.com/internet/rebol/m14845.html regards Cyphre