lib/dde/monitor.rb in dde-0.2.8 vs lib/dde/monitor.rb in dde-0.2.9
- old
+ new
@@ -4,20 +4,21 @@
class Monitor < App
attr_accessor :print, :calls
# Creates new DDE monitor instance
- def initialize(init_flags=nil, &callback)
+ def initialize(init_flags=nil, print = nil, &callback)
init_flags ||=
APPCLASS_MONITOR | # this is monitor
MF_CALLBACKS | # monitor callback functions
MF_CONV | # monitor conversation data
MF_ERRORS | # monitor DDEML errors
MF_HSZ_INFO | # monitor data handle activity
MF_LINKS | # monitor advise loops
MF_POSTMSGS | # monitor posted DDE messages
MF_SENDMSGS # monitor sent DDE messages
+ @print = print
@calls = []
callback ||= lambda do |*args|
time = Time.now.strftime('%T.%6N')
values = extract_values(*args)
\ No newline at end of file