Página 1 de 1

DataSource Dataset 'visible' from different forms in application ??

Publicado: Vie Abr 17, 2009 5:12 pm
por ChrisGillard
In clipper/xharbour we have had a 'Log' system based around a dbf opened at
application start up.
We have simple functions like LogSuccess( "my message", { some values } ) or
LogError( "my message", { some values } ) ....these use LOG-> alias
technology and work from any prg in the application.
Just trying to write same for Xailer/windows using datasets .... not finding
so easy.
If I create my datasource/dataset by calling a function in my
mainform:Initialize ... it works ok.
But when I move off to another form or use some 'TFormPanel FROM XPanel'
code from Ignacio .... my LOG workarea is OVERWRITTEN by the datasets on the
new form ... so my LogSuccess/Error functions fail.
Dont really want to be attaching & opening LOG datasource/dataset to every
form.
Without 'dataforms', what is the easy way of having global access to a
datasource/dataset. ????
Any thoughts would be appreciated.
Chris

DataSource Dataset 'visible' from different forms in application ??

Publicado: Vie Abr 17, 2009 5:50 pm
por ChrisGillard
This works .... I studied APPLICATION, PRINTER etc ... I see they have no
real oParent.
I remove the oParent from my Log Class and the dbf does not get closed as I
move to different forms.
I just get an error when I exit the application as the file is not closed
nicely ..... hopefully I can fix that.
Is thi 'NO PARENT' idea the way to go.
Chris
"Chris Gillard" <chris@bluesquare.co.uk> wrote in message
news:49e89c5b$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> In clipper/xharbour we have had a 'Log' system based around a dbf opened
> at application start up.
>
> We have simple functions like LogSuccess( "my message", { some values } )
> or LogError( "my message", { some values } ) ....these use LOG-> alias
> technology and work from any prg in the application.
>
> Just trying to write same for Xailer/windows using datasets .... not
> finding so easy.
>
> If I create my datasource/dataset by calling a function in my
> mainform:Initialize ... it works ok.
>
> But when I move off to another form or use some 'TFormPanel FROM XPanel'
> code from Ignacio .... my LOG workarea is OVERWRITTEN by the datasets on
> the new form ... so my LogSuccess/Error functions fail.
>
> Dont really want to be attaching & opening LOG datasource/dataset to every
> form.
>
> Without 'dataforms', what is the easy way of having global access to a
> datasource/dataset. ????
>
> Any thoughts would be appreciated.
>
> Chris
>
>

DataSource Dataset 'visible' from different forms in application ??

Publicado: Vie Abr 17, 2009 5:50 pm
por ChrisGillard
This works .... I studied APPLICATION, PRINTER etc ... I see they have no
real oParent.
I remove the oParent from my Log Class and the dbf does not get closed as I
move to different forms.
I just get an error when I exit the application as the file is not closed
nicely ..... hopefully I can fix that.
Is thi 'NO PARENT' idea the way to go.
Chris
"Chris Gillard" <chris@bluesquare.co.uk> wrote in message
news:49e89c5b$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> In clipper/xharbour we have had a 'Log' system based around a dbf opened
> at application start up.
>
> We have simple functions like LogSuccess( "my message", { some values } )
> or LogError( "my message", { some values } ) ....these use LOG-> alias
> technology and work from any prg in the application.
>
> Just trying to write same for Xailer/windows using datasets .... not
> finding so easy.
>
> If I create my datasource/dataset by calling a function in my
> mainform:Initialize ... it works ok.
>
> But when I move off to another form or use some 'TFormPanel FROM XPanel'
> code from Ignacio .... my LOG workarea is OVERWRITTEN by the datasets on
> the new form ... so my LogSuccess/Error functions fail.
>
> Dont really want to be attaching & opening LOG datasource/dataset to every
> form.
>
> Without 'dataforms', what is the easy way of having global access to a
> datasource/dataset. ????
>
> Any thoughts would be appreciated.
>
> Chris
>
>

DataSource Dataset 'visible' from different forms in application ??

Publicado: Vie Abr 17, 2009 7:43 pm
por ignacio
Chris,
We expecto to have a special kind of form called 'Data module' for Xailer 2
that will be publish for all the application.
Right now, a datasource or a dataset can be linked to a form or not, it
depends on its oParent Value. If is linked to a form the datasets and
datasources are destroyed when the form is destroyed.
I suggest you create a new member on the global public object AppData with
the name oLog which holds an instance of a class TLog wich does all the job.
If you have any
Regards.
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
news:49e89c5b$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> In clipper/xharbour we have had a 'Log' system based around a dbf opened
> at application start up.
>
> We have simple functions like LogSuccess( "my message", { some values } )
> or LogError( "my message", { some values } ) ....these use LOG-> alias
> technology and work from any prg in the application.
>
> Just trying to write same for Xailer/windows using datasets .... not
> finding so easy.
>
> If I create my datasource/dataset by calling a function in my
> mainform:Initialize ... it works ok.
>
> But when I move off to another form or use some 'TFormPanel FROM XPanel'
> code from Ignacio .... my LOG workarea is OVERWRITTEN by the datasets on
> the new form ... so my LogSuccess/Error functions fail.
>
> Dont really want to be attaching & opening LOG datasource/dataset to every
> form.
>
> Without 'dataforms', what is the easy way of having global access to a
> datasource/dataset. ????
>
> Any thoughts would be appreciated.
>
> Chris
>
>
>

