[#!/fr] problème avec nibtool -c MainMenu.nib

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Yvon Thoraval
Date:  
À: script_shell_fr
Sujet: [#!/fr] problème avec nibtool -c MainMenu.nib
si je fais au terminal :

$ nibtool -c MainMenu.nib

j'obtiens le bon résultat càd :

------------------------------------------------------------------------
/* Classes */
Classes = {
    IBClasses = (
        {
            ACTIONS = {
                "about_win" = id;
[...]
                "toggle_drawer" = id;
            };
            CLASS = AB2Html;
            LANGUAGE = ObjC;
            OUTLETS = {
                "cancel_btn" = id;
[...]
                "theme_cb" = id;
            };
            SUPERCLASS = NSObject;
        },
        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject;
}
    );
    IBVersion = 1;
}; /* End Classes */
------------------------------------------------------------------------


mais je voudrais "parser" cette sortie en utilisant un script,
bizarement j'obtiens tjs une sortie vide...

par ex avec ruby j'ai essayé :

cmd = IO.popen( "/usr/bin/nibtool -c MainMenu.nib" )
puts "|#{cmd.readlines}|"
# => RIEN en sortie

`/usr/bin/nibtool -c MainMenu.nib`
# => RIEN en sortie

`/usr/bin/nibtool -c MainMenu.nib > tmp.txt`
# => donne un fichier tmp.txt VIDE ...


en AppleScript :

on nibtool(fi)
return do shell script "nibtool -c " & (quoted form of fi)
end nibtool

nibtool("/Users/yt/work/RubyCocoa/AB2Html/English.lproj/MainMenu.nib")

-- donne "" en sortie :[ GRRRHHH


avec zsh :

#! /usr/bin/env zsh

echo `/usr/bin/nibtool -c
"/Users/yt/work/RubyCocoa/AB2Html/English.lproj/MainMenu.nib"`
# NE DONNE RIEN...
exit 0

qui peut expliquer cela ???

sans doute une bévue de ma part...

-- 
yvon
_______________________________________________
archives : 
http://listes.patpro.net/list/sshfr.fr.html
http://listes.patpro.net/mailman/listinfo/script_shell_fr