[Mono-list] Cairo bug?

Brandon Perry bperry.volatile at gmail.com
Mon Oct 22 09:25:35 EDT 2007


Heh, I can't believe I missed that. Thanks.

On Mon, 2007-10-22 at 15:10 +0200, Mike Welham wrote:
> Hi Brandon,
> 
> > I am doing some work with Cairo (gbrainy) and have run across what seems
> > like it would be a bug. I get a System.FormatException crash when
> > attempting to draw a certain puzzle. Here is the code:
> >
> ...
> > //gr.ShowText (String.Format ("  {1}", number_b));
> 
> The braced number in the format string is a zero-based index into the
> argument list that follows.
> 
> You're getting the exception because you're specifying {1}, where you
> only have one argument ({1}, indicates the 2nd argument after the
> format string, {2} would indicate the 3rd).
> 
> Try
> 
> gr.ShowText (String.Format ("  {0}", number_b));
> gr.ShowText (String.Format ("  {0}", number_c));
> etc.
> 
> It should work better
> 
> Regards
> 
> Mike



More information about the Mono-list mailing list