×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    272

    Question How to set value to PropertyAction from a function?

    This must be a silly question, but how can I set the value of an Animation PropertyAction from a function? This is what I have:

    Code:
    PropertyAction { target: imageU1; property: "source"; value: currentActual() }
    The currentActual() is the function that returns the value needed. But I get this when I try to run it and it doesn't work:

    Binding loop detected for property "value"
    Any hep would be appreciated.

    Cheers
    http://www.ic-mobile.com/

  2. #2
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: How to set value to PropertyAction from a function?

    You are most likely referencing the 'value' property inside the function, and that is why it is detecting a binding loop.

    We don't know what the purpose is or what you are doing inside the function, but maybe you can assign the value directly inside the function (instead of returning it), and call the function when something happens.
    -CarlosDL

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    272

    Re: How to set value to PropertyAction from a function?

    Quote Originally Posted by cadlg View Post
    You are most likely referencing the 'value' property inside the function, and that is why it is detecting a binding loop.

    We don't know what the purpose is or what you are doing inside the function, but maybe you can assign the value directly inside the function (instead of returning it), and call the function when something happens.
    No, I don't think so. This is what the very simple function is doing:
    Code:
    function currentActual() {
            if (actualNumber != 9) {
                actualNumber += 1
            } else {
                actualNumber = 0
            }
            return actualNumber
        }
    http://www.ic-mobile.com/

  4. #4
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: How to set value to PropertyAction from a function?

    Where does actualNumber come from ?
    -CarlosDL

  5. #5
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: How to set value to PropertyAction from a function?

    Ran a couple small tests but wasn't able to reproduce it.

    I'm sure somebody else will provide more help.

    You might want to post some more code and let others know where you have the function code, and any other detail you consider important.

    p.d I wonder why you are trying to assign a numeric value to the source property of an image.
    -CarlosDL

  6. #6
    Registered User
    Join Date
    Jan 2010
    Posts
    272

    Re: How to set value to PropertyAction from a function?

    Quote Originally Posted by cadlg View Post
    Ran a couple small tests but wasn't able to reproduce it.

    I'm sure somebody else will provide more help.

    You might want to post some more code and let others know where you have the function code, and any other detail you consider important.

    p.d I wonder why you are trying to assign a numeric value to the source property of an image.
    Yes, I had something missing from the sample code. Here is the full version of the function:

    Code:
        function currentActual(upper) {
    
            var result
    
            if (actualNumber != 9) {
                actualNumber += 1
            } else {
                actualNumber = 0
            }
    
            if (upper) {
                result = "../../Images/digits/" + actualNumber + "-u.png"
            } else {
                result = "../../Images/digits/" + actualNumber + "-l.png"
            }
            console.log(actualNumber)
            return result
        }
    The problem I'm having now (besides the binding loop) is that the animation gets the value of the function only ones, even though it's running loops.
    http://www.ic-mobile.com/

Similar Threads

  1. how to set setting item value
    By nokia_lin in forum Symbian User Interface
    Replies: 4
    Last Post: 2009-07-15, 08:17
  2. How to set Maximum value in CMdaAudioPlayerUtility
    By pranay_preet in forum Symbian
    Replies: 2
    Last Post: 2009-01-15, 05:36
  3. How to set a ring tone to RegisterAlarm function
    By jainish in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2008-08-09, 12:32
  4. How to set value in Floating Point Editor
    By mubrew123 in forum Symbian User Interface
    Replies: 0
    Last Post: 2007-02-14, 13:05
  5. Replies: 4
    Last Post: 2005-12-01, 03:45

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×