Re: How to enter a time of day

2010-02-24 Thread Andre Garzia
Loved the stack and the revlet!

Guys, you rock!

Scott, you're the man! I still hold dear to your plugins and there's no
color tool as TM|Color for me, I use it even when I am not using Rev, once,
I almost made a standalone out of it.

Cheers and thanks

On Wed, Feb 24, 2010 at 8:31 AM, BNig  wrote:

>
> you might want to look at the "timesetting" stack in a slightly modified
> version as a revlet:
> http://berndniggemann.on-rev.com/timesettings/
> regards
> Bernd
> --
> View this message in context:
> http://n4.nabble.com/How-to-enter-a-time-of-day-tp1562955p1567339.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-24 Thread BNig

you might want to look at the "timesetting" stack in a slightly modified
version as a revlet:
http://berndniggemann.on-rev.com/timesettings/
regards
Bernd
-- 
View this message in context: 
http://n4.nabble.com/How-to-enter-a-time-of-day-tp1562955p1567339.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-23 Thread BNig

Sorry, I forgot to take one line out of the code
-
 if tMyName = "End" then
  put min(max(X,item 1 of tLimitsEnd),item 2 of tLimitsEnd) into tNewX
  --put x && tNewX -- take this line out
---
the marked line puts x values into the message box, block it or take it out.
regards
Bernd
-- 
View this message in context: 
http://n4.nabble.com/How-to-enter-a-time-of-day-tp1562955p1566818.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-23 Thread BNig

Hi Scott,
thank you very much for this beautiful layout and functionality.
I couldn't resist to fiddle with the sliders, I wanted them to push each
other so the user can push both and determine a start or stop time and
without releasing the mouse pushing the other to the desired start/stop 
time. One click saved and I find it intuitive, maybe not everyone.
Well here is the code for your backgroundscript of the sliders.

watch out for linebreaks
--
local allowDrag,tLimitsStart,tLimitsEnd,tInc
local baseLeft,baseRight,tInterval,tMyName,tOtherName
local tBtnSpaceFromCenter, W, tVslider
local tHDiff, tVDiff

on mouseEnter
   put false into allowDrag
end mouseEnter

on mouseDown
   put the clickloc into tClick
   put the loc of me into tmyLoc
   put item 1 of tmyLoc - item 1 of tClick into tHDiff
   put item 2 of tmyLoc - item 2 of tClick into tVDiff
   
   put short name of me into tInterval
   delete char -6 to -1 of tInterval
   put tInterval into tMyName
   if tMyName = "Start" then 
  put "End" into tOtherName
   else
  put "Start" into tOtherName
   end if
   put left of grc "sliderbase" into baseLeft
   put right of grc "sliderbase" into baseRight
   put item 2 of the loc of grc "startSlider" into tVslider
   
   put (width of me div 2) into W
   put w * 2 into tBtnSpaceFromCenter
   
   
   put baseLeft,left of grc "endslider" - W into tLimitsStart
   put right of grc "startslider" + W,baseRight into tLimitsEnd
   
   put width of grc "sliderbase"/48 into tInc
   
   put true into allowDrag
end mouseDown

on mouseMove X,Y
   put x + tHDiff into x
   put y + tVDiff into y
   if not allowDrag then exit mouseMove
   if tMyName = "Start" then
  lock screen
  put min(max(X,item 1 of tLimitsStart),item 2 of tLimitsStart) into
tNewX
  if tNewX < X then
 put min(x,(baseRight - tBtnSpaceFromCenter)) into taLocX
 set loc of grc "startSlider" to taLocX,tVslider
 set loc of grc "endslider" to min(taLocX+tBtnSpaceFromCenter,the
right of grc sliderbase),tVslider
 put left of grc sliderbase,left of grc "endslider" - W into
tLimitsStart
  else
 set loc of grc "startSlider" to tNewX,tVslider
  end if
   end if
   
   if tMyName = "End" then
  put min(max(X,item 1 of tLimitsEnd),item 2 of tLimitsEnd) into tNewX
  put x && tNewX
  if X < tNewX then
 put min(max(x,baseLeft+tBtnSpaceFromCenter),(baseRight)) into
