Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: For zentara (rotating thingy)
by Zaxo (Archbishop) on Apr 30, 2006 at 20:36 UTC

    You should post the code itself, like so:
    <code>
    the listing here
    </code>
    That way the code we discuss remains with the discussion, instead of eventually becoming one more dead link.

    Since you're anonymous, you can't edit your root node, but you can post the code in a reply to it.

    After Compline,
    Zaxo

Re: For zentara (rotating thingy)
by zentara (Cardinal) on May 01, 2006 at 11:23 UTC
    Yeah, I use linux and your script still dosn't work right. First, the test for OS dosn't work, and I had to comment all that sub out.
    if ($ENV{'OS'} =~ /Windows_NT/){ ..... }
    it still tries to load Win32 modules at compile time, you need to put it in a BEGIN block, see use module if condition is met or Conditionally override 'time' builtin with Time::HiRes::time()

    Second your rotation is very stuttered and lags behind the mouse movement, on linux anyways. If I move the mouse in a straight line horizontally across the screen, it rotates, But if I try to move the mouse around the dial, it switches direction at each cartesian axis crossing. Weird. You need to do some "quadrant checking", so that when you move from one quadrant to the next, the rotation continues smoothly.


    I'm not really a human, but I play one on earth. flash japh
      zentara, I work on it a bit at a time... so have't worked on OS issues in a while and don't know a thing about compiling... Will maybe look up your "You need to do some "quadrant checking", so that when you move from one quadrant to the next, the rotation continues smoothly." It looks to me like I need it 2.

      But for now I've moved on to trying to rotate the inner ball so as to match the main(when it's closed and the reopend).

      # so I need to get the main's angle/degree of rotation

      #something like this:

      # my ($xref2, $yref2) = $zinc->transform($zinc->group('current'), 1, 0, 0);

      # $zinc->rotate($inerbal,*******);

      # Am on Windows XP Home # With ActiveState ActivePerl 5.8.7 Build 815 # Also use EnginSite Perl Editor LITE

        Well have heart and keep trying. :-) When I was first beginning it sometimes took days (even weeks) to figure something out. But that is the learning process...... the more you hack and try, the more you learn and the better you will get. You did pick a particularly hard problem to start with. :-)

        I'm kind of interested in how to do this myself, I may post a way to get it to work in a day or 2, but it may have different logic from your program. Good luck, and don't let it get you down.


        I'm not really a human, but I play one on earth. flash japh
Re: For zentara (rotating thingy)
by aquarium (Curate) on May 01, 2006 at 07:59 UTC
    when a mere single click in the app shuts down the computer without a chance of cancelling, there should be a large WARNING.
    the hardest line to type correctly is: stty erase ^H
Re: For zentara (rotating thingy)
by zentara (Cardinal) on May 01, 2006 at 18:30 UTC
    Here ya go Anonymous Monk, see Zinc-rotating dial demo. I used a different technique than actually dragging the ball, so that the mouse could leave the inner ball and still drag.

    I'm not really a human, but I play one on earth. flash japh
      Thanks again zentara, had a quick go(just ran it and played for a while) with it while I'm on the net... It looks good... Will go through it with a tooth comb tonight, and hopefully will learn something.

      Just hoping it works upside down(someone at that position as it were), as mine I think I would have had problems with.

A reply falls below the community's threshold of quality. You may see it by logging in.