Steve,
I'm not sure there's an easy way to update it at startup without using some
code. But if the value in QC is some default when the app loads, can you not
just set the text box's default value to that?

Chris


2009/1/16 Steve Tinsky <[email protected]>

> the number formatter worked like a charm. sorry for such newbie questions,
> but I am a newbie,
> and quite in a hurry to make a cocoa application for an upcoming visual
> show, so I really don't have
> time to learn IB from a to z at the moment (Hope to later). appreciate this
> forum very much.
>
> If anyone knows the answer about how to have the text field initialize to
> the value of the slider on startup
> rather than showing nothing (until you first move the slider), that would
> be much appreciated.
>
>
> ------------------------------
> *From:* Chris Wood <[email protected]>
> *To:* Steve Tinsky <[email protected]>
> *Cc:* Dustin O'Connor <[email protected]>;
> [email protected]
> *Sent:* Friday, January 16, 2009 5:55:15 PM
> *Subject:* Re: text info for slider position
>
> Steve,
> To clean up the text box, use a number formatter. Drag a number formatter
> object from the palette in IB onto the text box, you can then set the number
> of decimal places etc.
>
> For not updating QC until you let go of the mouse.. not sure. I think you
> need to set the slider to continuous to update the text box continuously,
> but then it will update everything else..
>
> You could certainly handle it in code, by passing the slider value to some
> function that will pass it back to QC only on mouse off. Or you could do it
> in QC, by holding the value and not passing it on until the value stops
> changing for say 0.25 seconds.. but it's a long way from ideal.
>
> Chris
>
>
> 2009/1/16 Steve Tinsky <[email protected]>
>
>> thank you so much. I was able to do this easily from what your wrote, was
>> not necessary to look at your file.
>> the next question was how to see the numbers change a the same time as the
>> slider is moving, before you let
>> go of the mouse. But I found that just clicking the continuous box took
>> care of that.
>> It would be interesting to know if it's possible to see the values in the
>> text box change as you move the slider,
>> but not have them take effect into the QC until you let go of the mouse.
>>
>> Btw, this is a cocoa application that I created with I.B., and imbedded a
>> QC that I am using a patch controller.
>> So the slider is binded to the QC via the patch and model key names = the
>> QC input_splitter_name.value.
>>
>> I noticed when I run it, the text box does not receive the default value
>> of the slider on startup, it is not until I start to move a slider
>> that I can see any value in the box. Is there a way to have a value load
>> in there that is the same default slider value
>> when it starts?
>>
>> One more thing. The slider values have a huge amount of numbers to the
>> right of the decimal point.
>> I don't need that kind of accuracy, is there a way to control the number
>> of decimal places that the slider
>> chooses, or if not is there a way to tell the text box to only show for
>> example 2 decimal places?
>> I realize I can just make the text box smaller and you won't see beyond
>> the box, but it can maybe
>> look messy if font size changes later and you have to resize the box, I
>> figure best to try to control
>> that from the beginning of the interface design.
>>
>>
>>
>>
>>
>>
>> that would be done very carefully, no just kidding. there are couple ways,
>> your asking how to this all in interface builder ? in interface builder you
>> use the takeFloatValue>From built in actions for your UI elements. first you
>> want to see sliders value in the text box. so control click on the slider
>> then in the circle next to the takeValueFrom received actions click and drag
>> a line to the text box in your window. then do the same with the text box.
>> that is cntrl click textbox dragline from received actions circle
>> "takeValueFromFloat" to the UI slider. basically you are telling each object
>> to take the value from each other. make sure to set text box to send on edit
>> or send on enter or what ever thats the easiest way. of course there the
>> easy way, the quick way and then there is the right way. can't explain them
>> all right now setting up sliders to control my before and after frame
>> differential luma threshold optical flow grid thing to make music with my
>> camera. i included an example, this is just how to connect the slider to the
>> box and the box to the slider this example is predicated upon the fact that
>> you have a slider controlling your qc so if have a ib interace with a text
>> box that controls the slider then the slider changes values of your qc patch
>> at key "x". this way you don't have to write class files write action and
>> outlets. not sure how you connected the slider from IB to QC without making
>> a appController ? attached is a example. incase you don't have the slider
>> working to control QC make a new cocoa for QC project in xcode and look at
>> appController.h and appCOntroller.m this should answer some questions.
>>
>>
>> On Thu, Jan 15, 2009 at 3:22 PM, Steve Tinsky <[email protected]>wrote:
>>
>>> I am using a slider in interface builder to control an element of my QC.
>>> I'd like to know if it's possible to see in text the actual number of the
>>> slider position (index number from 0 to 1),
>>> and if possible to also input a number in the text box as
>>> an alternative way to input a value, and I guess that the slider would
>>> then move in sync
>>> with the text. if this is possible, how would it be done?
>>>  _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Quartzcomposer-dev mailing list      ([email protected]
>>> )
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> http://lists.apple.com/mailman/options/quartzcomposer-dev/dustin.oconnor%40gmail.com
>>>
>>> This email sent to [email protected]
>>>
>>
>>
>>
>> --
>> Dustin O'Connor
>> http://numedia-sci.info
>>
>>  _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Quartzcomposer-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>>
>> http://lists.apple.com/mailman/options/quartzcomposer-dev/psonice%40gmail.com
>>
>> This email sent to [email protected]
>>
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to