comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » WIDGET_CONTROL, /TIMER
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
WIDGET_CONTROL, /TIMER [message #2414] Tue, 05 July 1994 05:02
knipp is currently offline  knipp
Messages: 68
Registered: January 1993
Member
Hi

I fail to use the WIDGEt_CONTROL, TIMER=x - feature for a regular
update of x-seconds.

What's wrong with the follwing piece of code ?


SNIP vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv


;+
;
; test timer-feature in widgets
;
;-

; ============================================================ =================
; event handling of routine WMX_GTXT

pro wmx_x_event, event


; ------------------------------------------------------------ ------------------
; common for passing parameters between routine and _event

common wmx_x_comm, mbase, done_b


; ------------------------------------------------------------ ------------------
; widget control

name = tag_names (event, /structure_name)

WIDGET_CONTROL, event.id, GET_UVALUE = uvalue

print, systime(0), ': ', uvalue, ' ', name


if uvalue eq 'UPDATE' then print, ' TIMER ... ', systime(0)

; ------------------------------------------------------------ -----------------
; which event

case name of

"WIDGET_BUTTON": begin
if uvalue eq 'DONE' then WIDGET_CONTROL, event.top, /DESTROY
end

"WIDGET_TIMER": print, systime(0)

else: message, name + ' ???? ', /info

endcase


; ------------------------------------------------------------ -----------------
; end of routine_event ( do NOT use return )


end


; ============================================================ =================
; internal main

pro wmx_x, d1, d2


; ------------------------------------------------------------ ------------------
; check input

if n_params() ne 0 then return


; ------------------------------------------------------------ ------------------
; common for passing parameters between routine and _event

common wmx_x_comm, mbase, done_b


; ------------------------------------------------------------ ------------------
; widget, main base


mbase = WIDGET_BASE(/column, $
TITLE='TEST' , $
FRAME=4, UVALUE="UPDATE")


; ------------------------------------------------------------ ------------------
; DONE - button

done_b = WIDGET_BUTTON(mbase, VALUE = "DONE ", UVALUE = "DONE")


; ------------------------------------------------------------ ------------------
; make widget

WIDGET_CONTROL, mbase, /REALIZE, TIMER=0.1


; ------------------------------------------------------------ ------------------
; initializing xmanager

xmanager, 'wmx_x', mbase, EVENT_HANDLER='wmx_x_event'


; return & end ------------------------------------------------------------ ----

return
end



SNAP ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Thank you for your answers,
Karlheinz


____________________________________________________________ __________________
__ ____ __
/ // _ \ / / Karlheinz Knipp phone: +49 511 - 762 4922
/ // /_/ // / University of Hannover fax: +49 511 - 762 2483
/ // ____// / Institute for Photogrammetry
/ // / / / Nienburger Str.1
/_//_/ /_/ FRG 30167 Hannover e-mail: knipp@ipi.uni-hannover.de
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Can't read HELP in Solaris 2.3
Next Topic: Re: Fixed: write_gif problems

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:13:32 PDT 2025

Total time taken to generate the page: 0.00446 seconds