Options

Problems removing caption from image?

pe2smugmugpe2smugmug Registered Users Posts: 53 Big grins
So I'm not sure if I'm making the call wrong, but to remove a caption from an image, I have been using
smugmug.images.changeSettings, and setting the "Caption" argument to be a string of length 0, but this doesn't seem to have any effect for me.

I'm using the JSON interface on 1.2.0.

Has anyone encountered this before or is it more likely a bug in my code?

Thanks,
Evan

Comments

  • Options
    pe2smugmugpe2smugmug Registered Users Posts: 53 Big grins
    edited January 13, 2008
    So some additional testing reveals that if I set the caption to a single space (ie. " "), then the caption appears to be properly deleted. Additional calls to get the caption show it to be saved as an empty string "".

    Is this standard was for deleting a string?
  • Options
    flyingdutchieflyingdutchie Registered Users Posts: 1,286 Major grins
    edited January 13, 2008
    pe2smugmug wrote:
    So some additional testing reveals that if I set the caption to a single space (ie. " "), then the caption appears to be properly deleted. Additional calls to get the caption show it to be saved as an empty string "".

    Is this standard was for deleting a string?

    Sending null or an empty string for many values ususally means: Do not update the string, leave it as it is.

    Same for an image's caption: Sending an empty string for Caption means "Don't update caption, leave it as it is."
    I can't grasp the notion of time.

    When I hear the earth will melt into the sun,
    in two billion years,
    all I can think is:
        "Will that be on a Monday?"
    ==========================
    http://www.streetsofboston.com
    http://blog.antonspaans.com
  • Options
    pe2smugmugpe2smugmug Registered Users Posts: 53 Big grins
    edited January 13, 2008
    Sending null or an empty string for many values ususally means: Do not update the string, leave it as it is.

    Same for an image's caption: Sending an empty string for Caption means "Don't update caption, leave it as it is."

    So what is the "correct" method for clearning a caption?
Sign In or Register to comment.