BKS Active Record/Argen related record question

I like the work B Keeney has done on Active Record. (Nice work Bob and crew!)

That and Argen sure save a lot of time if you work on a lot of database projects.

I do have a question however
I have set up a sample database with 2 tables and Active Record has created two classes

[code][Companies]
-ID
-Name

[People]
-ID
-Company_ID
-Full_Name[/code]

Active Record / Argen have set up a property in People.oCompanies

I wish to add to a list box ( load the record sets using the List function that Active Record / Argen provides)

//FullName, Company Name listbox1.addrow people.Full_Name, people.oCompanies.name //

people.oCompanies.name <–this line is obviously the error: what am i missing?

PS Bob, I see you guys use oxxxxx and moxxxxxx What does ‘o’ and ‘mo’ stand for?

ARGen uses BKeeney naming standards by default. Without knowing what error you’re getting, are you sure you don’t mean sName?

We use type-prefixes. Fields that are Text use Xojo Strings (because it’s using the classic framework), so the property is likely to be sName. You can change this setting in ARGen though, so the error message would be more helpful.

A type-prefix of o is for Object, an instance of a class (which we prefix cls).
A prefix of m means it’s private. mo means it’s a private object. maro would be a private array of objects.

More details here: http://www.bkeeneybriefs.com/2014/08/naming-conventions-2/

I would start by simplifying your statement:

dim oCompany as Data.Companies
oCompany = People.oCompanies

Does that work? If not, then look at oCompanies. I will guess that it’s either private, or the code in the computed property is not actually hooked up.

o is our prefix for this is an instance of an object. m ‘usually’ means private but that’s not an absolute.

Thanks Bob

Turns out the code in the computed property is not actually hooked up!

PS m= “mum”? (mums the word?)