Rick Brewster

CodeLab v2.21 (for advanced users) Released June 7, 2017

550 posts in this topic

The source for CodeLab is in the 'extras' folder of the Paint.NET source... Read the first post
Doh! :oops:
0

Share this post


Link to post
Share on other sites

OK, I fixed all the bugs/enhancement requests in CodeLab.

Download the "Alpha 2" CodeLab here:

http://boltbait.googlepages.com/codelab

I figured, if I'm going to start writing my own UI's for the scripts I write, I might as well start by fixing CodeLab... :D

0

Share this post


Link to post
Share on other sites

Hmmm, it doesn't seem to work on my end.

1) When I click on Load Source, I choose a script (one from the samples folder from CodeLab_2_6) and nothing happens.

2) When I click on the Clear button it doesn't clear the text in the window.

0

Share this post


Link to post
Share on other sites

Really? What version of Paint.NET are you running?

I built this with the latest 3.0 references.

0

Share this post


Link to post
Share on other sites

Speaking of it, I just crashed PDN playing with a code.

Is there any way to save or restore any of my 5 unsaved files?

EDIT: I attempt to close it, and it asks me if I want to save. I save all of them until I reach the one that I really need. It does the crash log thing, and here it is:

This text file was created because Paint.NET crashed.
Please e-mail this file to paint.net@hotmail.com so we can diagnose and fix the problem.

Application version: Paint.NET v3.0 (Release Candidate 1 Release build 3.0.2574.35172)
Time of crash: 1/21/2007 11:02:17 PM
Application uptime: 1.07:40:07.6875000
OS Version: 5.1.2600.131072 Service Pack 2 Workstation x86
.NET Framework version: 2.0.50727.42 x86
Processor: 1x AMD Athlon(tm) 64 Processor 3500+
Physical memory: 894 MB
Tablet PC: no
Locale: pdnr.c: en-US, hklm: en-US, hkcu: n/a, cc: en-US, cuic: en-US

