Extension Method Requires Conversion

I am updating an old set of methods to the most recent version and I received this error I can’t solve.

“Extension method Realbasic.len requires a conversion from type Variant to type String; use CTYpe to explicitly convert first”

Here is some sample code:
j = Regulard_MOdule.mytranscriptText_Dictionary.value(key).len-linestrim.len

It is blowing up at the len part.

  1. dictionaries return variants
  2. variants have a StringValue method
  3. stringValue returns a string that you can use len on

so if this was initially (note the addition of StringValue before len) like

j = Regulard_Module.mytranscriptText_Dictionary.value(key).StringValue.len - linestrim.len

then LEN with LENGTH

I feel honored you replied, I’ve read your posts for years - thank you!

Converting all my apps to the Web and cloud.

I help out where I can

[quote=461701:@John Callis]
Converting all my apps to the Web and cloud.[/quote]

Great to see you here around on the forum.
I just looked into pictures today from 12 years ago when I visited you at REALworld 2017.