taLocX
 set loc of grc "endslider" to taLocX,tVslider
 set loc of grc "startSlider" to
max(baseLeft,taLocX-tBtnSpaceFromCenter),tVslider
 put right of grc "startslider" + W,baseRight into tLimitsEnd
  else
 set loc of grc "endslider" to min(X,baseRight),tVslider
  end if
   end if
   
   put "AM" into ampm
   put (round((item 1 of the loc of grc (tMyName & "slider") -
baseLeft)/tInc)*15) into tMin
   put trunc(tMin/60) + 6 into tHour
   if tHour >= 12 then put "PM" into ampm
   if tHour >= 13 then add -12 to tHour
   put toUpper(tMyName) & ":" && tHour & ":" & format("%02s",tMin mod 60) &&
ampm into fld (tMyName & "output")
   
   put "AM" into ampm
   put (round((item 1 of the loc of grc (tOtherName & "slider") -
baseLeft)/tInc)*15) into tMin
   put trunc(tMin/60) + 6 into tHour
   if tHour >= 12 then put "PM" into ampm
   if tHour >= 13 then add -12 to tHour
   put toUpper(tOtherName) & ":" && tHour & ":" & format("%02s",tMin mod 60)
&& ampm into fld (tOtherName & "output")
   unlock screen
end mouseMove

on mouseUp
   put false into allowDrag
end mouseUp

on mouseRelease
   put false into allowDrag
end mouseRelease


again thank you very much.
regards
Bernd
-- 
View this message in context: 
http://n4.nabble.com/How-to-enter-a-time-of-day-tp1562955p1566711.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-22 Thread Marty Knapp

Very cool Scott!

Marty Knapp

Recently, Peter Haworth wrote:

  

I have a need for users to enter a start and end time of an event and
I'm  trying to come up with a graphical way for them to do that to
ensure that the time is in the correct format.

What appeals to me the most is to use some sort of slider that would
increment/decrement the time of day in 15 minute intervals.  I was
hoping the rev slider control would be the answer to it but it only
seems to deal with whole numbers on its scale, haven't been able to
figure out how to deal with time-based numbers.

Any recommendations on how to set about implementing this?



This was a good interface challenge...

Instead of using a standard slider, I think a dual slider would be a good
solution (but this might depend on the actual time constraints of your
"day").  Can't do this kind of thing with a stock slider however (you'd need
two separate sliders).

It also occurred to me that mini-calendars are the current de-facto standard
for entering dates in forms, so how about a clock face for time entry?

I posted an example online that shows both time entry options (don't ask me
to explain the math).  Execute the following in your Rev message box:

 go url "http://www.tactilemedia.com/download/timesettings.rev";

Each set of controls relies on the behavior script that is present on the
right side of the stack.

Maybe one of these could work.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

  


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-22 Thread Francis Nugent Dixon

Hi from Beautiful Brittany,

Scott Rossi wrote :

I posted an example online that shows both time entry options (don't  
ask me

to explain the math).  Execute the following in your Rev message box:

go url "http://www.tactilemedia.com/download/timesettings.rev";


Nice !! That's what I love about this forum. Every day, somebody
shows me something that gives me new ideas ..

Thanks Scott !

-Francis


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-22 Thread Scott Rossi
Recently, stephen barncard wrote:

> This is absolutely brilliant.   What a gift. I'm speaking of both your gift,
> and the gift to us.

Thanks -- hope the stack is useful for folks.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-21 Thread stephen barncard
This is absolutely brilliant.   What a gift. I'm speaking of both your gift,
and the gift to us.

Thanks
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


On 21 February 2010 17:49, Scott Rossi  wrote:

