SetWeight question

Rick O'Gorman rickogorman at gmail.com
Wed Dec 10 21:10:04 UTC 2008


One other thing that is not causing your problem but did afflict me is 
that if you have a list with weights set to 0, and that list calls 
procedure(s) which in turn call a list, beware! If you sue a script to 
set the weights in the higher level list to 1, and also to set the 
weights in the lower level list, it will only change the weights in the 
higher level list. The weights in the lower level list(s) will not be 
accessed by script if the higher level list's weights are initially 0.

Lost several hours trying to track that problem down...(I am currently 
using 2.0.1 so its possible this is a bug which has been fixed, anyone 
know?)

Rick

andreeann Cyr wrote:
> Thanks David! Much appreciated!
> 
> On Wed, Dec 10, 2008 at 1:35 PM, David McFarlane <mcfarla9 at msu.edu 
> <mailto:mcfarla9 at msu.edu>> wrote:
> 
> 
>     Andrée-Ann,
> 
>     Nicole Anderson wrote:
>      > Try adding this after your code (should be ok after all the changes)
>      >
>      > StudyOne.Reset
> 
>     And while you are at it, you can probably also skip all the If-Thens and
>     simplify the whole thing to something like
> 
>     For i = 1 to StudyOne.Size
>         StudyOne.SetWeight i, StudyOne.GetAttrib(i, "Cond")
>     Next i
>     StudyOne.Reset
> 
>     -- David McFarlane, Professional Faultfinder
> 
> 
>      > andreeann Cyr wrote:
>      >> Hi All,
>      >>
>      >> I have a question about how to set the value of weights in a list.
>      >>
>      >> The program initially reads into a text file and I want the weight
>      >> value to change to correspond to a value in another column (i.e.
>      >> "Cond" in this case).
>      >>
>      >> Right now, I have the following code (StudyOne is my list):
>      >>
>      >> If   StudyOne.GetAttrib(i, "Cond") = "1" then
>      >>     StudyOne.SetWeight i, 1
>      >> End if
>      >>
>      >> If   StudyOne.GetAttrib(i, "Cond") = "2" then
>      >>     StudyOne.SetWeight i, 2
>      >> End if
>      >>
>      >> And so forth....
>      >>
>      >> And it's not working! The weight values remain at 1. Any
>     suggestions?
>      >>
>      >> Thanks in advance :)
>      >>
>      >> Andrée-Ann
> 
> 
> 
> 
> 
> 
> -- 
> "I have access to the alterity of the Other from the society I maintain 
> with him, and not by quitting this relation in order to reflect on its 
> terms." (Levinas)
> 
> 
> 
> > 

-- 
Rick O'Gorman, PhD
Psychology, Faculty of Development and Society
Collegiate Crescent Campus,
Sheffield Hallam University,
Sheffield
S10 2BP

Phone: 0114 225 5788 Fax: 0114 225 2430

http://www.shu.ac.uk/psychology/staff/OGorman.html

Experience is what you get when you don't get what you want.
                                 --Dan Stanford

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list