Tk_FindPhoto

Difference between version 0 and 2 - Previous - Next
Access an image type hoto element by C
[http://www.tcl-lang.tkorg/man/tcl8.6/TkLib/FindPhoto.htm%|%Man page from TCL 8.6%|%]
<<discussion>> **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:

======c
    if (  NULL == (hPhoto = Tk_FindPhoto(interp, Tcl_GetString(objv[3])))) {
        Tcl_SetObjResult(interp, Tcl_NewStringObj("Unknown photo", -1));
        return TCL_ERROR;
    }
======
<<ditagscussion>>Tk_PhotoGetImage

<<categories>>EnterTk CLibrategory Here