[NTLK] How to change a soup entry slot?

From: Jaime Méndez (servafin_at_prodigy.net.mx)
Date: Wed Oct 20 2004 - 17:58:13 PDT


Hi,

Could anybody help me with this?

I wat to get a soup entry slot value. I have the slot name in a string
varible: slotName:="name";. The entry name is "myEntry".

What I do is de following:

for each item, value in myEntry do
   if strEqual(item&"", slotName) then myValue:=value;

It compares the string value of each slot symbol name in "myEntry" with the
string value of the variable "slotName".

It works, I do get the slot value in variable "myValue".

The question:

How do I change the slot value of "myEntry"?

The following did not work:

for each item, value in myEntry do
   if strEqual(item&"", slotName) then
      begin
         myEntry.item:= otherValue;
         EntryChangeXmit(myEntry,nil);
      end;

It just creates an othre slot named "item" instead of changeing the slot
with the slot labeled "name". What am I doing wrong?

I can not do this:

myEntry.slotName:=otherValue;
EntryChangeXmit(myEntry,nil);

because slotName is a string variable not a symbol.

Thanks,

Jaime Méndez.

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/


This archive was generated by hypermail 2.1.5 : Thu Oct 21 2004 - 19:00:02 PDT