Posted to tcl by centrix at Wed Sep 25 07:07:24 GMT 2019view raw

  1. proc ::writeToUserLog { txmsg } {
  2. set this_proc [lindex [info level 0] 0]
  3. __debug "INFO|$this_proc|Writing a line to app logfile..."
  4. if [ info exists ::userLogFile ] {
  5. if { [catch { open ${::userLogFile} a } f] } {
  6. __debug "ERR|$this_proc|open to write to '$::userLogFile':$f"
  7. return 0
  8. }
  9. set now [clock format [clock seconds] -format "%m/%d/%Y %T"]
  10. puts $f "$now|$txmsg"
  11. close $f
  12. }
  13. return 1
  14. }
  15.  
  16.  
  17.  
  18. itcl::body WorkTableDetail::constructor {} {
  19. ...
  20. ::writeToUserLog "INFO|procedureXYZ|text1"
  21. }
  22.  
  23. #############
  24. invalid command name "::writeToUserLog"
  25. invalid command name "::writeToUserLog"
  26. while executing
  27. "::writeToUserLog "INFO|$_this_proc|Setting widgets based on roles.""
  28. while constructing object "::.work_table_report_assDetail.detail" in ::WorkTableDetail::constructor (body line 34)
  29. invoked from within
  30. "$itk_option(-detailclass) $detailObject $_reportName $this $_resultWidget"
  31. ...
  32.