"Roland Winkler" <wink...@gnu.org> writes:

> On Fri Dec 28 2012 Eric Abrahamsen wrote:
>> Yup, I thought of this problem but it seems like it's fudged in
>> other places (ie you can't complete on subsequent values in an AKA
>> field) so I figured this was good enough for now.
>
> It's different in the sense that the values of the organization
> field are shared more often among different records. For something
> like AKA this would be odd.  But AKAs are used in the MUA interface.
> For the organization field this would not be possible. Ultimately,
> this defines the difference between these fields from a more
> conceptual point of view.

Yes, I guess it's sort of the same idea in reverse. Anyhow in this case
Stefan's suggestion of `completing-read-multiple' works. I've tried
using that in `bbdb-read-string' and it works as advertised. Looking
through the code, the only thing this would screw up would be completing
labels for phones and addresses -- suddenly it would be possible to add
multiple labels to phones/addresses, which would be nonsensical. There
would be a number of relatively simple ways around that, though.

>> I can make a record for an organization, with its organization name in
>> the name field, and say an office front desk number in the phone field,
>> etc, but them is there a way of indicating that a separate record (for a
>> person), works there? I can't fill the person's organization field with
>> a "foreign key" to the organization record, right?
>> 
>> I realize this is approaching a relational database model, and is
>> a can of worms that's probably not worth opening. I was just curious.
>
> Ultimately this is not so different from, say, families of friends.
> In a a way, families are just small organizations. It would be nice
> if such records could share fields like the mailing address and home
> phone numbers. But I have no clue how to implement that within BBDB.

Probably you'd end up using EIEIO to make different classes for people,
phones, addresses and organizations, and linking them together. I've
thought before (in a very idle way) that the structs BBDB currently uses
might be better replaced by classes. Awful lot of work, though.


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to