TOPIC: Frustration with ExplorerVirtualListViewControl
#1101
Frustration with ExplorerVirtualListViewControl 2 Years, 6 Months ago
I have just discovered the ExplorerVirtualListViewControl, which will make my development of this application much much much much easier. However, I'm experiencing lots of frustration with getting it working.
My problem is that, while running the following code directly from the Workspace works perfectly:
Code:


ExplorerVirtualListViewControl(
#("ExplorerListModel", "bkcatalog" ("bkid"')),
#(Form
(Button 'New') (Button 'Delete') nl nl
(isbn group: 0) (author group: 1) (illustrator group: 2) nl
(title group: 0) (series group: 1) (publisher group: 2) nl
(genre group: 0) nl
(classification group: 0) (agelvl group: 1) nl
(cpyrt group: 0) (edition group: 1) (no_cpy group: 2) nl
(awards group: 0) (lang group: 1) (cond group: 2) nl
(signed group: 0) nl
(antique group: 0)
),
query: "bkcatalog"
title: "Search the Library"
)



this other code, put into a Library record called SearchCatalog, fails:
Code:


#(ExplorerVirtualListView(
#("ExplorerListModel", "bkcatalog" ("bkid"')),
#(Form
(Button 'New') (Button 'Delete') nl nl
(isbn group: 0) (author group: 1) (illustrator group: 2) nl
(title group: 0) (series group: 1) (publisher group: 2) nl
(genre group: 0) nl
(classification group: 0) (agelvl group: 1) nl
(cpyrt group: 0) (edition group: 1) (no_cpy group: 2) nl
(awards group: 0) (lang group: 1) (cond group: 2) nl
(signed group: 0) nl
(antique group: 0)
),
query: "bkcatalog"
title: "Search the Library"
)
)


If I run the above using Window(SearchCatalog), I get the error shown in the screenshot attached. Please help!

Update: I get exactly the same problem with the examples given for this in the User Manual.

Post edited by: steelwing, at: 2008/02/03 03:27
 
 
#1105
Re:Frustration with ExplorerVirtualListViewControl 2 Years, 6 Months ago
When you put your definition into a library record, you can not 'call' the ExplorerListView like a function. Instead, just place your control specification in an object where the first value in the object is the name of the control. Your code should look something like this in the library:

Code:


#(ExplorerVirtualListView
    #("ExplorerListModel", "bkcatalog" ("bkid"')),
    #(Form
        (Button 'New') (Button 'Delete') nl nl
        (isbn group: 0) (author group: 1) (illustrator group: 2) nl
        (title group: 0) (series group: 1) (publisher group: 2) nl
        (genre group: 0) nl
        (classification group: 0) (agelvl group: 1) nl
        (cpyrt group: 0) (edition group: 1) (no_cpy group: 2) nl
        (awards group: 0) (lang group: 1) (cond group: 2) nl
        (signed group: 0) nl
        (antique group: 0)
    ),
    query: "bkcatalog"
    title: "Search the Library"
)

 
 
Jeff Ferguson
Suneido Software
 
#1106
Re:Frustration with ExplorerVirtualListViewControl 2 Years, 6 Months ago
Hurrah!! :D
Not sure what you changed, but your code works where mine didn't! Thank you for that help! :)
Now for the next problem. My view doesn't "sync" with the selected record in the control's browse view. Here's a screenshot...

As I understand it, the complete contents of the record should display in the view below the table, but the view is empty...
Also, if I want to only see certain columns in the table, what is the best way to pass those? The user manual says the list of columns to display should always be "passed through the model", and never through the columns property of the ExplorerVirtualListView, but I'm not sure what that means.

Post edited by: steelwing, at: 2008/02/05 01:50
 
 
#1107
Re:Frustration with ExplorerVirtualListViewControl 2 Years, 6 Months ago
The code looks correct to me. It is hard to see what the problem is without being able to debug the code. If you want specific columns, pass them as an object in the columns parameter of ExplorerListViewControl. The field names used in the view must match the field names from the query.

If you are still having problems with the ExplorerListView you may want to consider posting your table schema for the bkcatalog table (from SchemaView). That way I could create a table with the same schema and use the same ExplorerListViewControl definition and then hopefully be able to figure out why the view is not working.
 
 
Jeff Ferguson
Suneido Software
 
#1108
Re:Frustration with ExplorerVirtualListViewControl 2 Years, 6 Months ago
jferguson wrote:
If you are still having problems with the ExplorerListView you may want to consider posting your table schema for the bkcatalog table (from SchemaView). That way I could create a table with the same schema and use the same ExplorerListViewControl definition and then hopefully be able to figure out why the view is not working.

Sure, here's the schema.
Code:

bkcatalog
    (agelvl, antique, author, awards, bkid, classification, 
        cond, cpyrt, edition, genre, illustrator, 
        isbn, lang, no_cpy, publisher, series, 
        signed, title)
    index (author,title)
    key (bkid)

Foreign Keys
loans index(bookid) in bkcatalog cascade(bkid)


That foreign key links to a table called loans, here's the schema for that if you need it:
Code:

loans
    (bookid, lndate, lnid, lnname)
    index (bookid) in bkcatalog(bkid) cascade
    key (lnid)


I edited the ExplorerVirtualListView so that now it looks like this:
Code:

#(ExplorerVirtualListView
#("ExplorerListModel", "bkcatalog" ("bkid"')),
#(Form
(Button 'New') (Button 'Delete') nl nl
(bkid group: 0) nl
(isbn group: 0) (author group: 1) (illustrator group: 2) nl
(title group: 0) (series group: 1) (publisher group: 2) nl
(genre group: 0) nl
(classification group: 0) (agelvl group: 1) nl
(cpyrt group: 0) (edition group: 1) (no_cpy group: 2) nl
(awards group: 0) (lang group: 1) (cond group: 2) nl
(signed group: 0) nl
(antique group: 0)
),
query: "bkcatalog"
columns:  (bkid, author, title, genre)
title: "Search the Library"
)


Still no records coming up in the view below the browse list.

Post edited by: steelwing, at: 2008/02/06 04:15
 
 
#1109
Re:Frustration with ExplorerVirtualListViewControl 2 Years, 6 Months ago
I created those two tables and copied the code to my test DB. It works fine and your ExplorerVirtualListViewControl looks ok for me. For further debugging, could you dump you library and attach it to the forum or also the stdlib if you overrided any records in stdlib.
 
 
#1111
Re:Frustration with ExplorerVirtualListViewControl 2 Years, 6 Months ago
judy wrote:
I created those two tables and copied the code to my test DB. It works fine and your ExplorerVirtualListViewControl looks ok for me. For further debugging, could you dump you library and attach it to the forum or also the stdlib if you overrided any records in stdlib.
Nope, I haven't touched stdlib. I've exported my library to a .su and attached it to this post.
File Attachment:
File Name: lmscodelib.zip
File Size: 1605


Post edited by: steelwing, at: 2008/02/07 01:44
 
 
#1112
Re:Frustration with ExplorerVirtualListViewControl 2 Years, 6 Months ago
OK, I think I might have this one figured out. I looked back at my library, and for some strange reason, I had defined my key field (bkid) as a string! I don't know why I did that, but I'm sure it made sense at the time. :P Either way, the ExplorerListView's table and view sections are synced now, so everything seems to be working. B) Thank you so much for all your help!