--
Visit our website on https://www.hmgextended.com/ or https://www.hmgextended.org/
---
You received this message because you are subscribed to the Google Groups "Harbour Minigui" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minigui-foru...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/minigui-forum/9e81da29-9c01-4309-a222-b53d6460e7d0n%40googlegroups.com.
--
--
Hello Ronaldo,
Since you didn’t provide the error details or an example, I will address your question directly:
“…I don’t work with forms; I convert the form to a PRG. Could that be the problem?”
Using the form embedded in the PRG or loading it externally does not affect the functionality. The difference is mainly architectural. Embedding the form inside the PRG is generally less organized from a maintenance perspective, as it mixes the presentation layer with business logic. Keeping them separate makes the PRG cleaner and improves overall code readability.
The preprocessor will merge everything before compilation anyway, so the runtime behavior remains the same. Working with FMG forms, however, gives you more flexibility and allows reuse in several different contexts, for example:
Although it is possible to encapsulate this into a single function, the structure above keeps the code more readable and easier to maintain. It’s important to consider that other developers may continue working on the project, so establishing clear and consistent standards helps maintain alignment with common industry practices.
Best regards.
Olá, Ronaldo!
Fico muito feliz em saber que minha explicação ajudou de alguma forma. Uma das coisas que mais gosto na programação é justamente essa liberdade: quase sempre há diversas maneiras de resolver um problema. Alguns podem concordar, outros não, mas para mim o mais importante é alcançar o resultado desejado — se funciona e atende à necessidade, então já é um bom caminho.
Seria interessante, se possível, você disponibilizar um exemplo compilável. Isso facilita bastante a troca de ideias, pois cada um pode ter pequenas diferenças na forma de programar, e tendo um código compilável conseguimos analisar exatamente o mesmo cenário. Isso também seria muito útil para a comunidade, já que aparentemente outras pessoas enfrentam esse mesmo problema.
Inclusive, na pasta do Git, em samples/pilha, há um exemplo que trabalha com várias janelas child simultâneas, independentemente da ordem de fechamento e sem necessidade de códigos extras nos eventos de fechamento.
Se você conseguir isolar apenas a parte essencial do seu sistema, criando um pequeno cenário compilável, seria ótimo — mas é apenas uma sugestão. No fim, se você e seu cliente estão satisfeitos com a solução implementada, isso é o que realmente importa.
Grande abraço,
Ivanil
Hello Ronaldo,
I’m very glad to hear that my explanation was helpful in some way. One of the things I enjoy most about programming is this freedom: there are almost always several ways to solve a problem. Some people may agree, others may not, but for me the most important thing is achieving the desired result — if it works and meets the requirement, then it’s already a good path.
If possible, it would be great if you could provide a compilable example. This makes idea-sharing much easier, since everyone may have slight differences in their coding style, and having something that can be compiled allows us to analyze exactly the same scenario. It would also be very helpful to the community, as it seems other people are experiencing this same issue.
By the way, in the Git folder under samples/pilha, there is an example that handles multiple child windows simultaneously, regardless of the closing order and without requiring extra code in the close events.
If you can isolate just the essential part of your system and create a small compilable scenario, that would be great — but it’s only a suggestion. In the end, if you and your client are satisfied with the solution you implemented, that’s what truly matters.
Best regards,
Ivanil
To view this discussion, visit https://groups.google.com/d/msgid/minigui-forum/989ba299-696c-4e49-bb30-c0287f33f4dbn%40googlegroups.com.