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/archive%40mail-archive.com

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

Reply via email to