Exception details:
System.InvalidOperationException: ScratchSurface already borrowed: 'PaintDotNet.Menus.EffectsMenu.RunEffect() using scratch surface for rendering during configuration' (trying to borrow for: 'MoveTool: Tool.Activate()')
  at PaintDotNet.DocumentWorkspace.BorrowScratchSurface(String reason)
  at PaintDotNet.Tool.Activate()
  at PaintDotNet.DocumentWorkspace.SetTool(Tool copyMe)
  at PaintDotNet.DocumentWorkspace.SetToolFromType(Type toolType)
  at PaintDotNet.AppWorkspace.OnActiveDocumentWorkspaceChanged()
  at PaintDotNet.AppWorkspace.set_ActiveDocumentWorkspace(DocumentWorkspace value)
  at PaintDotNet.AppWorkspace.RemoveDocumentWorkspace(DocumentWorkspace documentWorkspace)
  at PaintDotNet.Actions.CloseAllWorkspacesAction.PerformAction(AppWorkspace appWorkspace)
  at PaintDotNet.AppWorkspace.PerformAction(AppWorkspaceAction performMe)
  at PaintDotNet.MainForm.OnClosing(CancelEventArgs e)
  at System.Windows.Forms.Form.WmClose(Message& m)
  at System.Windows.Forms.Form.WndProc(Message& m)
  at PaintDotNet.PdnBaseForm.OurWndProc(Message& m)
  at PaintDotNet.PdnBaseForm.WndProc(Message& m)
  at PaintDotNet.MainForm.WndProc(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
------------------------------------------------------------------------------

I'm not ready to say ok until I know if I can get some of this file back.

0

Share this post


Link to post
Share on other sites
RC1 build 3.0.2574.35172

Weird, that's the same build I'm running.

0

Share this post


Link to post
Share on other sites

I did some more trials with and found that if I hit the "clear" button before trying to load a script, the script will not load. If I load a script without hitting the "clear" button, the script loads fine. If I load a script then hit clear and then try to load a script again, the script will not load. It seems there is something going on with the "clear" button.

0

Share this post


Link to post
Share on other sites

Thanks! I'll check it out.

EDIT: Yeah, that clear button is messed up. :(

*digs around* I'm thinking that bug's been in there for a while...

OK, I fixed that bug and updated the dll on my site:

http://boltbait.googlepages.com/codelab

BuzzKill, please update and let me know if it fixes the problem for you.

0

Share this post


Link to post
Share on other sites

*updating*...

*testing*...

All seems well. Pressing the "Clear" button before loading a script no longer prevents the script from loading. After a script is loaded, hitting the "Clear" button clears out the current script.

Looks like you got it. Problem solved.

Thanks!

0

Share this post


Link to post
Share on other sites

Maybe you could change your effect's name to avoid confusion.

0

Share this post


Link to post
Share on other sites
Maybe you could change your effect's name to avoid confusion.

What 'confusion'?

What I did was upgrade CodeLab, not create a new, different CodeLab--it replaces CodeLab.

But, if you want to know if you are running the original CodeLab or my upgraded CodeLab, just look at its title bar. The original is "Alpha" and mine is "Alpha 2".

0

Share this post


Link to post
Share on other sites

Your dll appends your alpha2 verison to the original, right? if so, when you open the effects window you have two listings for codelab with no distinction. I think that is the confusion he is talking about.

0

Share this post


Link to post
Share on other sites

the .dll is named the same as the original. When pasting or extracting to the effect folder, Windows wil ask you if you want to replace the original with the newer one.

0

Share this post


Link to post
Share on other sites

Yeah, but even if you replace the old one it still shows up in PDN. I even tried uninstalling PDN and just loading Boltbait's after the reinstall...both still show up.

0

Share this post


Link to post
Share on other sites

I would recommend looking in your Effects folder to see if perhaps you have two CodeLab.dll files located in there.

CodeLab.dll, CodeLab(2).dll, etc.

0

Share this post


Link to post
Share on other sites

I mean by confusion the fact that it's not Tom, the original author of the codelab plugin, who update it. For example how would you manage bugs reports, see from which version did they come? Sth like "BoltBait's Codelab" will be fine for me.

But it's just my 2 cents, do whatever you want :)

0

Share this post


Link to post
Share on other sites

I don't believe Tom is planning any future updates to the CodeLab tool.

So, I took it and fixed a bunch of bugs/enhancement requests.

When I'm done putting in the stuff I want to do (I'm trying to figure out how to make it include an icon) I will publish my source code. If Tom wants to publish an "official" update incorporating some/all of my changes, he is free to do that. In the mean time, at least *I* will enjoy a better working CodeLab--and you can too, as I like to share.

Oh, and as I said in a previous post, my version says "Alpha 2" in the title bar of the code editor. Tom's only says "Alpha". So, it isn't too hard to tell them apart.

0

Share this post


Link to post
Share on other sites

BB,

any chance you'll be releasing the (enhanced) codelab source code? I've been playing with the idea to include some basic autocompletion facility....(no promises here, though)

0

Share this post


Link to post
Share on other sites
BB,

any chance you'll be releasing the (enhanced) codelab source code? I've been playing with the idea to include some basic autocompletion facility....(no promises here, though)

Yes, I will release the source once I finish my changes.

I still want to add the ability to include a custom icon and submenu organization.

BTW, I've done some research about including an icon and it looks fairly easy. I just need to find some time to implement it. Also, putting effects into submenus is easy.

I'm working on another effect at the moment.

0

Share this post


Link to post
Share on other sites

OK, I have made another large update to CodeLab.

You can now specify a menu icon, and a submenu name for your built DLL's.

Here is a screen shot of CodeLab just after pressing the Make DLL button and selecting an icon:

Oops! Where'd that screenshot go? :cry:

You can download the new dll here: http://boltbait.googlepages.com/codelab

By the way, if you store your PNG file (with the same name as your .cs file) in the C:/Program Files/Paint.NET/Effects folder, the dialog box will pick them up for you automatically.

Oh, and I fixed a bug where CodeLab would not report errors while building a DLL.

And, with that, I think I've implemented just about everything people have asked for. So, I'll be publishing the source code soon.

EDIT: Hmmm... wonder if I could set it up to support some type of UI creation... ;)

0

Share this post


Link to post
Share on other sites
EDIT: Hmmm... wonder if I could set it up to support some type of UI creation... ;)

That would be great!

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now