skyoxZ Posted December 9, 2010 Share Posted December 9, 2010 In CodeLab, I code #region UICode Pair<double,double> Amount1=Pair.Create(0.0,0.0); // Position #endregion but get an error when "Save As DLL". You may confirm the problem by coding following http://boltbait.com/pdn/CodeLab/help/uielements.asp -Double Vector. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted December 9, 2010 Share Posted December 9, 2010 Confirmed. The sample code doesn't fly. I don't know that this is the fault of the double vector control. The error I get is: cannot implicitly convert 'int' to 'PaintDotNet.Pair<double,double>' (@BoltBait: Can the error window contents be copied? They seem to be able to be highlighted, just not copied via normal means) Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Rick Brewster Posted December 9, 2010 Share Posted December 9, 2010 If you say "Pair.Create(0, 0)" then the Pair.Create static method will return a Pair<int, int>. This is because "0" by itself is an int, so the inferred types to Pair.Create<T1, T2> are int and int. You can either use "Pair.Create(0.0, 0.0)" (note 0.0) and double will be inferred, or expclitely say "Pair<double, double> x = Pair.Create<double, double>(a, b )". Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Cookies Posted December 9, 2010 Share Posted December 9, 2010 (edited) this one doesnt work (the on posted above)Â Pair<double,double> Amount1=Pair.Create(0.0,0.0); // Position while this works Pair<double, double> Amount1=Pair.Create(0.0,0.0); // Position amazing what 1 space can do Edited December 9, 2010 by Cookies Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted December 9, 2010 Share Posted December 9, 2010 Probably has to do with how CodeLab is parsing that text. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
skyoxZ Posted December 9, 2010 Author Share Posted December 9, 2010 (edited) Cookies(#4) is right. Thx a lot! Edited December 9, 2010 by skyoxZ Quote Link to comment Share on other sites More sharing options...
BoltBait Posted December 9, 2010 Share Posted December 9, 2010 Yup. It is a problem in both my web site and CodeLab. I'll see if I can't fix both. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.