trippdoctor Posted February 3, 2008 Share Posted February 3, 2008 Hello nice Job! Quote Trippdoctor | PDN Fanatics | Get Paint .NET Link to comment Share on other sites More sharing options...
Fisherman's Friend Posted February 3, 2008 Share Posted February 3, 2008 I still get the same error. Also, you don't use the appropriate namespaces for the submenus. For 3.10, there was an update which allows to use special, "self-localizing" namespaces for submenus. If you switch your PDN-language to e. g. French, you will get an "Distort" submenu (in English) containing your distortion effects. I think the problem is that the appropriate strings are not listed in any kind of documentation. Note: "Color" has no special namespace as it's plugin unique and no built in submenu. "Distort" has one. I don't know if "Render" has one, but I believe "yes" since 3.20. Quote Link to comment Share on other sites More sharing options...
MadJik Posted February 4, 2008 Share Posted February 4, 2008 The full message I have when I want to use Equations... Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Fisherman's Friend Posted February 4, 2008 Share Posted February 4, 2008 Here's mine: ("Bezeichner erwartet" = "Expression expected" (?)) PS: I switched my language (of PDN) to English. Quote Link to comment Share on other sites More sharing options...
Andrew D Posted February 4, 2008 Share Posted February 4, 2008 Maybe can we look at the source code, allowing us to track down the problem? Quote Link to comment Share on other sites More sharing options...
Fisherman's Friend Posted February 8, 2008 Share Posted February 8, 2008 Maybe somebody could be so kind to post a "before - after" image concerning the Equations effect? I can imagine how it looks, but I want to see it with my own eyes. Quote Link to comment Share on other sites More sharing options...
Curtis Posted February 9, 2008 Author Share Posted February 9, 2008 OK, so I have finished and am satisfied with this update so I have posted in my first post, I don't know if those of you who get that error will still get it, I made changes that will hopefully fix it but they might not, so if you still get errors from it I will post the source for you guys to look through. Fisherman's Friend, here is a shot of it from the newest version with default settings but with shading turned on, it started with a blank white canvas and added everything else. Quote Plugins Link to comment Share on other sites More sharing options...
vista? Posted February 9, 2008 Share Posted February 9, 2008 once again, well done, thx for the updates. I see you've used 1 DLL for 4 separate plugins like Ed Harvey does in his plugin pack. What more, you've got icons! Thx for all the work you've done so far! Quote Link to comment Share on other sites More sharing options...
MadJik Posted February 9, 2008 Share Posted February 9, 2008 Still having the error message with equation I've also tryied y=1 ! = error! Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
MiguelPereira Posted February 9, 2008 Share Posted February 9, 2008 same error as above, (still I mean) Quote [The stock on my sig is a photo I took not a render from Splatter] [My deviantART][My Gallery][My Space] Link to comment Share on other sites More sharing options...
Curtis Posted February 9, 2008 Author Share Posted February 9, 2008 Still having the error message with equation I've also tryied y=1 ! = error! If you still get that message then no equations will work so those two errors aren't separate things. I was hoping I had fixed it but it appears not so I will attach the source to my first post so you can have a look, just a second, I'll go zip it. Edit- OK, the source code is now attached on my first post. Quote Plugins Link to comment Share on other sites More sharing options...
MadJik Posted February 9, 2008 Share Posted February 9, 2008 This is a highier level of coding in CSharp than I actually have... It shows me I really need to learn more... Anyhow, I've try to find the error... I've added a line string error = err.ErrorText; listErrors.Items.Add(error); if (error.Contains("Invalid") || error.Contains("expected")) { error = "Make sure you aren't missing or have any unnecessary characters"; } and it gives the internal error : Identifier expected Perhaps it tells you something! Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Curtis Posted February 9, 2008 Author Share Posted February 9, 2008 This is a highier level of coding in CSharp than I actually have... It shows me I really need to learn more...Anyhow, I've try to find the error... I've added a line string error = err.ErrorText; listErrors.Items.Add(error); if (error.Contains("Invalid") || error.Contains("expected")) { error = "Make sure you aren't missing or have any unnecessary characters"; } and it gives the internal error : Identifier expected Perhaps it tells you something! I don't know thats it, that error is caused by errors in compiling the equation, and that specific if() block is when you type something like "x+" instead of "x+10", if you did that normally it would say "; expected" so I changed that error text to something that made sence to the user. The error you get is from the build method throwing an exception and catching it down the bottom, notice the "Internal Error:" at the start which matches the text in the images that have been posted. Somewhere between there and the end of the Build() method it is throwing another exception. catch (Exception exc) { update = false; userScriptObject = null; userAssembly = null; result = null; listErrors.Items.Add("Internal Error: " + exc.ToString()); } Just out of curiosity, what happens when you comment out that line ("error = "Make sure...") and then run the plugin, it might say something more descriptive, I don't know, could you try that if you get a chance? Quote Plugins Link to comment Share on other sites More sharing options...
MadJik Posted February 9, 2008 Share Posted February 9, 2008 Get it! Creating the code for the effect: + " int TWOFUNCTIONEQUATION = " + (int)EquationType.Parametric + ";\n" + " int POLAREQUATION = " + (int)EquationType.Polar + ";\n" + " double scalx = " + (double)sliderBoxComboXScaling.Value + "/100.0;\n" + " double scaly = " + (double)sliderBoxComboYScaling.Value + "/100.0;\n" + " double startAngle = " + (double)numericUpDownStartTheta.Value + ";\n" + " double endAngle = " + (double)numericUpDownEndTheta.Value + ";\n" + " double initAngle = " + (double)numericUpDownInitAngle.Value + ";\n" + " double dtheta = " + (double)numericUpDownDTheta.Value + ";\n" + " int equationType = " + (int)equationType + ";\n" + " if(equationType == NORMALEQUATION)\n" Result code to compile: double endAngle = 6,293; double initAngle = 0; double dtheta = 0,01; The comma should be a dot! Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Andrew D Posted February 9, 2008 Share Posted February 9, 2008 I think I may have found a bug, although it may not be. Why does using tan create arrows automatically? Quote Link to comment Share on other sites More sharing options...
Curtis Posted February 9, 2008 Author Share Posted February 9, 2008 Get it!Creating the code for the effect: + " int TWOFUNCTIONEQUATION = " + (int)EquationType.Parametric + ";\n" + " int POLAREQUATION = " + (int)EquationType.Polar + ";\n" + " double scalx = " + (double)sliderBoxComboXScaling.Value + "/100.0;\n" + " double scaly = " + (double)sliderBoxComboYScaling.Value + "/100.0;\n" + " double startAngle = " + (double)numericUpDownStartTheta.Value + ";\n" + " double endAngle = " + (double)numericUpDownEndTheta.Value + ";\n" + " double initAngle = " + (double)numericUpDownInitAngle.Value + ";\n" + " double dtheta = " + (double)numericUpDownDTheta.Value + ";\n" + " int equationType = " + (int)equationType + ";\n" + " if(equationType == NORMALEQUATION)\n" Result code to compile: double endAngle = 6,293; double initAngle = 0; double dtheta = 0,01; The comma should be a dot! Ah, that makes sence, so the numericUpDowns are localized to use "," as decimal points, that should be fixable, I think. I think I have an idea on how to fix that, hold on, I'll post a new dll soon for you to test. I think I may have found a bug, although it may not be. Why does using tan create arrows automatically? Like I said in my First post, the arrow working out code isn't perfect, basically how it works now is that the equation is made up of a series of lines, where the x value is incremented by 1 and the y value is determined by your equation, when it draws the equation it draws a line between each point and the next one. How it works out where to put the arrows is if one point lies within the canvas and the other is outside, then it knows there should be an arrow there, tan functions and other steep functions are so steep that from one x value to the next they go from very small, to completely out of the canvas so it thinks it should draw an arrow at the bottom. As it currently stands, it does not recognise that it is a steep curve so it thinks that the point lies outside the canvas because the curve is at the edge when in fact it isn't. Does that make sence or am I just rambling? Edit- OK, so I have made a couple changes to fix the problem MadJik pointed out, if you are one of the people who get that error would you mind downloading the updated version on the first page that might fix the problem and letting me know if that fixes it, thanks. Quote Plugins Link to comment Share on other sites More sharing options...
MadJik Posted February 9, 2008 Share Posted February 9, 2008 I still have the error! You should try a function like this: private string DoubleToString(double value) { string s; s = value + String.Empty; s = s.Replace(",", "."); return s; } and change the code to: + " double scalx = " + DoubleToString((double)sliderBoxComboXScaling.Value) + "/100.0;\n" + " double scaly = " + DoubleToString((double)sliderBoxComboYScaling.Value) + "/100.0;\n" + " double startAngle = " + DoubleToString((double)numericUpDownStartTheta.Value) + ";\n" + " double endAngle = " + DoubleToString((double)numericUpDownEndTheta.Value) + ";\n" + " double initAngle = " + DoubleToString((double)numericUpDownInitAngle.Value) + ";\n" + " double dtheta = " + DoubleToString((double)numericUpDownDTheta.Value) + ";\n" and it works! (tested!) Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Curtis Posted February 9, 2008 Author Share Posted February 9, 2008 I still have the error! You should try a function like this: private string DoubleToString(double value) { string s; s = value + String.Empty; s = s.Replace(",", "."); return s; } and change the code to: + " double scalx = " + DoubleToString((double)sliderBoxComboXScaling.Value) + "/100.0;\n" + " double scaly = " + DoubleToString((double)sliderBoxComboYScaling.Value) + "/100.0;\n" + " double startAngle = " + DoubleToString((double)numericUpDownStartTheta.Value) + ";\n" + " double endAngle = " + DoubleToString((double)numericUpDownEndTheta.Value) + ";\n" + " double initAngle = " + DoubleToString((double)numericUpDownInitAngle.Value) + ";\n" + " double dtheta = " + DoubleToString((double)numericUpDownDTheta.Value) + ";\n" and it works! (tested!) Yeah, before you posted that I actually tried that, but now after looking at it I realise I forgot the "s=" in the replace method method, i wrote private string DoubleToString(double d) { string s = "" + d; s.Replace(",", "."); return s; } OK, I will update the main post with the new version which should now work for everyone, thanks MadJik. Quote Plugins Link to comment Share on other sites More sharing options...
Fisherman's Friend Posted February 9, 2008 Share Posted February 9, 2008 Now I get just: "Bezeichner erwartet. Bezeichner erwartet." = "Identifier expected. Identifier expected." Oh, and thanks you moved it to the localized submenus . Quote Link to comment Share on other sites More sharing options...
Curtis Posted February 9, 2008 Author Share Posted February 9, 2008 Now I get just: "Bezeichner erwartet. Bezeichner erwartet." = "Identifier expected. Identifier expected."Oh, and thanks you moved it to the localized submenus . You downloaded the old version before I updated the main post. The fixed version is now up, try it and let me know. Quote Plugins Link to comment Share on other sites More sharing options...
Fisherman's Friend Posted February 10, 2008 Share Posted February 10, 2008 It works. Quote Link to comment Share on other sites More sharing options...
mamabeginner Posted March 16, 2008 Share Posted March 16, 2008 awesome! I got them YAY!! Quote Link to comment Share on other sites More sharing options...
Bob Posted March 17, 2008 Share Posted March 17, 2008 OMG Someone finally made an equation plugin OMGOMGOMG Quote No. Way. I've just seen Bob. And... *poof!*—just like that—he disappears into the mist again. ~Helio Link to comment Share on other sites More sharing options...
Curtis Posted March 23, 2008 Author Share Posted March 23, 2008 Ok, so yesterday I was fiddling around with the CodeLab source code trying to build my own C# syntax coloured text box, and, well, I have nearly finished that and the results are pretty good, you can check it out here if your interested. It does still have some problems though, I bet if you look at that image long enough you'll find them. But anyway, thats not why I'm posting. After a little playing around, I managed to make a version of the text box that colours your equation text. So I was just wondering what your thoughts would be on including this in the next update. Here is an example of what it looks like. The reason I think it would be useful is that because it colours functions, constants, variables and operators, if you make a typo it will stay black and so will be easier to find when you get an error. Note that if your equation is longer than the box is and you hold down the delete key it can get a little slow, but that only happens if your equation is longer than the text box is, all regular typing is fine. So, Your thoughts? Quote Plugins Link to comment Share on other sites More sharing options...
MiguelPereira Posted March 23, 2008 Share Posted March 23, 2008 you should talk with BoltBait to see what his thoughts are on your mods of codelab, I like it the equations update is fine you should do it too Quote [The stock on my sig is a photo I took not a render from Splatter] [My deviantART][My Gallery][My Space] 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.