Página 1 de 1

TArrayBrowse ... how easy to do this?

Publicado: Mar Oct 25, 2011 7:47 pm
por ChrisGillard
I am wanting to browse an array where each element is itself either an array
or an object.
The ArrayBrowse just needs to show say element #2 of each array or say
obj:cName.
I dont think this is going to work .... but I would like it to.
Maybe I could inherit from TArrayBrowse & modify the GetData ..... is this
realistic?
My solution at the moment is to have two arrays ....
Array 1 has an array at each row/column cell .... this is where I keep all
my info for each cell.
Array 2 is an array and has has a string value for each row/column and is
the one that I show in the ArrayBrowse.
The problem is I have to keep the string values in Array 2 up to date from
Array 1.
But as I am typing .... Array 2 could just be with "" empty rows & columns
but use the Array2:Getvalue event to look into Array 1 for the values to
display in Array2.
Both arrays have to be the same size of rows and columns but I think this
may work.
Any thoughts?
Chris
..
..

TArrayBrowse ... how easy to do this?

Publicado: Mar Oct 25, 2011 9:25 pm
por jlalin
Chris,
> Maybe I could inherit from TArrayBrowse& modify the GetData ..... is this
> realistic?
Yes, for sure.
> But as I am typing .... Array 2 could just be with "" empty rows& columns
> but use the Array2:Getvalue event to look into Array 1 for the values to
> display in Array2.
This solutions seems good to me too.
Regards,
José Lalí­n

TArrayBrowse ... how easy to do this?

Publicado: Mar Oct 25, 2011 9:25 pm
por ChrisGillard
This idea looks pretty promising BUT .... how do I know what row I am
refreshing from within TBrwColumn:OnDrawCell ??
The only thing that looks promising is the aRect parameter ... translated
into a Row ... somehow??
TBrwColumn:OnGetdata looks promising also ... but how to get the cell row
that is being refreshed??
I have been here before but forget the way of getting to a Row number within
a column event?
I wish there was a nRow parameter passed through ... that would make this
really simple?
Some help would be really appreciated.
Chris
"Chris Gillard" <chris@bluesquare.co.uk> wrote in message
news:4ea6f625$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>I am wanting to browse an array where each element is itself either an
>array or an object.
>
> The ArrayBrowse just needs to show say element #2 of each array or say
> obj:cName.
>
> I dont think this is going to work .... but I would like it to.
>
> Maybe I could inherit from TArrayBrowse & modify the GetData ..... is this
> realistic?
>
> My solution at the moment is to have two arrays ....
>
> Array 1 has an array at each row/column cell .... this is where I keep all
> my info for each cell.
>
> Array 2 is an array and has has a string value for each row/column and is
> the one that I show in the ArrayBrowse.
>
> The problem is I have to keep the string values in Array 2 up to date from
> Array 1.
>
> But as I am typing .... Array 2 could just be with "" empty rows & columns
> but use the Array2:Getvalue event to look into Array 1 for the values to
> display in Array2.
>
> Both arrays have to be the same size of rows and columns but I think this
> may work.
>
> Any thoughts?
>
> Chris
> .
> .
>
>
>

TArrayBrowse ... how easy to do this?

Publicado: Mar Oct 25, 2011 9:28 pm
por ChrisGillard
Hi Jose,
Working late too ... thank you.
I like this idea too but just need to find the row being refreshed/got/drawn
from within the OnGertData or OnDrawCell event to allow me to look up the
data in the array with all the info.
How is that done please?
Last pice of the jigsaw.
Chris
"Chris Gillard" <chris@bluesquare.co.uk> wrote in message
news:[email=4ea70d4d@svctag-j7w3v3j....]4ea70d4d@svctag-j7w3v3j....[/email]
> This idea looks pretty promising BUT .... how do I know what row I am
> refreshing from within TBrwColumn:OnDrawCell ??
>
> The only thing that looks promising is the aRect parameter ... translated
> into a Row ... somehow??
>
> TBrwColumn:OnGetdata looks promising also ... but how to get the cell row
> that is being refreshed??
>
> I have been here before but forget the way of getting to a Row number
> within a column event?
>
> I wish there was a nRow parameter passed through ... that would make this
> really simple?
>
> Some help would be really appreciated.
>
> Chris
>
> "Chris Gillard" <chris@bluesquare.co.uk> wrote in message
> news:4ea6f625$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>>I am wanting to browse an array where each element is itself either an
>>array or an object.
>>
>> The ArrayBrowse just needs to show say element #2 of each array or say
>> obj:cName.
>>
>> I dont think this is going to work .... but I would like it to.
>>
>> Maybe I could inherit from TArrayBrowse & modify the GetData ..... is
>> this realistic?
>>
>> My solution at the moment is to have two arrays ....
>>
>> Array 1 has an array at each row/column cell .... this is where I keep
>> all my info for each cell.
>>
>> Array 2 is an array and has has a string value for each row/column and is
>> the one that I show in the ArrayBrowse.
>>
>> The problem is I have to keep the string values in Array 2 up to date
>> from Array 1.
>>
>> But as I am typing .... Array 2 could just be with "" empty rows &
>> columns but use the Array2:Getvalue event to look into Array 1 for the
>> values to display in Array2.
>>
>> Both arrays have to be the same size of rows and columns but I think this
>> may work.
>>
>> Any thoughts?
>>
>> Chris
>> .
>> .
>>
>>
>>
>
>

TArrayBrowse ... how easy to do this?

Publicado: Mar Oct 25, 2011 9:38 pm
por jlalin
Chris,
> Working late too ... thank you.
It's not work but vice ;-)
> How is that done please?
Use the TArrayBrowse:nArrayAt property.
Regards,
José Lalí­n

TArrayBrowse ... how easy to do this?

Publicado: Mar Oct 25, 2011 9:41 pm
por ChrisGillard
Jose,
"is vice" .... true this work is frustrating and challenging and it makes
you work at making it work.
I will try :nArrayAt
Thanks
Chris
"José Lalín" <dezac@corevia.com> wrote in message
news:4ea7100a$[email=2@svctag-j7w3v3j....]2@svctag-j7w3v3j....[/email]
Chris,
> Working late too ... thank you.
It's not work but vice ;-)
> How is that done please?
Use the TArrayBrowse:nArrayAt property.
Regards,
José Lalín

TArrayBrowse ... how easy to do this?

Publicado: Mar Oct 25, 2011 9:53 pm
por jlalin
Chris,
wise words!
Regards,
José Lalí­n

TArrayBrowse ... how easy to do this?

Publicado: Mar Oct 25, 2011 9:56 pm
por ChrisGillard
Hi,
Been doing this toom many years, since DbaseII on AppleII & CPM.
Anyway :nArrayAt is working so I will ArrayBrowse an array full of "" cells
.... and get all my data from the main array where each element is an array
of info.
This is very good stuff.
Xailer is truly exceptional ... plus the support!
Chris
"José Lalín" <dezac@corevia.com> wrote in message
news:4ea7139d$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
Chris,
wise words!
Regards,
José Lalín

TArrayBrowse ... how easy to do this?

Publicado: Mar Oct 25, 2011 10:06 pm
por jlalin
Chris,
> Been doing this toom many years, since DbaseII on AppleII& CPM.
LOL! We are getting old... I started with an Amstrad CPC464 and the
Locomotive Basic. Some months later I got two tapes with HiSoft C and
HiSoft Pascal and a book to learn the Z80 assembler. That is how the vice
started ;-)
> Xailer is truly exceptional ... plus the support!
Many thanks for the kind words!
Regards,
José Lalí­n