Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sat Nov 18, 2017 11:51 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: SetobjProp()
PostPosted: Sat Jul 04, 2009 9:00 pm 
Offline

Joined: Wed Apr 11, 2007 4:47 pm
Posts: 32
what is correct way to use function SetobjProp() change valeu property of a LabelV2 object

I use followin


objRef=GetObjRef("labelObj")
SetobjProp( objRef, "value", Value$)

Value$ contant a String I would like to change.

when it run I have got an Exception "illegal value given by string (sevirity: 5)"


Top
 Profile  
 
 Post subject: Re: SetobjProp()
PostPosted: Mon Jul 06, 2009 7:49 am 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
Here is some example code where I set the value property of a label using SetObjProp.

Code:
dim obj as objref
dim v as string
v := "abc"
obj := GetObjRef("label_1")
setobjprop(obj, "value", "\"" + v + "\"")


However, I don't gain anything by using setobjprop in the above example. I could also set the value property directly.

Code:
dim v as string
v := "abc"
label_1.value = v

_________________
Ron L.

http://www.beijerelectronicsinc.com/


Top
 Profile  
 
 Post subject: Re: SetobjProp()
PostPosted: Thu Jul 23, 2009 1:22 pm 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
And if you can set the property directly you should as it is about 50-100x faster.

SetObjProp is designed to allow a limited amount of "remote control" by another device. It can also be used in situations where you have objects of many different types that all share a property name (although the latter case is generally better handled with inheritance)

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group