DataSource Dataset 'visible' from different forms in application ??

Publicado: Vie Abr 17, 2009 7:43 pm
por ignacio
Chris,
We expecto to have a special kind of form called 'Data module' for Xailer 2
that will be publish for all the application.
Right now, a datasource or a dataset can be linked to a form or not, it
depends on its oParent Value. If is linked to a form the datasets and
datasources are destroyed when the form is destroyed.
I suggest you create a new member on the global public object AppData with
the name oLog which holds an instance of a class TLog wich does all the job.
If you have any
Regards.
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
news:49e89c5b$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> In clipper/xharbour we have had a 'Log' system based around a dbf opened
> at application start up.
>
> We have simple functions like LogSuccess( "my message", { some values } )
> or LogError( "my message", { some values } ) ....these use LOG-> alias
> technology and work from any prg in the application.
>
> Just trying to write same for Xailer/windows using datasets .... not
> finding so easy.
>
> If I create my datasource/dataset by calling a function in my
> mainform:Initialize ... it works ok.
>
> But when I move off to another form or use some 'TFormPanel FROM XPanel'
> code from Ignacio .... my LOG workarea is OVERWRITTEN by the datasets on
> the new form ... so my LogSuccess/Error functions fail.
>
> Dont really want to be attaching & opening LOG datasource/dataset to every
> form.
>
> Without 'dataforms', what is the easy way of having global access to a
> datasource/dataset. ????
>
> Any thoughts would be appreciated.
>
> Chris
>
>
>

DataSource Dataset 'visible' from different forms in application ??

Publicado: Lun Abr 20, 2009 9:28 am
por ChrisGillard
Ignacio,
Thanks for your reply.
I am going down the route of 'No Parent' on my DataSource & DataSet ... it
appears to be working ok.
Thanks
Chris
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
news:49e8bfbe$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Chris,
>
> We expecto to have a special kind of form called 'Data module' for Xailer
> 2 that will be publish for all the application.
>
> Right now, a datasource or a dataset can be linked to a form or not, it
> depends on its oParent Value. If is linked to a form the datasets and
> datasources are destroyed when the form is destroyed.
>
> I suggest you create a new member on the global public object AppData with
> the name oLog which holds an instance of a class TLog wich does all the
> job. If you have any
>
> Regards.
>
>
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
> http://www.xailer.com
> http://www.xailer.info
> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
> news:49e89c5b$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> In clipper/xharbour we have had a 'Log' system based around a dbf opened
>> at application start up.
>>
>> We have simple functions like LogSuccess( "my message", { some values } )
>> or LogError( "my message", { some values } ) ....these use LOG-> alias
>> technology and work from any prg in the application.
>>
>> Just trying to write same for Xailer/windows using datasets .... not
>> finding so easy.
>>
>> If I create my datasource/dataset by calling a function in my
>> mainform:Initialize ... it works ok.
>>
>> But when I move off to another form or use some 'TFormPanel FROM XPanel'
>> code from Ignacio .... my LOG workarea is OVERWRITTEN by the datasets on
>> the new form ... so my LogSuccess/Error functions fail.
>>
>> Dont really want to be attaching & opening LOG datasource/dataset to
>> every form.
>>
>> Without 'dataforms', what is the easy way of having global access to a
>> datasource/dataset. ????
>>
>> Any thoughts would be appreciated.
>>
>> Chris
>>
>>
>>
>
>

DataSource Dataset 'visible' from different forms in application ??

Publicado: Lun Abr 20, 2009 9:28 am
por ChrisGillard
Ignacio,
Thanks for your reply.
I am going down the route of 'No Parent' on my DataSource & DataSet ... it
appears to be working ok.
Thanks
Chris
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> wrote in message
news:49e8bfbe$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Chris,
>
> We expecto to have a special kind of form called 'Data module' for Xailer
> 2 that will be publish for all the application.
>
> Right now, a datasource or a dataset can be linked to a form or not, it
> depends on its oParent Value. If is linked to a form the datasets and
> datasources are destroyed when the form is destroyed.
>
> I suggest you create a new member on the global public object AppData with
> the name oLog which holds an instance of a class TLog wich does all the
> job. If you have any
>
> Regards.
>
>
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
> http://www.xailer.com
> http://www.xailer.info
> "Chris Gillard" <chris@bluesquare.co.uk> escribió en el mensaje
> news:49e89c5b$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> In clipper/xharbour we have had a 'Log' system based around a dbf opened
>> at application start up.
>>
>> We have simple functions like LogSuccess( "my message", { some values } )
>> or LogError( "my message", { some values } ) ....these use LOG-> alias
>> technology and work from any prg in the application.
>>
>> Just trying to write same for Xailer/windows using datasets .... not
>> finding so easy.
>>
>> If I create my datasource/dataset by calling a function in my
>> mainform:Initialize ... it works ok.
>>
>> But when I move off to another form or use some 'TFormPanel FROM XPanel'
>> code from Ignacio .... my LOG workarea is OVERWRITTEN by the datasets on
>> the new form ... so my LogSuccess/Error functions fail.
>>
>> Dont really want to be attaching & opening LOG datasource/dataset to
>> every form.
>>
>> Without 'dataforms', what is the easy way of having global access to a
>> datasource/dataset. ????
>>
>> Any thoughts would be appreciated.
>>
>> Chris
>>
>>
>>
>
>