SPONSORS:






User Tag List

Results 1 to 8 of 8

Thread: Scale Class

  1. #1
    Junior Member
    Join Date
    Feb 2000
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Scale Class

    I'm testing a volume control that uses a scale to control the output. I'm able to get the position and range using Silk's built-in methods, but the SetPosition() returns an error that the value cannot be reach. I can see the slider moving to a new position that corresponds to the correct value. I used GetRange() to ensure that my integer is within the range. I checked the known bugs with the release notes. Does anyone have a work-around?? Thanks in advance...

    message: *** Error: Position 93 cannot be reached

  2. #2
    Junior Member
    Join Date
    Oct 2001
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale Class

    I'm having the exact same problem.

    I think it comes form the slider having a range of 0 to 1000, but it's only about an inch long on the screen. So I'm sure the number of positions (1001) is far greater than the number of pixels available.

    Here's what I'm assuming: Say I'm trying to move this slider to position 523. Silktest tries to set this using the mouse but say the nearest value using the mouse is 518. Moving the mouse one more pixel to the right sets the slider to position 539. So SilkTest raises an exception (after struggling with it forever...).

    If SilkTest would raise the exception immediately, I would handle it with an 'except' statement, but it doesn't. It takes forever, despite any Agent options that I've tried so far. Anybody know a way around this delay? Some obvious option I've overlooked?

    I've also noticed working with this slider that I can hit the <left> and <right> arrow keys to move it. To move the slider one pixel takes many keystrokes, so this is consistent with what I'm assuming (the mouse alone is not able to get every position). So, I guess I could write a function that will move the slider only by using the keyboard, but that will take forever to execute!

    The only other option I can think of is to move the slider using pixels instead of the slider's range. But I'm hoping I don't have to go that way!

    Any ideas?

    -Chris

    ------------------

  3. #3
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale Class

    An observation and a suggestion.

    First is there any practical value in even attempting to test smaller increments than a human user can ever apply with the slider? If that level of resolution is actually supported, I'd consider the slider to be a potential usability issue. A text field with a number might be a better approach.

    The suggestion is to contact Segue support and request a solution or work around. (It seems to me that you're on the right track in your analysis.)

    John


    ------------------

  4. #4
    Junior Member
    Join Date
    Oct 2001
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale Class

    Thanks for the reply John!

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>
    First is there any practical value in even attempting to test smaller increments than a human user can ever apply with the slider? If that level of resolution is actually supported, I'd consider the slider to be a potential usability issue. A text field with a number might be a better approach.
    <HR></BLOCKQUOTE>

    No, not really. Actually, I don't really care about testing every small increment. (But if I really did, I suppose I could do this by sending left and right arrow keys.)

    What my script does is manipulate different controls in this window (somewhat randomly) while I log every action and monitor for strange behaviors and resource leaks. So to manipulate this slider (scale), I tell SilkTest to set it to a random value between its Range.nMin (0) and Range.nMax (1000).

    It doesn't have to be exact though; if I tell Silk to set the slider to 429 and the nearest position is 414, that's fine. I just don't want the huge delay and error. I just haven't figured out how to avoid it...


    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>
    The suggestion is to contact Segue support and request a solution or work around. (It seems to me that you're on the right track in your analysis.)
    <HR></BLOCKQUOTE>

    I beleive the time for my support is up. (I think we got 1 free year after purchase?) Can I still get some kind of support? (Perhaps email?) If so, how do I do it?

    Thanks again,

    -Chris

    ------------------

  5. #5
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale Class

    Another thing to try is writing a method that will try to use the mouse until the error happens and trap the error. If the error message is that the value could not be reached, then try to use the keys to set the value from the point where the error occurs. This way the mouse will move the control most of the way and then the keyboard can move it the rest of the way. That might be faster than only using the keyboard.

    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

  6. #6
    Junior Member
    Join Date
    Oct 2001
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale Class

    Hi James,

    Thanks for the suggestion.

    You're right about using the mouse and keyboard together. It would be much faster than using the keyboard alone (if I could only use the mouse!). And, yes the error is that the value can't be reached.

    Even when I use a do > except statement to supress the error, Silk still struggles with the control forever. And I mean forever! It seems that silk won't even continue (or trigger an error) until I move the slider manually. I just let it run, and it sat struggling with the control for 10 minutes. Finally, I moved the control with the mouse manually and Silk immediately woke up and generated the error.

    This problem seemed so minor at first, but the deeper I dive into it, the more frustrating it gets.

    I also tried just setting the rValue for the scale, but it does the same thing (tries to use the mouse, then gets stuck).

    I tried setting the OPT_VERIFY_RESPONDING agent option to FALSE, but it didn't help. I was thinking that there might be some other agent option, but now I'm not so sure.

    Is there anyway to modify the default SetPosition method?

    Aside from that, it seems like I might be stuck using the keyboard only (ouch!), or writing a method to drag the control using pixels (ouch! ouch!).

    -Chris

    ------------------

  7. #7
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale Class

    here's a workaround.....

    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

  8. #8
    Junior Member
    Join Date
    Oct 2001
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale Class

    Thanks for the workaround James!

    You da man!

    -Chris

    ------------------

 

 

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:03 AM.

Copyright BetaSoft Inc.