floatForKey:inTable:
テーブルでキーと関連する浮動小数点値を返しますテーブルになければ0.0を返します
-(float)floatForKey:(NSString *)key: inTable:(NSString *)table:
解説
テーブルでキーと関連する浮動小数点値を返します。テーブルになければ0.0を返します。
【table】プリンタ情報テーブル
● PPD プリンタ記述ファイル
● PPDOptionTranslation オプション
● PPDArgumentTranslation 引数
● PPDOrderDependency *OrderDependency値
● PPDUIConstraints *UIConstraint値
引数
( NSString * )key
キー
( NSString * )table
テーブル
フレームワーク
ApplicationKit
クラス
NSPrinter
Instance Methods
使用可能
10.0
参照
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { //プリンタ NSPrinter *prn = [NSPrinter printerWithName:@"MICROLINE 3050c"]; //PPDにDefaultOKOptionTrayというキーがあったら処理する if ([prn isKey:@"DefaultOKOptionTray" inTable:@"PPD"]){ NSLog([NSString stringWithFormat:@"%.1f",[prn floatForKey:@"DefaultOKOptionTray" inTable:@"PPD"]]); }else{ NSLog(@"NO"); } } @end