Updated 2014-06-30 09:32:41 by oehhar

Access an image type hoto element by C

Man page from TCL 8.6

  Photo not found error

HaO 2014-06-30 The command does not leave an error message in the interpreter if the photo was not found.

Thus error code could be something like:
 if ( NULL == (hPhoto = Tk_FindPhoto(interp, Tcl_GetString(objv[3])))) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("Unknown photo", -1));
return TCL_ERROR;