Few days ago, I copy/pasted som code from a KB on dynic browse, but for some reason I can't find, my triggers won't fire.
This is the code
CREATE BROWSE hBrowse ASSIGN X = 25 Y = 100 WIDTH = 150 DOWN = 18 FRAME = FRAME {&frame-name}:handle READ-ONLY = YES SENSITIVE = TRUE ROW-MARKERS = TRUE SEPARATORS = TRUE FIT-LAST-COLUMN = TRUE FONT = 1 TRIGGERS: ON DEFAULT-ACTION DO: hBrowse:SELECT-FOCUSED-ROW (). RUN func\Detener.w(ttFiles.resultado, 2). END. ON MOUSE-SELECT-UP DO: hBrowse:SELECT-FOCUSED-ROW (). RUN func\Detener.w(ttFiles.resultado, 2). END. ON VALUE-CHANGED DO: ASSIGN fEdit = ttFiles.resultado. DISPLAY fEdit WITH FRAME {&FRAME-NAME}. END. ON ROW-ENTRY DO: ASSIGN fEdit = ttFiles.resultado. DISPLAY fEdit WITH FRAME {&FRAME-NAME}. END. END TRIGGERS. CREATE QUERY hQuery. hQuery:SET-BUFFERS(BUFFER ttFiles:handle).
Any insight will be very appreciated
Comment out the MOUSE-SELECT-UP trigger and see what happens. Whether that helps or not, handling mouse down/up events is really not a good idea. It messes up the normally handling of mouse selection/focus. I don’t see why you’d need that anyway. The browse will take care of itself by default when you click on a row.
Is that all the code? The browse needs to be in a frame and you need an I/O blocking statement, like a WAIT-FOR in order for these kind of events to fire.
Sorry I'm so naive. It is not the code... it is functional up to the point of firing triggers. even the browse gets filled from data I got from app server...
Comment out the MOUSE-SELECT-UP trigger and see what happens. Whether that helps or not, handling mouse down/up events is really not a good idea. It messes up the normally handling of mouse selection/focus. I don’t see why you’d need that anyway. The browse will take care of itself by default when you click on a row.
Thanks Laura!!! I missed that point.. the event was meant to be MOUSE-SELECT-DBLCLICK
Any way....
The solution to this problem... Is the same solution you all guys gave me three years ago!!
community.progress.com/.../15890
I haven't had another need until now...
Thanks!!!