• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Stepper problem.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stepper problem.


  • Subject: Re: Stepper problem.
  • From: Brian Christmas <email@hidden>
  • Date: Thu, 21 Mar 2013 20:26:44 +1100

Thanks Shane, but this App has to be literally idiot proof; asking the operator to remember modifier keys is a bit beyond them, and there's no room for explanatory text.

This routine fixes it. I needed a range of numbers from 1-10,000. A bit cumbersome, but it appears bullet proof.

Regards

Santa

on setEmptyTrash_(sender)
        set trashEmptyNumber to trashEmptyNumber as integer
        set trashIncrement to trashIncrement as integer
        if trashEmptyNumber = 1 then 
            if trashIncrement = 100 then
                set my trashEmptyNumber to 90
                set trashIncrement to 10
                trashStepper's setIncrement_(trashIncrement)
            end if
        end if
        if  (my trashEmptyNumber ≤ 10 and my trashEmptyNumber ≠ 1 and  trashIncrement = 10) then
            set trashIncrement to 1
            trashStepper's setIncrement_(trashIncrement)
        end if
            if  (my trashEmptyNumber = 1 and  trashIncrement = 10) then
                set my trashEmptyNumber to 9
                set trashIncrement to 1
                trashStepper's setIncrement_(trashIncrement)
            else
                if (my trashEmptyNumber ≤ 99 and my trashEmptyNumber > 9  and trashIncrement ≥ 10) or (my trashEmptyNumber ≤ 99 and my trashEmptyNumber > 9 and trashIncrement = 1) then
                    set trashIncrement to 10
                    trashStepper's setIncrement_(trashIncrement)
                else
                    if (my trashEmptyNumber ≥ 100 and trashIncrement = 10) then
                        set trashIncrement to 100
                        trashStepper's setIncrement_(trashIncrement)
                    else
                        if (my trashEmptyNumber ≤ 99 and trashIncrement = 100 ) then
                            set trashIncrement to 10 
                            trashStepper's setIncrement_(trashIncrement)
                        end if
                    end if
                end if
         end if
        my saveThePrefs()
    end setEmptyTrash_



On 21/03/2013, at 5:47 PM, Shane Stanley <email@hidden> wrote:

On 21/03/2013, at 5:33 PM, Brian Christmas <email@hidden> wrote:

In Applescript ObjC is there any way to tell if the top or bottom of a stepper is  being clicked on?

Not easily.

I'm trying to get a stepper to act as tho it's partly logarithmic in it's response.

You're trying to make something behave differently from how it was designed, and that's usually (a) difficult, and (b) not a good idea.

What is the stepper doing?

Have you considered using a modifier key? Something like holding shift multiplies x10 and option-shift x100.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Stepper problem. (From: Brian Christmas <email@hidden>)

  • Prev by Date: Stepper problem.
  • Next by Date: Dock 'Quit' menu
  • Previous by thread: Stepper problem.
  • Next by thread: Dock 'Quit' menu
  • Index(es):
    • Date
    • Thread