macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

statusForTable:

テーブルの状態を返します
-(NSPrinterTableStatus)statusForTable:(NSString *)table:

解説

テーブルの状態を返します。
【NSPrinterTableStatus】
● NSPrinterTableOK プリンタテーブルは使用可能
● NSPrinterTableNotFound プリンタテーブルが見つからない
● NSPrinterTableError プリンタテーブルは使用できない

返り値

( NSPrinterTableStatus )

テーブルの状態

引数

( NSString * )table

テーブル

フレームワーク

ApplicationKit

クラス

NSPrinter

Instance Methods

使用可能

10.0

参照

例文

#import "Controller.h"

@implementation Controller

- (IBAction)pushButton:(id)sender
{
NSPrinter *prn = [NSPrinter printerWithName:@"MICROLINE 3050c"];

switch ([prn statusForTable:@"PPD"]){
    case NSPrinterTableOK:
        NSLog(@"NSPrinterTableOK");
        break;
    case NSPrinterTableNotFound:
        NSLog(@"NSPrinterTableNotFound");
        break;
    case NSPrinterTableError:
        NSLog(@"NSPrinterTableError");
        break;
        }
}

@end