nomad-software / tkd

GUI toolkit for the D programming language based on Tcl/Tk
MIT License
117 stars 16 forks source link

Statically check for args before trying to use format #29

Closed callumenator closed 9 years ago

callumenator commented 9 years ago

Something like this is needed in cases where the caller has already formatted the eval string, but that formatted string still contains format specifiers, ie:

auto text = "{ %s %s %s }";
this._tk.eval(`%s insert end "%s"`.format(this.id, escape(text)));
nomad-software commented 9 years ago

Thanks.

nomad-software commented 9 years ago

I pulled this and then tested it (wrong way round lol :octocat:) I've reverted it for now.

There is an issue with enabling interpreter logging and orphan format specifiers. See https://github.com/nomad-software/tkd#debugging Fix that then re-submit.

callumenator commented 9 years ago

That issue was already there, it's the same as this one but in a different place :) Will extend it to the logger as well.