如何在NSSavePanel上默认选择文件类型?

时间:2017-02-08 04:11:48

标签: objective-c cocoa

enter image description here

如何以编程方式默认选择NSSavePanel中的文件格式?

我目前只将它设置为图像类型,但它始终默认为TIFF。

NSSavePanel *savePanel = [NSSavePanel savePanel];
_saveOptions = [[IKSaveOptions alloc] initWithImageProperties: _imageProperties
                                                  imageUTType: _imageUTType];

[_saveOptions addSaveOptionsAccessoryViewToSavePanel: savePanel];

1 个答案:

答案 0 :(得分:0)

肯的评论引导我走向正确的方向。传入imageUTType将默认NSSavePanel选择。

DECLARE
  TYPE t_arc_act_plus_trigger1 IS TABLE OF arc_act_plus_triggers1%ROWTYPE;
  v_arc_act_plus_triggers1 t_arc_act_plus_trigger1;

  CURSOR c_arc_act_plus_triggers1 IS
      SELECT /*+ PARALLEL */ apt.*
        FROM act_plus_triggers1 apt
       WHERE NOT EXISTS
                (SELECT 1
                   FROM act_plus_triggers_copy1 aptc
                  WHERE aptc.surr_id = apt.surr_id)
         AND apt.status IN ('EXT', 'EXP');
BEGIN

    OPEN c_arc_act_plus_triggers1;
    LOOP
        FETCH c_arc_act_plus_triggers1 BULK COLLECT INTO v_arc_act_plus_triggers1 LIMIT 10000;  -- limit to 10k to avoid out of memory

        FORALL i IN 1..v_arc_act_plus_triggers1.COUNT
        INSERT /*+ APPEND_VALUES */ INTO arc_act_plus_triggers1 values v_arc_act_plus_triggers1(i);  


        Com0932.get_parameter ('ACT_ARCHIVE_TRIGGER_STOP_YN',l_STOP_PROGRAM_YN);         
        IF l_STOP_PROGRAM_YN = 'Y' THEN
            p_location('insert_into_arc_act_plus - STOP_PROGRAM_YN flag = '||l_STOP_PROGRAM_YN||' so ROLLBACK'); 
            ROLLBACK;
            EXIT;
        END IF; 

        -- **************************************************
        -- Output how many records have been inserted here???
        -- **************************************************

        -- commit after every 10000 records into arc_act_plus_triggers1   
        COMMIT;     
        EXIT WHEN c_arc_act_plus_triggers1%NOTFOUND;


    END LOOP;
    CLOSE c_arc_act_plus_triggers1;

END;