From: Stefan on
Darmadi,

this example shows you how to fill a bBrowser with Listviewitems. I
personally don't use it, it's only to give you a feeling how bBrowser
works.

Method FillBrowser() class dtaWindow
local oServer as bArrayServer
local oLvi as ListviewItem
local aStruct as array

aStruct := {{"NAME", "C", 30, 0}}

oServer := bArrayServer{aStruct}

oServer:Use(oServer)

oLvi := Listviewitem{}
oLvi:SetText(#NAME, "Darmadi")

oBrowser:AddItem(oLvi)

Method AddItem(oLvi as Listviewitem) class MyBrowser
local oServer as bArrayServer
local aColumnText as array
local aColumnValue as array
local dwLen, i as dword

oServer := self:Server

oServer:Append()

aColumnText := oLvi:__ColumnTextList

dwLen := ALen(aColumnText)

for i := 1 upto dwLen
oServer:FieldPut(aColumnText[i, 1], aColumnText[i, 2]
next

aColumnValue := oLvi:__ColumnValueList

dwLen := ALen(aColumnValue)

for i := 1 upto dwLen
oServer:FieldPut(aColumnValue[i, 1], aColumnValue[i, 2]
next

oServer:Commit()

return nil


From: Darmadi on
Thanks Stefan,

It seem what I am looking for (actually not exactly 100%, but really give me
an idea for it).

Regads,
Darmadi

"Stefan" <info(a)sanosoft.com> wrote in message
news:f426a0eb-f603-459c-91bf-f09f254a045e(a)b15g2000yqd.googlegroups.com...
> Darmadi,
>
> this example shows you how to fill a bBrowser with Listviewitems. I
> personally don't use it, it's only to give you a feeling how bBrowser
> works.
>
> Method FillBrowser() class dtaWindow
> local oServer as bArrayServer
> local oLvi as ListviewItem
> local aStruct as array
>
> aStruct := {{"NAME", "C", 30, 0}}
>
> oServer := bArrayServer{aStruct}
>
> oServer:Use(oServer)
>
> oLvi := Listviewitem{}
> oLvi:SetText(#NAME, "Darmadi")
>
> oBrowser:AddItem(oLvi)
>
> Method AddItem(oLvi as Listviewitem) class MyBrowser
> local oServer as bArrayServer
> local aColumnText as array
> local aColumnValue as array
> local dwLen, i as dword
>
> oServer := self:Server
>
> oServer:Append()
>
> aColumnText := oLvi:__ColumnTextList
>
> dwLen := ALen(aColumnText)
>
> for i := 1 upto dwLen
> oServer:FieldPut(aColumnText[i, 1], aColumnText[i, 2]
> next
>
> aColumnValue := oLvi:__ColumnValueList
>
> dwLen := ALen(aColumnValue)
>
> for i := 1 upto dwLen
> oServer:FieldPut(aColumnValue[i, 1], aColumnValue[i, 2]
> next
>
> oServer:Commit()
>
> return nil
>
>

From: Darmadi on
Yes Geoff,

Actually I understand the way I do is old way.
I'm not using DBServer in my programming, still old way, ALIAS

> You haven't really explained your need and why it should be constructed
> like a ListView. Listview is old technology and uses old techniques.
> Forget them. Go back to basics, analyse your need and cast the solution in
> terms of a table and bBrowser. Explain what you are doing and see if this
> forum can advise you on how to replace the listview with a properly
> designed bBrowser. I do not ever use listview any more. Too slow and too
> cumbersome and too inflexible. Let us help you to employ bBrowser
> properly.

What I need, when user type something, the system immediately search to the
data, even the user haven't finish typing.
So the user could see the real time-searching process, if they type
something wrong, they would know the data couldn't find.
Completely different with SQL, that user must finish typing, then we create
a SQL statement, then showing the quering data.
Until now, I don't want to change this behavior as I think the user would
complaint me, except I change all my database (DBF) to SQL, I think that
would be another year to do that.
But thanks to Stefan, he give the idea what should I do now.

Thanks Geoff.

Regards,
Darmadi

"Geoff Schaller" <geoffx(a)softxwareobjectives.com.au> wrote in message
news:6N6Qm.58363$ze1.25603(a)news-server.bigpond.net.au...
> Darmadi.
>
> You are thinking about this the wrong way. You don't need an array. You
> already have the DBF so it can be assigned to the bBrowser and then
> filtered and scoped to create the item list you need. If you are building
> it up from some slow collection mechanism then the other is OK but you
> mention large data sets. I doubt this is actually necessary.
>
> What is large anyway? 10,000 rows? If so, even for an array, this is no
> issue if you build your array correctly.
>
> You haven't really explained your need and why it should be constructed
> like a ListView. Listview is old technology and uses old techniques.
> Forget them. Go back to basics, analyse your need and cast the solution in
> terms of a table and bBrowser. Explain what you are doing and see if this
> forum can advise you on how to replace the listview with a properly
> designed bBrowser. I do not ever use listview any more. Too slow and too
> cumbersome and too inflexible. Let us help you to employ bBrowser
> properly.
>
> Geoff
>
>
>
>
> "Darmadi" <support(a)gfsoftindo.com> wrote in message
> news:heqr5a$8fh$1(a)aioe.org:
>
>> Thanks Steve,
>>
>> But as far as I know, bBrowser need dataserver or arrayserver to be
>> assign
>> to bBrowser.
>> That mean, if I create a method, then I need to create an array, then
>> assign
>> to bBrowser.
>> I have a problem when query a big data (I'm using DBF), then create an
>> arrayserver, afterward assign to bBrowser, that will use a lot time.
>> Especially, now I'm using ListView for real-time searching data on DBF to
>> be
>> show on ListView, if user type "A" then my system will automatically
>> search
>> everything start with "A", if user type again "AB" then my system will
>> automatically delete all ListViewItem then search everything start with
>> "AB"
>> again, so long. (so user could see the real-time of searching [system
>> showing item one-by-one])
>> So now if I implement bBrowser to replace the function of ListView, is it
>> possible?
>> As my logical thinking, if everytime user type something, then I create
>> an
>> arrayserver, then assign to bBrowser, will take more time than ListView
>> that
>> could be add item one-by-one.
>>
>> Sorry, for my poor english, hope you could understand what I mean..hehe
>>
>> Regards,
>> Darmadi
>>
>>
>> "Stephen Quinn" <stevejqNO(a)bigpondSPAM.net.au> wrote in message
>> news:C34Qm.58308$ze1.42588(a)news-server.bigpond.net.au...
>>
>> > Darmadi
>> >
>> > SubClass bBrwoser and create the new method.
>> > Eg
>> > MyBB3 INHERIT bBrowser3
>> > METHOD AddItem( ???? ) Clas MyBB3
>> >
>> > // Do whatever
>> >
>>
>> >> So I could manually create a ListViewItem then I add to ListView...
>>
>> > I don't know if BB3 supports ListView Items though
>> >
>> > CYA
>> > Steve
>> >
>

From: Darmadi on
Thanks Steve,

I will take a look at FTS, that give me another idea.

Regards,
Darmadi
"Stephen Quinn" <stevejqNO(a)bigpondSPAM.net.au> wrote in message
news:SmkQm.58541$ze1.31377(a)news-server.bigpond.net.au...
> Darmadi
>
> If all you require is a search mechanism have a look at FTS (Fast Text
> Search) (code available on Phils site http://www.sherlock.com.au follow
> the VO menu)
>
>> So now if I implement bBrowser to replace the function of ListView, is it
>> possible?
> Yes - think in terms of the DataBrowser instead of a Listview.
>
>> As my logical thinking, if everytime user type something, then I create
>> an arrayserver, then assign to bBrowser, will take more time than
>> ListView that could be add item one-by-one.
> No - you'd use the indices to SCOPE the data (can be altered on the fly)
> or
> if you want to search multiple fields then FTS is (IMO) the best way
> or
> go SQL and set up the queries appropriately
>
> CYA
> Steve
> "Darmadi" <support(a)gfsoftindo.com> wrote in message
> news:heqr5a$8fh$1(a)aioe.org...
>> Thanks Steve,
>>
>> But as far as I know, bBrowser need dataserver or arrayserver to be
>> assign to bBrowser.
>> That mean, if I create a method, then I need to create an array, then
>> assign to bBrowser.
>> I have a problem when query a big data (I'm using DBF), then create an
>> arrayserver, afterward assign to bBrowser, that will use a lot time.
>> Especially, now I'm using ListView for real-time searching data on DBF to
>> be show on ListView, if user type "A" then my system will automatically
>> search everything start with "A", if user type again "AB" then my system
>> will automatically delete all ListViewItem then search everything start
>> with "AB" again, so long. (so user could see the real-time of searching
>> [system showing item one-by-one])
>>
>> Sorry, for my poor english, hope you could understand what I mean..hehe
>>
>> Regards,
>> Darmadi
>>
>>
>> "Stephen Quinn" <stevejqNO(a)bigpondSPAM.net.au> wrote in message
>> news:C34Qm.58308$ze1.42588(a)news-server.bigpond.net.au...
>>> Darmadi
>>>
>>> SubClass bBrwoser and create the new method.
>>> Eg
>>> MyBB3 INHERIT bBrowser3
>>> METHOD AddItem( ???? ) Clas MyBB3
>>>
>>> // Do whatever
>>>
>>>> So I could manually create a ListViewItem then I add to ListView...
>>> I don't know if BB3 supports ListView Items though
>>>
>>> CYA
>>> Steve
>>>
>>
>
>

From: Stephen Quinn on
Darmadi

> Completely different with SQL, that user must finish typing, then we
> create a SQL statement, then showing the quering data.

Nope - you set up a timer (200-300ms) to send a query between each
keystroke.

CYA
Steve


First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: SQLSERVER SqlListTables
Next: Linear Owner Alignment