A little caveat: on that note of maximum fraction digits stuff, I guess one 
should figure out whatever it is that QC supports and set it to that. Haven't 
done that yet... doubt it supports up to 20 places, doesn't sound right. I 
doubt anything horrible would happen b/c of setting it too high, probably just 
a rounding.

-gt


On Apr 14, 2012, at 12:11 AM, Achim Breidenbach wrote:

> Hello George,
> 
> maybe you can debug and check with -(NSUInteger)maximumFractionDigits what 
> the current value of your "formatter" is, and set it with 
> -(void)setMaximumFractionDigits:(NSUInteger)number to a certain number?
> 
> Just a guess, I am no expert in UI programming.
> 
> best,
> 
> Achim Breidenbach
> Boinx Software
> 
> On 13.04.2012, at 23:19, George Toledo wrote:
> 
>> The Apple QCTV example has some code like this in Composition Parameters 
>> View.m
>> 
>> else if([type isEqualToString:QCPortTypeNumber]) {
>>                      minNumber = [inputAttributes 
>> objectForKey:QCPortAttributeMinimumValueKey];
>>                      maxNumber = [inputAttributes 
>> objectForKey:QCPortAttributeMaximumValueKey];
>>                      if(minNumber && maxNumber) {
>>                              control = [[NSSlider alloc] 
>> initWithFrame:NSMakeRect(0, kVOffset + totalHeight, kDefaultWidth, 15)];
>>                              [[control cell] 
>> setControlSize:NSSmallControlSize];
>>                              [(NSSlider*)control setMinValue:[minNumber 
>> doubleValue]];
>>                              [(NSSlider*)control setMaxValue:[maxNumber 
>> doubleValue]];
>>                      }
>>                      else {
>>                              control = [[NSTextField alloc] 
>> initWithFrame:NSMakeRect(0, kVOffset + totalHeight - 3, kDefaultWidth, 19)];
>>                              [[control cell] setWraps:NO];
>>                              [[control cell] setScrollable:YES];
>>                              [[control cell] setFont:[NSFont 
>> systemFontOfSize:[NSFont smallSystemFontSize]]];
>>                              formatter = [NSNumberFormatter new];
>>                              [formatter setMinimum:minNumber];
>>                              [formatter setMaximum:maxNumber];
>>                              [[control cell] setFormatter:formatter];
>>                              [formatter release];
>>                              [[control cell] setSendsActionOnEndEditing:YES];
>>                      }
>>                      [control setAutoresizingMask:NSViewWidthSizable];
>>                      totalHeight += 25;
>>              }
>> 
>> 
>> My "problem" is, that the created "Inspector" turns floating point values 
>> that are entered in, into Integer. I've tried fiddling with a few things 
>> with no success, I think just because I've gotten some syntax wrong 
>> somewhere.
>> 
>> Does anyone know how to fix it so that I can get floating point values 
>> working?
>> 
>> Thanks,
>> gt
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/quartzcomposer-dev/achim%40boinx.com
>> 
>> This email sent to ac...@boinx.com
> 


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to