HMG4: start, quit, resource, localized
Moderator: Rathinagiri
Re: HMG4: start, quit, resource, localized
Hi Mauricio.
I think it's not a good way add var within globalshared.prg only to bypass /w3 problem!
Could you please take a look here viewtopic.php?f=32&t=2018&p=17125#p17125 and give me your opinion. I want publish.
2011-07-09 Update
On the other hand already exist current window: s_oCurWindow why a new var s_oCurrentWindow ?
And there is a method to know current window HMGAPP():CurrHmgWin() or THISWINDOW in XBase style.
Best regards
I think it's not a good way add var within globalshared.prg only to bypass /w3 problem!
Could you please take a look here viewtopic.php?f=32&t=2018&p=17125#p17125 and give me your opinion. I want publish.
2011-07-09 Update
On the other hand already exist current window: s_oCurWindow why a new var s_oCurrentWindow ?
And there is a method to know current window HMGAPP():CurrHmgWin() or THISWINDOW in XBase style.
Best regards
Luigi from Italy
www.L3W.it
www.L3W.it
Re: HMG4: start, quit, resource, localized
Hi Luigi.
Agree. But i think the other way worse. And between the bad and the worse I choose the first.l3whmg wrote:I think it's not a good way add var within globalshared.prg only to bypass /w3 problem!
I will, give me a day.Could you please take a look here viewtopic.php?f=32&t=2018&p=17125#p17125 and give me your opinion.
Sorry, I didn't see.On the other hand already exist current window: s_oCurWindow why a new var s_oCurrentWindow ?
[[]] Mauricio Ventura Faria
Re: HMG4: start, quit, resource, localized
Hi Luigi.
s_oCurWindow is used to know which window has the current focus.
s_oCurrentWindow is used to help setting the parenthood at creation time when using xBase syntax, while constructing the interface.
s_oCurWindow can be used at any time by the programmer whenever the logic needs to know which window has focus and s_oCurrentWindow shoudn´t be used at all by a programmer, it's only needed at preprocessor level.
Its a good idea change s_oCurrentWindow to another thing in order to avoid misinterpretations.
And I prefer full names in vars, can I change s_oCurWindow to s_oCurrentWindow ?
They are different things.l3whmg wrote:On the other hand already exist current window: s_oCurWindow why a new var s_oCurrentWindow ?
s_oCurWindow is used to know which window has the current focus.
s_oCurrentWindow is used to help setting the parenthood at creation time when using xBase syntax, while constructing the interface.
s_oCurWindow can be used at any time by the programmer whenever the logic needs to know which window has focus and s_oCurrentWindow shoudn´t be used at all by a programmer, it's only needed at preprocessor level.
Its a good idea change s_oCurrentWindow to another thing in order to avoid misinterpretations.
And I prefer full names in vars, can I change s_oCurWindow to s_oCurrentWindow ?
[[]] Mauricio Ventura Faria
Re: HMG4: start, quit, resource, localized
I can't follow the discussion since I have a bad internet connection so I just propose to change var names to something more clear like oCurrentFocusWindow or something similar.
For menus I can't say yet
For menus I can't say yet
Re: HMG4: start, quit, resource, localized
Hi.
I changed s_oCurrentWindow to s_oParentWindow since its used to set parenthood.
I changed s_oCurrentWindow to s_oParentWindow since its used to set parenthood.
[[]] Mauricio Ventura Faria
a bug report
I'm just back from holiday, I updated from svn and compiled a program I was working on getting a run time error.
Property lSizable has been moved from window.prg to basic.prg but the Sizable method has been deleted and not moved...
Property lSizable has been moved from window.prg to basic.prg but the Sizable method has been deleted and not moved...
Re: HMG4: start, quit, resource, localized
Mee to I come back today from holiday.
Mauricio, I understand very well because you add _oCurWindow, but as I tried to explain I think it's not a good way to use shared var to solve /w3 problems. It's a right solution, ok, but IMHO not good. Today we need something here for this problem, next days other people need something: these take memory. I think: we can write a better code.
As you write: the parenthood. Well and oDefaultParent? Can't be used because change when you start to create a new window, but how many time you have see this code in the same source and in this specific order:
I don't know if a programmer write this or he write this
This is my little opinion.
Cheers
Mauricio, I understand very well because you add _oCurWindow, but as I tried to explain I think it's not a good way to use shared var to solve /w3 problems. It's a right solution, ok, but IMHO not good. Today we need something here for this problem, next days other people need something: these take memory. I think: we can write a better code.
As you write: the parenthood. Well and oDefaultParent? Can't be used because change when you start to create a new window, but how many time you have see this code in the same source and in this specific order:
Code: Select all
DEFINE WINDOW form1
....
END WINDOW
....
DEFINE WINDOW form2
....
END WINDOW
....
DEFINE MAINMENU OF form1
....
END MENU
DEFINE MAINMENU OF form2
....
END MENU
ACTIVATE form1
Code: Select all
DEFINE WINDOW form1
DEFINE MAINMENU
END MENU
END WINDOW
....
DEFINE WINDOW form2
DEFINE MAINMENU
END MENU
END WINDOW
......
ACTIVATE form1
Cheers
Luigi from Italy
www.L3W.it
www.L3W.it
Re: a bug report
Sorry, my fault.mrduck wrote:Property lSizable has been moved from window.prg to basic.prg but the Sizable method has been deleted and not moved...
Fixed.
[[]] Mauricio Ventura Faria
Re: a bug report
I did a patch today to commit this evening and you were quicker...
I did move lSizable back to window.prg where it should be, did you the same ?
I did move lSizable back to window.prg where it should be, did you the same ?
Re: a bug report
mrduck wrote:I did a patch today to commit this evening and you were quicker...
No. Since objects other than windows can be sizable, I moved to basic.I did move lSizable back to window.prg where it should be, did you the same ?
[[]] Mauricio Ventura Faria