Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
A couple xCode questions
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="xstep" data-source="post: 1036678" data-attributes="member: 11647"><p>I did a similar little project a few years for the same reason, for practice. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /> Mine takes manual input of the time interval of interest, so I didn't play with the slider technique.</p><p></p><p>From how I understand your description in question 1, I think you are on the right track. Give it a try.</p><p></p><p>For number 2, things get a little complicated to explain. I think this is what you want to know...</p><p></p><p>After you have done takeIntValueFrom in your action you have to apply your math. From the looks of my code, I converted the input of days, hours, minutes and seconds down to seconds. So do what it takes to convert a number such as 59.75 (239 * .25) minutes into seconds and use the value to calculate your endTime. Also use this value to set the textbox using setFloatValue:, I think.</p><p></p><p>If you want the textbox to have pretty formatting, you'll need to split the minutes and seconds out as separate numbers I think and setup an appropriate looking string. Although there maybe some formatting options I'm not aware of.</p><p></p><p>Someone at the Lake Forest CA Cocoaheads meeting last night was asking about this kind of app too.</p></blockquote><p></p>
[QUOTE="xstep, post: 1036678, member: 11647"] I did a similar little project a few years for the same reason, for practice. :) Mine takes manual input of the time interval of interest, so I didn't play with the slider technique. From how I understand your description in question 1, I think you are on the right track. Give it a try. For number 2, things get a little complicated to explain. I think this is what you want to know... After you have done takeIntValueFrom in your action you have to apply your math. From the looks of my code, I converted the input of days, hours, minutes and seconds down to seconds. So do what it takes to convert a number such as 59.75 (239 * .25) minutes into seconds and use the value to calculate your endTime. Also use this value to set the textbox using setFloatValue:, I think. If you want the textbox to have pretty formatting, you'll need to split the minutes and seconds out as separate numbers I think and setup an appropriate looking string. Although there maybe some formatting options I'm not aware of. Someone at the Lake Forest CA Cocoaheads meeting last night was asking about this kind of app too. [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
A couple xCode questions
Top