http://bugs.winehq.org/show_bug.cgi?id=33241
Bug #: 33241 Summary: incorrect display of a combobox in a Clipper application Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: ironeman@tiscali.it Classification: Unclassified
As mentioned in http://forum.winehq.org/viewtopic.php?f=8&t=18198, I am using 16-bit Clipper/xBase programs. When I have a listbox, the field is not correctly initialized, despite the list is ok. Debugging my application, I have found that it is due to a strange memory management. I start by saying that Clipper/xBase uses dynamic scoping, so the value of a variable is the last assigned to it into the stack; a variable can be local or global (prefixed by m->). When using the dialog that has the problem, I use the activation command (Fivewin library): m->mTipoDoc:=.... // assign the global variable m->mTipoDoc activate DIALOG oDlg centered on init (SettaCombo()) function SettaCombo() // initialization code of the dialog ... // use the global variable m->mTipoDoc but, at this point, when using WINE, the variable has lost its content and is empty
I solved the problem using a local variable that temporarily holds the value of the global variable: m->mTipoDoc:=.... // assign the global variable m->mTipoDoc local tmpcod:=m->mTipoDoc // to solve the wine bug activate DIALOG oDlg centered on init (SettaCombo(tmpcod)) function SettaCombo(val) m->mTipoDoc:=val // to solve the wine bug ... // use the global variable m->mTipoDoc
Evidently the local variable is managed in a different way by WINE and the error has disappered.
To test this behaviour, I wrote the attached sample program. Into the zip there is a readme.pdf that explains how it works. Best regards.
http://bugs.winehq.org/show_bug.cgi?id=33241
--- Comment #1 from pepinfor ironeman@tiscali.it 2013-03-18 07:53:26 CDT --- Created attachment 43965 --> http://bugs.winehq.org/attachment.cgi?id=43965 zip file containing the sample program
http://bugs.winehq.org/show_bug.cgi?id=33241
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com 2013-03-18 08:05:26 CDT --- What are the steps to reproduce? I opened the program in winxp and don't know how to get to the listbox screen. When I click Azienda all buttons are deactivated excpet the Scelta and Chiudi, and both of them return to the initial screen.
http://bugs.winehq.org/show_bug.cgi?id=33241
--- Comment #3 from pepinfor ironeman@tiscali.it 2013-03-18 09:21:19 CDT --- (In reply to comment #2)
What are the steps to reproduce? I opened the program in winxp and don't know how to get to the listbox screen. When I click Azienda all buttons are deactivated excpet the Scelta and Chiudi, and both of them return to the initial screen.
Please, read the readme.pdf included into the zip file. Thanks
https://bugs.winehq.org/show_bug.cgi?id=33241
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
--- Comment #4 from Austin English austinenglish@gmail.com --- This is your friendly reminder that there has been no bug activity for over a year. Is this still an issue in current (1.7.37 or newer) wine? If so, please attach the terminal output in 1.7.37 (see http://wiki.winehq.org/FAQ#get_log).