.value Is A Read-Only Property S’abonner

0
Avatar
Legacy Poster

I know this has been discussed previously, but I thought it was normally because users tried to set it from Format.Objects("object_name").Value

 

This is the line of code I'm using:

     Format.NamedSubStrings("freight_terms_collect").Value = "X"

 

BarTender errors with:

     OnNewRecord(Line 70)::Unable to write read-only property.

 

There is a named data source with that name. What have I overlooked? I'm sure I've done something stupid, here- this is pretty simple, but my brain is on ciesta.

 

Thanks-

6 commentaires

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Any chance you're running this script in the "BarTender Document Options" section? Because I think that section CAN manipulate objects but CANNOT manipulate data sources.

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Ugh! That would be the answer! Thanks a bunch - Is that documented, or just some tribal knowledge acquired over time? (I don't want you to dig for a manual page number or anything, but just curious)

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

I think there are mentions of this general issue (different script locations not being able to do the same stuff) but... let's face it, it's still kinda tribal knowledge :D

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

The text of a label component I would think would be the primary things that people would want to alter.

It seems really weird that I can change other detail of the field, like the color, etc with no difficulty.

I don't see the purpose behind locking down the text, but oh well.

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

This slipped back into my mind over the weekend: Can you work with Format.Objects("...").Value ?

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Hi KM3,

    That was the first thing I tried, since all the other object manipulation is performed that way. Then after seeing some other user's questions about how to reference object text, I attempted the other method. Until your comment, though - I hadn't seen any information about the "scope" with which functionality could be used within VBS in BarTender.

    The Format.Objects("...").Value method works just fine to adjust objects in other ways, like changing the text color, etc.

Vous devez vous connecter pour laisser un commentaire.