Print Page | Close Window

API: String (FixedList) types

Printed From: MetaCase
Category:
Forum Name: MetaEdit+
Forum Description: All topics relating to MetaEdit+ or DSM
URL: https://www.metacase.com/forums/forum_posts.asp?TID=65
Printed Date: 27.Mar.2026 at 02:15
Software Version: Web Wiz Forums 12.05 - http://www.webwizforums.com


Topic: API: String (FixedList) types
Posted By: utumno
Subject: API: String (FixedList) types
Date Posted: 01.Nov.2008 at 23:28
Hello,

I'am trying to set property values with the setValueAt() method of the API. It is working fine except for those properties whose type in the graph is 'String (Fixed List)'.

If I examine the property with the help of the API, the type 'String' and the correct value e.g. 'HALT' is shown. However, if I am setting the value with setValueAt(), no String of the list is selected afterwards in the model.

One example:
MEAny val = new MEAny();
val.setMeType("String");
val.setMeValue("HALT");
port.setValueAt(f, 1, val);

Setting the third value of f in this example (which is an Integer) works fine, so there is no problem with f.

Does anybody have an idea what I am doing wrong?

Thanks, Kirsten



Replies:
Posted By: rise
Date Posted: 03.Nov.2008 at 12:07
Hi Kirsten,
 
The problem in your example code is the missing string quotes. Instead of
 
val.setMeValue("HALT");
 
you should have:
 
val.setMeValue("'HALT'");
 
With best regards,
 
Rise
 


Posted By: utumno
Date Posted: 03.Nov.2008 at 20:54
Thanks a lot! It's working fine now.

Thanks, Kirsten



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.05 - http://www.webwizforums.com
Copyright ©2001-2022 Web Wiz Ltd. - https://www.webwiz.net