On Sep 27, 2006, at 8:17 AM, Bart Pietercil wrote:
Hi,
this worked:
defined and filled CurrentStudentRecord as a Dictionary having the
DBColumnName as Key
defined a subclass from editfield named sqlite_field
with an extra property DBColumnName
added an interface to the class with a DisplayStudentInfo method
defined App.StudentFields() As sqlite_fields
in the change event of my listbox the code
for i = 0 to Ubound(App.StudentFields)
App.StudentFields(i).DisplayInfo
next
updates all the sqlite_fields with their appropriate values
JOY
now I want to add some popupmenus to the dance
so I subclassed a popupmenu as sqlite_pumenu that interfaces with
the DisplayStudentInfo method
-------
this does not work and where I am at lost
I cannot add my sqlite_pumenu's to App.StudentFields (it is not a
sqlite_field)
I changed the StudentFieldsArray to type Control. This seems to
work as RB does not complain when I add the sqlite_xxxx to the array.
However RB does not accept the line App.StudentsFields
(i).Displayinfo . This line only seems to work when the array is of
type sqlite_field
At this point you should be able to cast to expose the subclass
functionality: Sqlite_field(App.StudentsFields(i)).DisplayInfo,
since, as I understand it, App.StudentsFields(i) of data type Control
is actually a Sqlite_field.
Perhaps a dictionary would be a better design choice than any array,
however.
Best,
Jack
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>