> Recently, Peter Haworth wrote:
>
> > I have a need for users to enter a start and end time of an event and
> > I'm  trying to come up with a graphical way for them to do that to
> > ensure that the time is in the correct format.
> >
> > What appeals to me the most is to use some sort of slider that would
> > increment/decrement the time of day in 15 minute intervals.  I was
> > hoping the rev slider control would be the answer to it but it only
> > seems to deal with whole numbers on its scale, haven't been able to
> > figure out how to deal with time-based numbers.
> >
> > Any recommendations on how to set about implementing this?
>
> This was a good interface challenge...
>
> Instead of using a standard slider, I think a dual slider would be a good
> solution (but this might depend on the actual time constraints of your
> "day").  Can't do this kind of thing with a stock slider however (you'd
> need
> two separate sliders).
>
> It also occurred to me that mini-calendars are the current de-facto
> standard
> for entering dates in forms, so how about a clock face for time entry?
>
> I posted an example online that shows both time entry options (don't ask me
> to explain the math).  Execute the following in your Rev message box:
>
>  go url "http://www.tactilemedia.com/download/timesettings.rev";
>
> Each set of controls relies on the behavior script that is present on the
> right side of the stack.
>
> Maybe one of these could work.
>
> Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, UX Design
>
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-21 Thread Scott Rossi
Recently, Peter Haworth wrote:

> I have a need for users to enter a start and end time of an event and
> I'm  trying to come up with a graphical way for them to do that to
> ensure that the time is in the correct format.
> 
> What appeals to me the most is to use some sort of slider that would
> increment/decrement the time of day in 15 minute intervals.  I was
> hoping the rev slider control would be the answer to it but it only
> seems to deal with whole numbers on its scale, haven't been able to
> figure out how to deal with time-based numbers.
> 
> Any recommendations on how to set about implementing this?

This was a good interface challenge...

Instead of using a standard slider, I think a dual slider would be a good
solution (but this might depend on the actual time constraints of your
"day").  Can't do this kind of thing with a stock slider however (you'd need
two separate sliders).

It also occurred to me that mini-calendars are the current de-facto standard
for entering dates in forms, so how about a clock face for time entry?

I posted an example online that shows both time entry options (don't ask me
to explain the math).  Execute the following in your Rev message box:

 go url "http://www.tactilemedia.com/download/timesettings.rev";

Each set of controls relies on the behavior script that is present on the
right side of the stack.

Maybe one of these could work.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-20 Thread Jeffrey Massung
Pete,

If your app runs exclusively on the Mac you may want to just look at 
integrating iCal into it with AppleScript and handle it that way...

When your app launches or whenever is appropriate, let the user select a 
calendar file that's exclusive to your app. The user could open it in iCal to 
adjust things or open it through your app. You could likely then use 
AppleScript to get various date/times from it to do your tasks. 

I don't use iCal (much) and have never looked to see what functionality is 
provided for it through AppleScript. But you may end getting a very win-win out 
of this: let the user thing "awesome!" because it "just works" with iCal and 
let's you relax and let iCal do most of the heavy lifting in this department. 
:-)

Jeff M.

On Feb 20, 2010, at 1:17 PM, Peter Haworth wrote:

> Thanks Marty and Jeff.
> 
> I will take a look at at your stack Marty.
> 
> Jeff, you raise a good point, I hadn't thought about.  I'm mainly running on 
> a Mac and people tend to schedule things with tasks/appointments in iCal 
> although various third party tools have their own built in schedulers with 
> their own ways of entering times.
> 
> Pete Haworth
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-20 Thread Peter Haworth

Thanks Marty and Jeff.

I will take a look at at your stack Marty.

Jeff, you raise a good point, I hadn't thought about.  I'm mainly  
running on a Mac and people tend to schedule things with tasks/ 
appointments in iCal although various third party tools have their own  
built in schedulers with their own ways of entering times.


Pete Haworth

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-20 Thread Jeffrey Massung
You may want to take a look at Windows' task scheduler or whatever it is on the 
platform you are targeting. While it's possible to come up with something 
better and easier, I usually find that straying from UI paradigms that users 
are accustomed to can end up causing a lot of needless pain for the developer: 
annoying bug reports that aren't really bugs and feature requests to make 
something act "normal".

If you want something graphical, I'd make the input a selection (like a date 
picker) or typed in, and perhaps have an analog clock graphic that can indicate 
to the user potential problems.

My 2 cents.

Jeff M.


On Feb 20, 2010, at 11:35 AM, Marty Knapp wrote:

> Hi Peter,
> 
> I don't know if it would help, but I have a stack at RevOnline called 
> "Marty's Sliders" that would give you more flexibility and could perhaps be 
> adapted for your use.
> 
> At the end of the mouseMove handler there's a line that computes a value and 
> puts it into a field to in effect show the thumbPosition of the slider.
> 
> Marty Knapp
>> I have a need for users to enter a start and end time of an event and I'm  
>> trying to come up with a graphical way for them to do that to ensure that 
>> the time is in the correct format.
>> 
>> What appeals to me the most is to use some sort of slider that would 
>> increment/decrement the time of day in 15 minute intervals.  I was hoping 
>> the rev slider control would be the answer to it but it only seems to deal 
>> with whole numbers on its scale, haven't been able to figure out how to deal 
>> with time-based numbers.
>> 
>> Any recommendations on how to set about implementing this?
>> 
>> Pete Haworth
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> ___
>> use-revolution mailing list
>> use-revolution@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>> 
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-20 Thread stephen barncard
There's some very useful code in Marty's stack - I modified it slightly so
as to use a behavior and put the slider components into a group rather than
putting the scripts in the buttons, so I could use the same code with any
number of sliders.
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


On 20 February 2010 09:35, Marty Knapp  wrote:

> Hi Peter,
>
> I don't know if it would help, but I have a stack at RevOnline called
> "Marty's Sliders" that would give you more flexibility and could perhaps be
> adapted for your use.
>
> At the end of the mouseMove handler there's a line that computes a value
> and puts it into a field to in effect show the thumbPosition of the slider.
>
> Marty Knapp
>
>  I have a need for users to enter a start and end time of an event and I'm
>>  trying to come up with a graphical way for them to do that to ensure that
>> the time is in the correct format.
>>
>> What appeals to me the most is to use some sort of slider that would
>> increment/decrement the time of day in 15 minute intervals.  I was hoping
>> the rev slider control would be the answer to it but it only seems to deal
>> with whole numbers on its scale, haven't been able to figure out how to deal
>> with time-based numbers.
>>
>> Any recommendations on how to set about implementing this?
>>
>> Pete Haworth
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ___
>> use-revolution mailing list
>> use-revolution@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-20 Thread Marty Knapp

Hi Peter,

I don't know if it would help, but I have a stack at RevOnline called 
"Marty's Sliders" that would give you more flexibility and could perhaps 
be adapted for your use.


At the end of the mouseMove handler there's a line that computes a value 
and puts it into a field to in effect show the thumbPosition of the slider.


Marty Knapp
I have a need for users to enter a start and end time of an event and 
I'm  trying to come up with a graphical way for them to do that to 
ensure that the time is in the correct format.


What appeals to me the most is to use some sort of slider that would 
increment/decrement the time of day in 15 minute intervals.  I was 
hoping the rev slider control would be the answer to it but it only 
seems to deal with whole numbers on its scale, haven't been able to 
figure out how to deal with time-based numbers.


Any recommendations on how to set about implementing this?

Pete Haworth









___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to enter a time of day

2010-02-20 Thread stephen barncard
use the slider to manipulate the seconds, and convert to time steps on the
fly. Don't use the scale of the slider, instead make your own scale
alongside. You might find a lookup table faster than conversion.
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


On 20 February 2010 09:12, Peter Haworth  wrote:

> I have a need for users to enter a start and end time of an event and I'm
>  trying to come up with a graphical way for them to do that to ensure that
> the time is in the correct format.
>
> What appeals to me the most is to use some sort of slider that would
> increment/decrement the time of day in 15 minute intervals.  I was hoping
> the rev slider control would be the answer to it but it only seems to deal
> with whole numbers on its scale, haven't been able to figure out how to deal
> with time-based numbers.
>
> Any recommendations on how to set about implementing this?
>
> Pete Haworth
>
>
>
>
>
>
>
>
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


How to enter a time of day

2010-02-20 Thread Peter Haworth
I have a need for users to enter a start and end time of an event and  
I'm  trying to come up with a graphical way for them to do that to  
ensure that the time is in the correct format.


What appeals to me the most is to use some sort of slider that would  
increment/decrement the time of day in 15 minute intervals.  I was  
hoping the rev slider control would be the answer to it but it only  
seems to deal with whole numbers on its scale, haven't been able to  
figure out how to deal with time-based numbers.


Any recommendations on how to set about implementing this?

Pete Haworth









___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution