Package ca.weblite.objc

Examples of ca.weblite.objc.Proxy


    }
   
    @Msg(selector="startApplication", like="NSObject.finalize")
    public void startApplication(){
        Client c = getClient();
        Proxy app = c.chain("NSApplication", "sharedApplication");
      
        Proxy topLevelObjects = c.chain("NSMutableArray", "array");
       
       
        Proxy filesOwner = c.chain(
                "NSDictionary",
                    "dictionaryWithObjectsAndKeys:",
                        this.getPeer()
                        str("NSOwner"),
                        topLevelObjects.getPeer(),
                        str("NSTopLevelObjects"),
                        null
        );

       
        app.send("setDelegate:", this);
       
       
       
        long res = (Long)c.send("NSBundle", "loadNibFile:externalNameTable:withZone:", "MainMenu.nib", filesOwner.getPeer(), null);
        int numTopLevelObjects = ((Long)topLevelObjects.send("count")).intValue();
       
        Proxy mainWindow = null;
       
        for ( int i=0; i<numTopLevelObjects; i++){
            Proxy obj = (Proxy)topLevelObjects.send("objectAtIndex:", i);
            if ( (Long)obj.send("isKindOfClass:", cls("NSWindow")) > 0 ){
                mainWindow = obj;
            } else {
               
                obj.dispose(false);
            }
        }
       
        //Proxy windowController = c.chain("NSWindowController", "alloc").chain("initWithWindow:", mainWindow.getPeer());
        //System.out.println("Window loaded? "+windowController.send("isWindowLoaded"));
View Full Code Here

TOP

Related Classes of ca.weblite.objc.Proxy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.