[haiku-commits] Re: r34140 - haiku/trunk/src/apps/screenshot

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 20 Nov 2009 11:07:37 +0100

Fredrik Modèen <fredrik@xxxxxxxxx> wrote:
> >> It did work, or if I moved to the define before I tested it, don't
> >> remember.
> > But you know that translators aren't fixed, right? You can add and
> > remove translators as you choose, so while this solution would have
> > worked in your particular setup (or a clean Haiku image), it's
> > still a
> > pretty much brain dead solution. Sorry for being harsh, but I'm
> > really
> > a bit appalled.
> Yes I know. I Didn't thought about how to handle if a translator
> didn't
> exist. I thought those things was already taken care of in the
> original
> code, but perhaps one should,'t taken things for given :)

Not sure if you got the point yet: the translator ID is something chosen
at runtime - it will differ if the translators are different. IOW what
has ID '8' on your system could have ID '4' on mine.
I think you should really just follow what "translate" is doing - this
is completely generic, and you are able to choose translators the app
writer didn't think of before.

> and now I know a new word "appalled"

Always look on the bright side ;-)

> Perhaps a error message should be shown stating that a translator for
> the
> given format don't exist before trying to make a ScreenshotWindow?

I think if you are using command line options, no window should be
shown ever, anyway. The whole point of command line options are to be
able to use the command from a script. And does normally simply exclude
any GUI.

Bye,
   Axel.


Other related posts: