thanks guys. I already was setting some start values for the slider (and the range) in IB, so this was easy just to put the same value in the text box title. I prefer to use IB t set the start values for the QC rather than to rely on the input splitter initial values, that way they are in sync so there's no jump when you first use it.
I guess the only downside is that you have to remember each time you change the start value of the slider to also change the text box, but I think once I am mostly done with the design these values will be steady. The whole discussion does make me curious about the ability to have events in QC coming back to trigger things in the interface. not sure if there is any documentation about how you might bind a published output in QC to have an impact on an IB element, without having to use code. I don't actually have an immediate need for that, but it's always nice to know about potential capability that could help you formulate ideas for the next project, so if anyone has some experience with it and cares to comment feel free. thanks again. ________________________________ From: Dustin O'Connor <[email protected]> To: Chris Wood <[email protected]> Cc: Steve Tinsky <[email protected]>; [email protected] Sent: Saturday, January 17, 2009 10:41:39 AM Subject: Re: text info for slider position just click on the text box in IB or double click and type in the sliders start value or anything you want. you can set the sliders start value to .5 and put .5 in the text field. thats the easy way. you could put any message to start like <<enter >> On Fri, Jan 16, 2009 at 10:54 AM, Chris Wood <[email protected]> wrote: Steve, To bind it back.. I'm not sure how to do it in IB to be honest. I don't think you can do it with only the published input in QC, because it's an input. You could publish the initial value in QC as an output, but I'm not sure how you bind something multiple times from inside IB. It'd be pretty easy to do it from cocoa. What I meant though was that if you have a standard start value (i.e. it's the same every time the app loads), you can just set the slider to start at that value, and set the initial value of the text box to that value too. Just set the "title" value of the text field to whatever you want. Chris 2009/1/16 Steve Tinsky <[email protected]> I was setting the start value in IB. But I don't mind to have a start value set in QC instead. I am not sure how to do the binding so that the initial value that is set in the QC will reflect back to the application and set the slider value (which in turn would trigger the text box to show a value). Sounds a bit like a reverse binding, or perhaps that's a natural state you can setup with the inspector. Can you walk me thru that? thank you. ________________________________ From: Chris Wood <[email protected]> To: Steve Tinsky <[email protected]> Cc: Dustin O'Connor <[email protected]>; [email protected] Sent: Friday, January 16, 2009 9:41:47 PM Subject: Re: text info for slider position 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] -- 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/archive%40mail-archive.com This email sent to [email protected]

