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