Página 1 de 1
Return values from windows
Publicado: Lun Oct 15, 2007 5:48 pm
por Mahanimann
Hi,
I need to receive values from windows. F.ex. the user chooses a record in a
browse pop-up window, the pop-up window closes, and the calling window
receives the value chosen (can be of any datatype).
With my very limited knowledge about Xailer/xHarbour I have solved this
(i.e. to get a return value from a window) with this:
CLASS TForm FROM XForm
DATA xReturnVal_From_PopUp_Window
END CLASS
The parent (oParent) in all pop-up windows are set to the calling window.
When the pop-up window closes, it puts the return value into
::oParent:xReturnVal_From_PopUp_Window.
This works fine, but there must be a neater way to do this? (Tweaking with
:nModalResult gave me only trouble

)
Thanks for any reply,
Paal
Return values from windows
Publicado: Lun Oct 15, 2007 7:53 pm
por ignacio
Paal,
Use the the property TForm:lHideOnClose. See the docs for further
information.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Mahanimann" <
paaldalen@gmail.com> escribió en el mensaje
news:47138bc9$[email=
1@ozsrv2.ozlan.local...]
1@ozsrv2.ozlan.local...[/email]
> Hi,
>
> I need to receive values from windows. F.ex. the user chooses a record in
> a browse pop-up window, the pop-up window closes, and the calling window
> receives the value chosen (can be of any datatype).
>
> With my very limited knowledge about Xailer/xHarbour I have solved this
> (i.e. to get a return value from a window) with this:
>
> CLASS TForm FROM XForm
> DATA xReturnVal_From_PopUp_Window
> END CLASS
>
> The parent (oParent) in all pop-up windows are set to the calling window.
> When the pop-up window closes, it puts the return value into
> ::oParent:xReturnVal_From_PopUp_Window.
>
> This works fine, but there must be a neater way to do this? (Tweaking with
> :nModalResult gave me only trouble

)
>
> Thanks for any reply,
> Paal
>
Return values from windows
Publicado: Lun Oct 15, 2007 7:53 pm
por NoName
Paal,
Use the the property TForm:lHideOnClose. See the docs for further
information.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Mahanimann" <
paaldalen@gmail.com> escribió en el mensaje
news:47138bc9$[email=
1@ozsrv2.ozlan.local...]
1@ozsrv2.ozlan.local...[/email]
> Hi,
>
> I need to receive values from windows. F.ex. the user chooses a record in
> a browse pop-up window, the pop-up window closes, and the calling window
> receives the value chosen (can be of any datatype).
>
> With my very limited knowledge about Xailer/xHarbour I have solved this
> (i.e. to get a return value from a window) with this:
>
> CLASS TForm FROM XForm
> DATA xReturnVal_From_PopUp_Window
> END CLASS
>
> The parent (oParent) in all pop-up windows are set to the calling window.
> When the pop-up window closes, it puts the return value into
> ::oParent:xReturnVal_From_PopUp_Window.
>
> This works fine, but there must be a neater way to do this? (Tweaking with
> :nModalResult gave me only trouble

)
>
> Thanks for any reply,
> Paal
>
Return values from windows
Publicado: Mar Oct 16, 2007 11:47 am
por Mahanimann
> Use the the property TForm:lHideOnClose. See the docs for further
> information.
Is TForm:Close() with TForm:lHideOnClose == .F. exactly the same as
TForm:End()?
Thanks,
Paal
Return values from windows
Publicado: Mar Oct 16, 2007 11:47 am
por Mahanimann
> Use the the property TForm:lHideOnClose. See the docs for further
> information.
Is TForm:Close() with TForm:lHideOnClose == .F. exactly the same as
TForm:End()?
Thanks,
Paal
Return values from windows
Publicado: Mar Oct 16, 2007 12:51 pm
por jfgimenez
Paal,
>> Use the the property TForm:lHideOnClose. See the docs for further
>> information.
>
> Is TForm:Close() with TForm:lHideOnClose == .F. exactly the same as
> TForm:End()?
Almost the same, but not exactly equal. TForm:Close() send the message
WM_CLOSE to the form, and the form closes and destroys itself, while
TForm:End() simply destroys the form.
IOW, it's desirable to call always :Close(), excepting if you are setting
:lHideOnClose to .T. and you have to destroy the form after it has been
closed.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
Return values from windows
Publicado: Mar Oct 16, 2007 12:51 pm
por jfgimenez
Paal,
>> Use the the property TForm:lHideOnClose. See the docs for further
>> information.
>
> Is TForm:Close() with TForm:lHideOnClose == .F. exactly the same as
> TForm:End()?
Almost the same, but not exactly equal. TForm:Close() send the message
WM_CLOSE to the form, and the form closes and destroys itself, while
TForm:End() simply destroys the form.
IOW, it's desirable to call always :Close(), excepting if you are setting
:lHideOnClose to .T. and you have to destroy the form after it has been
closed.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
Return values from windows
Publicado: Mié Oct 17, 2007 3:30 am
por Mahanimann
> IOW, it's desirable to call always :Close(), excepting if you are setting
> :lHideOnClose to .T. and you have to destroy the form after it has been
> closed.
Ok. I call :End(), maybe this is why my app is chewing up memory. Child
windows do not release much memory when :End()'ed. I will check it out
tomorrow.
Thanks,
Paal
Return values from windows
Publicado: Mié Oct 17, 2007 3:30 am
por Mahanimann
> IOW, it's desirable to call always :Close(), excepting if you are setting
> :lHideOnClose to .T. and you have to destroy the form after it has been
> closed.
Ok. I call :End(), maybe this is why my app is chewing up memory. Child
windows do not release much memory when :End()'ed. I will check it out
tomorrow.
Thanks,
Paal