Dataset and project for generating Harbour MiniGUI Extended code with Qwen

142 views
Skip to first unread message

Marcos Jarrin

unread,
Aug 10, 2026, 12:04:35 AM (4 days ago) Aug 10
to Harbour Minigui
Hello everyone,

AI is a tool like any other that has been created, and we must make the most of it in the best possible way.

I have already uploaded the first dataset specifically for Harbour MiniGUI Extended. I hope to soon upload a model so it can be used locally.

The dataset will also help major AIs become familiar with MiniGUI Extended.

While that happens, Qwen can be used as support to create systems more quickly. Currently, the code it generates has many errors, since the only dataset available is designed for FiveWin.

We have the alternative of creating projects for Qwen. I have developed a project that I am currently testing. Here is a small example:

With this prompt, it generated the following module in a single step with no syntax errors. It still has errors; once it is more debugged and tested, I will create a GitHub repository with the files so that anyone can generate MiniGUI Extended code in Qwen.

"Create a program in Harbour MiniGUI Extended for customer entry. Create a basic CRUD, all in a single file. Check if the table exists; if it exists, use it; if not, create it. All in English, English language."

I am attaching the code it generated.

I would appreciate it if you could analyze the code, comment on it, and describe all the errors you find, as this will help me improve the project.

Sincerely,

Marcos Jarrín
pantalla.jpg
customer.prg

Marcos Jarrin

unread,
Aug 10, 2026, 5:54:29 PM (3 days ago) Aug 10
to Harbour Minigui
Hi everyone.

The bugs in the program have been fixed. It wasn't anything too complex, but I wanted the AI to handle it, and with just two prompts I got it working. Here are the prompts I used and the final code.

Prompt 1:
When I click the Edit button, the program crashes. Review it.

Prompt 2:
After deleting an item, the browse view doesn't update automatically, unlike when adding a new one. I have to restart the program to see the changes. Fix this.

Best regards,

Marcos Jarrin
customer.prg

Grigory Filatov

unread,
Aug 11, 2026, 11:22:05 AM (2 days ago) Aug 11
to Harbour Minigui
Hi Marcos,

Thank you for your efforts!

I've attached the updated version with the following modifications.

Change log (v1.0 → v1.1)

  • Rev / Update date bumped to 1.1 / 11/08/2026.
  • Replaced array-based validation state (aState) with named hash hValidState.
  • Replaced array-based vault (aVault + linear scan) with native hash hVault.
  • Merged EnableEdit_n() / DisableEdit_n() into single SetEditState(lEnable).
  • Extracted toolbar navigation into dedicated procedures (NavGoFirst, NavGoBack, NavGoNext, NavGoLast).
  • Switched error handling from ERRORBLOCK / BEGIN SEQUENCE / RECOVER to [x]Harbour TRY / CATCH.
  • Changed regex calls from HB_RegExMatch to hb_regexLike.
  • Simplified T(), VaultGet() (added optional default), and VaultPost().
  • Minor clean-ups: removed duplicate DeleteClient comment block, tightened early-exit guards, added lSuccess flag in AcceptEdit, and streamlined comments/headers.

Hope this is useful for anyone 8-)

Regards,
Grigory

понедельник, 10 августа 2026 г. в 23:54:29 UTC+2, marcos...@gmail.com:
customer_MODIF.prg

Marcos Jarrin

unread,
Aug 12, 2026, 8:10:23 PM (yesterday) Aug 12
to Harbour Minigui
Thank you, Grigory, for your update to the example code I posted.  

I modified the project instructions, and now it generates more efficient and error-free code. I also improved the comments section, which were too repetitive; the reason is that they were created for educational purposes.  

For comparison with the following prompt, I created two programs: one from Qwen as it is currently available, and the other with the project I am currently building.  

Both were created with a single prompt. The first code has errors, is poorly constructed, and has no comments; the second one has no errors and is properly commented.  

"Create a small program in MiniGUI Extended that creates a customer table. If it doesn't exist, create it; if it exists, use it. Insert 10 values and create a browse to view them. Upon exiting, the table must be closed. Everything in English, English language."

Sincerely,  
Marcos Jarrín
customer_qwen_project.prg
customer_qwen.prg

Grigory Filatov

unread,
1:47 AM (21 hours ago) 1:47 AM
to Harbour Minigui
Thank you again for your attention to this matter.

The first example code is preferable as a CRUID demonstration for me.

I've attached the improved version with the following changes for your review.

Change log – Customer Manager (customer.prg) refactor

  • Extracted magic numbers into constants (FORM_FIRST_ROW, FORM_LABEL_COL, FORM_ROW_INCREMENT) and regex patterns (NAME_REGEX, TAXID_REGEX, PHONE_REGEX, EMAIL_REGEX).
  • Improved navigation: added HasClientRecords() guard; safer BOF/EOF handling in NavGoBack/NavGoNext; all navigation now uses RefreshBrowse().
  • Centralized form handling: introduced ClearClientForm(), SaveClientFields(), and ResetValidationState() to remove duplicated field assignment/validation reset logic.
  • Refactored validation into reusable helpers (ValidateRequiredField, ValidateOptionalField) instead of near-identical per-field procedures.
  • Made T(), NextNumber(), VaultGet(), and VaultPost() STATIC for better encapsulation.
  • Minor robustness: extra file-existence check after table creation, safer unlock in CancelEdition, cleaner multi-line statements and section comments.
  • No functional or UI changes; behaviour remains equivalent.
Should this be included in the MiniGUI examples collection?

Best regards,
Grigory

четверг, 13 августа 2026 г. в 02:10:23 UTC+2, marcos...@gmail.com:
customer.prg

Marcos Jarrin

unread,
3:04 PM (8 hours ago) 3:04 PM
to Harbour Minigui
Thank you, Grigory, for the updates and improvements to the code.


"Should this be included in the MiniGUI examples collection?"

Yes.

I am attaching a readme.md file for your consideration; it is a small user manual for the program.

Sincerely,

Marcos Jarrín
readme.md
Reply all
Reply to author
Forward
0 new messages