In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Pre 6 problems

Foro público de Xailer en español
Responder
Ingo
Mensajes: 330
Registrado: Mié Jul 05, 2006 3:58 pm

Pre 6 problems

Mensaje por Ingo »

Ignacio,
1. please take look at the sample. Click on the "Add"-button and the
oEdit:value will be added to the ListBox:aItems and the oEdit:value will be
set to "". Than write again "ABC" into the oEdit:control and click again on
the "Add"-button the app hangs itself up. What is wrong with the code?
2. If TButton:OnCheckState() returns a logical value the error occurs as I
already reported. Is there a recursivity?
3. TListBox:FindString() returns a logical value and not the numeric "nPos"
like TComboBox:FindString() does. Is the description in
XailerdocListbox.txt a mistake?
4. I can not find the methods FindString() .and. FindStringEx() of
TComboBox and TListBox in the documentation neigther in the Helpfile nor in
the PDF-File but only in the .txt-files.
Regards
Ingo


Attached files Test.zip (1.8 KB)Â
Miguel Torrellas
Mensajes: 35
Registrado: Lun Oct 24, 2005 7:05 pm

Pre 6 problems

Mensaje por Miguel Torrellas »

I download your sample and compiled all working fine. No problem, all OK.
Regards
"Ingo" <ingo.jh@web.de> escribió en el mensaje
news:[email=4363967a@ozsrvnegro.ozlan.local...]4363967a@ozsrvnegro.ozlan.local...[/email]
> Ignacio,
>
> 1. please take look at the sample. Click on the "Add"-button and the
> oEdit:value will be added to the ListBox:aItems and the oEdit:value will
> be set to "". Than write again "ABC" into the oEdit:control and click
> again on the "Add"-button the app hangs itself up. What is wrong with the
> code?
>
> 2. If TButton:OnCheckState() returns a logical value the error occurs as I
> already reported. Is there a recursivity?
>
> 3. TListBox:FindString() returns a logical value and not the numeric
> "nPos" like TComboBox:FindString() does. Is the description in
> XailerdocListbox.txt a mistake?
>
> 4. I can not find the methods FindString() .and. FindStringEx() of
> TComboBox and TListBox in the documentation neigther in the Helpfile nor
> in the PDF-File but only in the .txt-files.
>
> Regards
>
> Ingo
>
>
Ingo
Mensajes: 330
Registrado: Mié Jul 05, 2006 3:58 pm

Pre 6 problems

Mensaje por Ingo »

Miguel,
to 1.
after recompiling with Alt+F9 it works now too. I had compiled only the
changes in the code. Thank you for the hint.
to 2.
the error still occurs. Take a look at the sample. I think the reasen is
the ::RequestState() in
METHOD EditChange( oSender ) CLASS TForm1
::RequestState()
RETURN Nil
Regards
Ingo
"Miguel Torrellas" <miguel@torsat.net> schrieb im Newsbeitrag
news:4363a9d3$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
>I download your sample and compiled all working fine. No problem, all OK.
>
> Regards


Attached files Test.zip (1.9 KB)Â
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9463
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Pre 6 problems

Mensaje por ignacio »

Ino,
1) Here it works correctly,
2) I put this code on Button CheckState method:
METHOD AddBtnCheckState( oSender ) CLASS TForm1
RETURN !Empty( ::oEdit:Value )
And is working correctly.
3 & 4) I see that TComboBox return numbers but TListBox returns strings. BTW
those two methods are reserved and not documented because is better to
directly use a Ascan() to the aItems array. The TXT documentation will
disappear very soon.
Regards,
"Ingo" <ingo.jh@web.de> escribió en el mensaje
news:[email=4363967a@ozsrvnegro.ozlan.local...]4363967a@ozsrvnegro.ozlan.local...[/email]
> Ignacio,
>
> 1. please take look at the sample. Click on the "Add"-button and the
> oEdit:value will be added to the ListBox:aItems and the oEdit:value will
> be set to "". Than write again "ABC" into the oEdit:control and click
> again on the "Add"-button the app hangs itself up. What is wrong with the
> code?
>
> 2. If TButton:OnCheckState() returns a logical value the error occurs as I
> already reported. Is there a recursivity?
>
> 3. TListBox:FindString() returns a logical value and not the numeric
> "nPos" like TComboBox:FindString() does. Is the description in
> XailerdocListbox.txt a mistake?
>
> 4. I can not find the methods FindString() .and. FindStringEx() of
> TComboBox and TListBox in the documentation neigther in the Helpfile nor
> in the PDF-File but only in the .txt-files.
>
> Regards
>
> Ingo
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Ingo
Mensajes: 330
Registrado: Mié Jul 05, 2006 3:58 pm

Pre 6 problems

Mensaje por Ingo »

Ignacio,
please add this code to the sample
METHOD EditChange( oSender ) CLASS TForm1
::RequestState()
RETURN Nil
or take a look at the enclosed sample and try it again.
With Pre5a did it work.
Regards
Ingo
"Ignacio Ortiz de Zúñiga" <InvalidAccount@ozs.com> schrieb im Newsbeitrag
news:4365e136$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Ino,
>
> 1) Here it works correctly,
>
> 2) I put this code on Button CheckState method:
>
> METHOD AddBtnCheckState( oSender ) CLASS TForm1
>
> RETURN !Empty( ::oEdit:Value )
>
> And is working correctly.
>
> 3 & 4) I see that TComboBox return numbers but TListBox returns strings.
> BTW
> those two methods are reserved and not documented because is better to
> directly use a Ascan() to the aItems array. The TXT documentation will
> disappear very soon.
>
> Regards,
>
> "Ingo" <ingo.jh@web.de> escribió en el mensaje
> news:[email=4363967a@ozsrvnegro.ozlan.local...]4363967a@ozsrvnegro.ozlan.local...[/email]
>> Ignacio,
>>
>> 1. please take look at the sample. Click on the "Add"-button and the
>> oEdit:value will be added to the ListBox:aItems and the oEdit:value will
>> be set to "". Than write again "ABC" into the oEdit:control and click
>> again on the "Add"-button the app hangs itself up. What is wrong with the
>> code?
>>
>> 2. If TButton:OnCheckState() returns a logical value the error occurs as
>> I
>> already reported. Is there a recursivity?
>>
>> 3. TListBox:FindString() returns a logical value and not the numeric
>> "nPos" like TComboBox:FindString() does. Is the description in
>> XailerdocListbox.txt a mistake?
>>
>> 4. I can not find the methods FindString() .and. FindStringEx() of
>> TComboBox and TListBox in the documentation neigther in the Helpfile nor
>> in the PDF-File but only in the .txt-files.
>>
>> Regards
>>
>> Ingo
>>
>>
>
>


Attached files Test.zip (1.9 KB)Â
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Pre 6 problems

Mensaje por jfgimenez »

Ingo,
please, change this method:
METHOD AddBtnClick( oSender ) CLASS TForm1
::oEdit:Setfocus()
IF !EMPTY(::oEdit:Value) .AND. !::oListBox:FindStringEx(::oEdit:Value,1)
::oListBox:AddItem(::oEdit:Value)
::oEdit:Value:=""
ENDIF
RETURN Nil
The problem was that if you change the focus (::oEdit:SetFocus()) after
assigning "" to ::oEdit, then AddBtnCheckState() returns .F. and get
disabled. Then, the focus is forced to change again, and while the button
was the last control that had the focus it causes that recursivity.
However, we've made several changes to avoid any recursivity in this
cirsumstances. As they involves several modules, it will be available in the
next release.
Thanks for your feedback.
--
Regards,
Jose F. Gimenez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Responder