main logo
Subject: Re: cifviewcombobox problems
Author: Mike Devlin
Posted: 2000/11/30 11:19:57
 
View Entire Thread
New Search


<I><FONT COLOR="#663300"><I><FONT COLOR="#663300">Hello again everybody,
It's the rookie, back with more questions. I was trying very hard to solve these problems myself, but if anyone can help please do.

I am working on subclassing the cifcombobox, to make it based on a view instead of a table. I am working with the example posted by Jose Constant from message 3865.
I created a view (v_agreecombo) with the cid field and a character field from one of my tables.
I created the agreecomboDE and v_agreecombo as cdynamicviewcursor in adataenv.prg.
I created a bizobj which loads the v_agreecombo.
I have over written the init(), requery() and gotfocus() using Jose's example.
I have the following property values:
BoundColumn = 1 (corresponding to the cid column)
ColumnCount = 2
ColumnWidths = 0, 100
RowSource = v_agreecombo
RowSourceType = 2 - Alias
Style = 0 - Dropdown combo
calias = v_agreecombo
cfield = agreenum
clookupalias = v_agreecombo
clookupfield = v_agreecombo.agreenum (character field, 2nd column)
ldisplayinitialvalue = .T.

I have the following problems:
1. The form flows right from activate to destroy, and simply flashes by, I would like it to stay around for a while, or until I want it to destroy anyway. I set breakpoints in various spots to see what was happening, and compared it to a previous form,, but I cannot tell what is different.

2. With breakpoints set, I can play with the form before it destroys. The initial value is the first agreenum in the view, so far so good. When I choose a value from the list, the cid value becomes the display value. I want the agreenum value to remain there instead.

3. I am not able to type in a value into the combo box. I was expecting to be able to type in characters, and have the list requeried with each keypress. So, if I know the first few digits of an agreenum, I could key them in, and then search the list for the specific record to choose.

Again, I know I am missing something, but I hope You can show me the way.

One thing that was really puzzling me was exactly how does one set an index to a view? I know how to order the view, but how do you set index to a view, and where?

</FONT></I>Nevermind about #1, I had overwritten the init(). I meant to put the Thisform.Requery in the activate() but mistakenly put it in the init(). One less thing.

</FONT></I>OK, nevermind about creating indexes on views. I looked at the adataenv.prg from the FCMPROD project and found the createindices function, and have used that format to create the index and tag for the view. I am learning, but any help on the other two problems is still appreciated. =)

Devman
mdevlin at ajdebruin .DOT com

 
©2000 Mike Devlin
<-- Prior Message New Search Next Message -->