Hi Christian,
When I I want to replace a value in a ABMutableMultiValueMBS, my app
crashes all the time, so I modified your code example to see if the
issue was related to my application or more generally to the
ABAddressBookMBS class.
RS2011R3 Lion and Snow Leopard (tested on both systems)
I put the code below in the Open Event of a Desktop Project:
// get an entry
dim a as new ABAddressBookMBS
dim p as ABPersonMBS = a.owner
dim m as ABMultiValueMBS
m=p.valueForProperty(a.kABEmailProperty)
// query all emails
dim e as ABMutableMultiValueMBS =
m.edit//p.valueForProperty(a.kABEmailProperty)
// walk over all
dim u as integer = e.count-1
for i as integer = 0 to u
dim label as string = e.labelAtIndex(i)
dim value as string = e.valueAtIndex(i)
// show label and value for this entry
MsgBox str(i)+": "+label+", "+value
// is it home?
if label = a.kABWorkLabel then
//MsgBox "Work: "+value
MsgBox Str(e.replaceValueAtIndex(i, "[email protected]"))
end if
next
Exception err as NSExceptionMBS
MsgBox err.Message
It still crashes all the time.
Yoann
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info