Simple extension to edit current transaction

sjperry's Avatar

sjperry

20 Apr, 2025 02:42 PM

I have a type of transaction I do frequently that I would like to have the information entered and formatted a specific way for reporting purposes. I want to dip my toes in the water of building a (hopefully) fairly simple extension.

While editing a downloaded transaction in the register, I would like to be able to click a button to bring up a window. The code would perform certain edits to the downloaded info - remove some static text from the description, set split categories and amounts according to my choices on a couple of dropdown lists, and save the updates when I click OK. I don't need access to the database as a whole, just the one transaction I am editing. The dropdown options don't change often and I am fine with hardcoding those.

Looks like I can choose between Java and Python? I'm good either way, but have some experience with Java. I looked at the MD developer info and the resources from Stuart Beesley and Mike Bray and didn't see anything that seemed similar. Are there any good examples I could use as a starting point?

  1. 1 Posted by Stuart Beesley ... on 20 Apr, 2025 06:50 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    If you have the choice, go with straight Java.

    Your options will be right click then select your extension from the context menu, or click menu/extensions/your extension to edit the selected txn.

    You will have to use basic swing GUI for the UI.

    The rest will be easy.

    The first question is whether you can get a simple extension built?

  2. 2 Posted by sjperry on 20 Apr, 2025 08:09 PM

    sjperry's Avatar

    Thanks! What you said (right click and select the extension to run it) sounds good. I have done Java/Swing but it's been about 20 years ;-) It sounds doable but if you know of any relevant Java example I can look at that would be very helpful.

  3. 3 Posted by Stuart Beesley ... on 20 Apr, 2025 08:42 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Have you looked in the moneydance_open repo? Perhaps the priceui extension to get something started?

    https://github.com/TheInfiniteKind/moneydance_open/blob/main/src/co...

  4. 4 Posted by sjperry on 20 Apr, 2025 11:13 PM

    sjperry's Avatar

    JPanels JCheckboxes and JLabels oh my! As I mentioned it's been a minute since I've done Swing but I am getting back up to speed. This looks like the sort of thing I was looking for, i.e. Java code to pop open a window, do some edits and save the result. I'm sure I'll have more questions but for now, Thanks!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

25 May, 2025 02:05 AM
25 May, 2025 02:02 AM
25 May, 2025 01:27 AM
24 May, 2025 10:43 PM
24 May, 2025 10:42 PM