suggestions to write programs

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

Post Reply
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

suggestions to write programs

Post by l3whmg »

Hello everyone.
I would like to know your opinion about the organization that I want use to write my programs.
In particular, I refer to the use of forms 'child' (or 'standard').
As you can see, I use a hidden label (FormStatus) to determine if the form is already committed or is free.
Because I have used this method?
Example: I have a table of countries and one for people.
The user could access the data in the countries table, both from the specific menu that another program (people insertion) but simultaneously.
The use of this label (but could also be a textbox field) allows me to check if the form is free, so I can use it, or committed by other process.
I think I can't use the same form from different processes or call: If this possibility exists that you could tell me?

What do you think? there are viable alternatives that my mind can not see?

Within the compressed file, I included both source and executable and a table.
Thanks for your help.
Attachments
Skeleton.zip
(789.33 KiB) Downloaded 378 times
Luigi from Italy
www.L3W.it
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: suggestions to write programs

Post by Rathinagiri »

Thanks for sharing Luigi. I will check and revert back.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: suggestions to write programs

Post by l3whmg »

Hi Rathinagiri,
many thanks. I'll wait your opinion.
Best regards
Luigi from Italy
www.L3W.it
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: suggestions to write programs

Post by Rathinagiri »

Nice work Luigi. :)

I want to ask one question. Why do we need a hidden variable? Can't you use iswindowdefined()?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: suggestions to write programs

Post by esgici »

l3whmg wrote: What do you think? there are viable alternatives that my mind can not see?
Within the compressed file, I included both source and executable and a table.
Ciao Luigi

Thanks to share :)

Surely, your program have many thing to help our friend in order to deeply understand and use HMG :)

Saluti, regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: suggestions to write programs

Post by l3whmg »

Ciao AMICI!
Rathinagiri, I don't use IsWindowDefined because this function tell me only if a form "is defined" and all my forms are always defined.
My POV it's different: I need to know if a form is committed in other words if in this moment I've already loaded data.
To test this solution you must click on "Manager->Record", select a valid Code (ex. REC1), press enter and minimized this form; now, click on "Other->Form", find a record with button and ON this form click "Add" or "Edit". You can't use the form because it's committed with other record!

Esgici: if this sample can be an example and HMG want include inside standard example, you can do! I'm working on a evolution (little) and I can share new version of the same.

Best regards
Luigi from Italy
www.L3W.it
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: suggestions to write programs

Post by esgici »

Hi Luigi

How it will be better if you use ALL your comments, variable names, even field names and data in English :!: So we can understand and will comment more easier :)

Regarding "including inside standard examples", I can't say anything about that; you know, this will be only decision of Maestro ;) But no problem, since you had sent it to forum, it's already between HMG samples :)

Saluti

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: suggestions to write programs

Post by l3whmg »

Hello everyone.
Esgici thanks for your attention and I apologize for leaving comments in Italian, making it difficult to follow the source :oops: I hope that now it is easier to follow my thought!

What you find attached to this post is the widespread application of the solution that I proposed.
To verify it works just follow these steps:
1) from the main menu, select "MANAGER" and then "RECORD" (p002win form is open)
2) enter "REC1" in the TEXTBOX near to the LABEL "Code" and press ENTER (this reads the record and locks it)
3) minimize this form
4) from the main menu, select "OTHER" and then "FORM" (p100win form is open)
5) click on the button marked with binoculars (p003win form is open)
6) click on "ADD" or "EDIT". At this point a message (the form p002win is filled) will appear warning that the form is committed. In fact, you're using it but it's minimized and contains data from another record. Else if you press the button "SELECT" you return to form "p100win" with some data.

I tried this solution having seen the capabilities of some ERP/programs (before losing my job :( ).

I think it important to develop programs that facilitate the end user so we can offer solutions built with the XBase language (repriced - at least in Italy - this language and its potential), compiled with Harbour and using the great work of Roberto

I hope now my information is more understandable.

Best regards
Attachments
Skeleton.zip
(792.84 KiB) Downloaded 353 times
Luigi from Italy
www.L3W.it
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: suggestions to write programs

Post by esgici »

Grazie Luigi :)

Surely now I'll follow easier :)

Saluti

--

Esgici
Viva INTERNATIONAL HMG :D
Post Reply