Ask Experts Questions for FREE Help !
Ask
    ClaireGilb's Avatar
    ClaireGilb Posts: 3, Reputation: 1
    New Member
     
    #1

    Sep 24, 2009, 06:05 AM
    Remembering Ratings
    Hi,

    I am trying to re-programme a VB task and I need to make the following addition:
    The task involves the use of 2 rating scales. I want the participant to make their rating on the first scale and then, once the second scale comes up (after the participant is given additional information), I want for the scale to appear with the last rating as the starting point.

    e.g..
    If this is scale 1 as it appears

    ------------------------------X---------------------------------

    and the participant mvoes the X using the keypad to here on the first rating:

    ----X-----------------------------------------------------------

    I want for whenthe next scale comes, the code not to start with the X in the centre, but instead to start at the point where the participant last rated (in the first scale)

    I am trying to measure the difference in the ratings (of happiness) before and after a certain event.
    This is how the relevant (I think!) area of the trial code is looking

    '(9)Rate result
    '
    If Me.bRateObtainedOutcome Then
    Me.iHappinessStartTime = timeGetTime
    Me.fHappinessRating = doRating(Me.m_OutcomeRating)

    Me.iHappinessRatingTime = timeGetTime


    '(11) Rate regret
    '
    If Me.bRateAfterBothOutcomes Then
    Me.iRegretStartTime = timeGetTime
    Me.fRegretRating = doRating(Me.m_FinalRating)
    Me.iRegretRatingTime = timeGetTime
    End If

    Can anyone help me! I gather that it's something to do with creating a "remember" clause after the first rating or something like that...


    Claire
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #2

    Sep 24, 2009, 07:49 AM
    I want the participant to make their rating on the first scale and then, once the second scale comes up (after the participant is given additional information), I want the scale to appear with the last rating as the starting point.

    e.g..
    If this is scale 1 as it appears
    ------------------------------X---------------------------------

    and the participant moves the X using the keypad to here on the first rating:

    ----X-----------------------------------------------------------

    I want for when the next scale comes, the code not to start with the X in the centre, but instead to start at the point where the participant last rated (in the first scale)

    I am trying to measure the difference in the ratings (of happiness) before and after a certain event.
    I'm not sure where you're getting lost. It sounds very simple. You create a global variable (or a static local variable) and place the value in that variable. Then, when you display the second scale, you take the value from the global variable and use it.

    Private SavedHappiness as integer = 0

    '(9)Rate result
    '
    If Me.bRateObtainedOutcome Then
    Me.iHappinessStartTime = timeGetTime

    Me.fHappinessRating = doRating(Me.m_OutcomeRating)
    SavedHappiness = me.fHappinessRating ' save the happiness rating for later use.

    Me.iHappinessRatingTime = timeGetTime

    '(11) Rate regret
    '
    If Me.bRateAfterBothOutcomes Then
    Me.iRegretStartTime = timeGetTime

    ' I'm not sure what all this means. The final rating could be set to the saved happiness if this is what is called for the user to perform the rating.
    Me.m_FinalRating = SavedHappiness

    Me.fRegretRating = doRating(Me.m_FinalRating)
    Me.iRegretRatingTime = timeGetTime
    End If
    ClaireGilb's Avatar
    ClaireGilb Posts: 3, Reputation: 1
    New Member
     
    #3

    Sep 24, 2009, 08:50 AM
    thanks! But I'm still running into difficulty- something to do with integer vs double settings in the code I think.

    Private SavedHappiness As Integer = 0


    '(9)Rate result
    '

    If Me.bRateObtainedOutcome Then
    Me.iHappinessStartTime = timeGetTime
    Me.fHappinessRating = doRating(Me.m_OutcomeRating)
    SavedHappiness = CInt(Me.fHappinessRating) 'I had to convert to Integer to get the error message gone)
    Me.iHappinessRatingTime = timeGetTime
    '

    '(11) Rate regret

    If Me.bRateAfterBothOutcomes Then
    Me.iRegretStartTime = timeGetTime
    Me.m_FinalRating = SavedHappiness

    'error message here reads: Value of type 'Integer' cannot be converted to 'GameTask.Trial.Rating'.

    Me.fRegretRating = doRating(Me.m_FinalRating)
    Me.iRegretRatingTime = timeGetTime
    End If

    I've tried doing it all in double, but the same thing keeps happening- except it says 'double' in the above error instead of integer

    I am a VB novice- in case not already obvious! Any help is MUCH appreciated!

    Claire
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #4

    Sep 25, 2009, 05:24 AM

    What values does "GameTask.Trial.Rating" hold? I guess what I'm asking is what is its type. Until I understand that, I can't help you with converting something to that.

    You can declare SavedHappiness as type "double". Then you would use "CDBL()" to convert Me.fHappinessRating to SavedHappiness.

    Types are sometimes confusing to novices, but they're very important to programmers.
    ClaireGilb's Avatar
    ClaireGilb Posts: 3, Reputation: 1
    New Member
     
    #5

    Sep 25, 2009, 06:10 AM

    I just got it to work!
    Thanks a million for your help!

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Remembering the name of a TV show [ 1 Answers ]

I am trying to think of the name of a sitcom that aired in the 90's. It was about a married couple that lived in a house and the wife's sister and sister's husband lived in the guest house in the back yard. One of the men's names were Greg and Jimmy and one of the girl's names was Christine.

Men remembering first kiss [ 12 Answers ]

Is a guy prone to remember is first kiss? Not like little innocent kiss you had when you were like 5 , but say your first girlfriend or real relationship.. even though you went your separate ways or just ended up not likeing each other whatsoever.. would you still relee cherish that moment? And...

Remembering how to get over someone. [ 4 Answers ]

So my boyfriend and I split. I had been having my doubts anyway and the break up was possibly the most horrific thing I've ever been through. He told me he didn't want the LDR thing, fair enough, said he had too much stuff on his plate with his work, fair enough, said he didn't want a...


View more questions Search