Interface Designer: "Reading Class File" fails

I'm just trying the Apple Cocoa Tutorial (ConcurrencyConverter). I have a problem at the point where you shall load the class file "ConverterController.h" into the Interface Designer. It always fails with the error "Parsed 1 source file, but no buttons were found...".
Even when I copy and paste the header file from the tutorial it doesn't work. It looks like this:
#import <Cocoa/Cocoa.h>
@interface ConverterController : NSObject {
IBOutlet NSTextField *amountField;
IBOutlet NSTextField *dollarField;
IBOutlet NSTextField *rateField;
- (IBAction)convert:(id)sender;
@end
I have no idea what to do now, can you help me?

digitalformula wrote:
Your note about the outlets etc actually being there but needing to look harder made me stare at the screen for a few minutes ... I can't see them though.
Maybe they just don't show up in Xcode 3.2.1???
Hi DF -
I don't know how to guide you further since I don't have 3.2.1. Did you see Ruud's most recent post?
Ruud Wijnands wrote:
... if you click on the connections tab they are shown there in in unconnected state.
Assuming this much hasn't changed since 3.1.4, besides the Class Outlets table in the Identity Inspector, there are two places to look for Outlet and Action connections:
1) When you ctrl-click on an object (e.g. the icon for a controller), a black, floating panel should come up listing all connections from and to that object. Be sure to select the object in the xib (icon) window with the View Mode switch in the Center position. With that View Mode setting, the xib window should display a two column table with a tree of small icons to the left. By expanding the nodes in that tree you should be able to find every object in the xib;
2) When you select an object (in the xib window as above), the Connections Inspector (cmd-5) should display all possible connections from and to the object. I assume this is the view Ruud referred to as "the connections tab".
I don't recall seeing a case where the black panel list differed from the list shown in the Connections Inspector, but it wouldn't hurt to look at both. If neither of the above finds the connections when _you've seen your custom class in the Identity list, and set the object in question to that class_, I might suggest closing the xib and restarting IB. You could also try modifying and resaving your custom object's @interface file just to stir things up a bit (e.g., remove all the IBOutlet declarations, save, then add them and resave).
It might also help to start a new project and do nothing else but add one custom class to see if you have better luck getting IB to import the correct connections in the new context. E.g., add a NSObject subclass named Foo with one ivar such as IBOutlet NSWindow *Bar; then see if you can add a blue cube to MainMenu.xib, set its identity to Foo class and see the Bar outlet.
For more details on connecting custom objects, see "Setting the Class of an Object" and "Injecting Class Information into a Nib File" under Xcode Integration in the +Interface Builder User Guide+.
Of course it's possible we're dealing with a bug that's unique to 64-bit 3.2.1. I've searched the web, the 3.2.1 Release Notes and the Xcode Mailing List for reports that might confirm this, but haven't found anything interesting yet. So I think we should continue to assume that Xcode 3.2.1 is capable of obtaining custom class info, and we're just dealing with some misunderstanding. Hopefully, one of our forum experts who has 3.2.1 will join the thread to shed some more light on the topic.
\- Ray

Similar Messages

  • Interface design V class design

    Why is it more important for an interface design than for a class design to anticipate all possible uses for the interface?

    come on.. I was gonna do this
    //interface
    interface IshouldBeSleeping
    public void IamSadistic();
    class WhyAreWeAnsweringThis
    public double habitualProcessOfWorkingForLameCurrency
       return 0.0001;
    }

  • Error in reading .class files

    What kind of program opens .class files?
    i'm new to java technology and am very confused with all these.
    Can someone please help?
    .class files ...
    i think its got something to do with JVM
    please send me instructions on how to run .class files
    thanks

    You need java.exe from the JRE or J2SDK. You can find the download links on the front page of http://java.sun.com. At its simplest, if your class file is called MyProgram.class, you would run it with the command "java MyProgram".

  • UCCX8 - script that reads XML file failing, used to work fine in UCCX 5 and 7

    I have a existing script that I've used many times before to read a simple XML file to check open hours for a queue. In both UCCX 5 and 7
    I loaded up all my same scripts, documents , structure, etc..
    When I run script I get the below error.
    The error implies its a security problem but I also wonder if it could simply be a incorrect directory structure as well
    I have the document located in the repository under en\GlobalDocuments\HolidayDatesWithHours.xml
    Is there a differnet way we need to reference documents in UCCX 8 than 5 or 7
    I think I doing it correctly, using the CreateFileDocument and CreateXMLDocument steps, NOT trying to access the filesystem directly
    Do I need to use forward slashes in the file path for UCCX 8 ,
    Any ideas where to look.  This same error appears wherever in my script that I'm trying to read a XML file. different scripts as well so it seems that I'm doing something consistently wrong that used to work correctly on multiple UCCX 5&7 servers in the past.
    Thanks.
    <ERROR>
    527258: Aug 23 14:19:36.635 CDT %MIVR-SECURITY_MGR-2-SECURITY_VIOLATION:Security violation: Permission Name=.\documents\user\en\GlobalDocuments\\HolidayDatesWithHours.xml,Permission Action=read,Application=TrainingQueue,Script=CoreBTS-QueueScript.aef,Step id=437,Step Class=com.cisco.wfframework.obj.WFBeanStep,Step Description=boolTrueFalse = objFile.exists(),Expression=null,Exception=java.security.AccessControlException: access denied (java.io.FilePermission .\documents\user\en\GlobalDocuments\\HolidayDatesWithHours.xml read)
    </END ERROR>

    It should be fine, I assume you mean to reference the full location of your files such as:
    DOC[en\GlobalDocuments\HolidayDatesWithHours.xml]
    Or you could use a document variable such as:
    docVariable = DOC[en\GlobalDocuments\HolidayDateWithHours.xml]
    then in the script reference that:
    doc = Create XML Document (docVariable)

  • When install QuickTime7.7.1 and QT SDK's interface(OpenMovieFile method) open file failed

    Hi guys.
    I use QT SDK to write a sample to load movie files.
    when install QuickTime7.7.1 and call QT SDK's interface(OpenMovieFile method) to open file, it doesn't work. i will get error(-36). but when i use QT 7.6.9, it works well.
    so how can i use QT SDK(install QT7.7.1 and OS is windows xp) to open movie file which fullpath include wide unicode characters(like D:\Media動画).
    much appreciate.

    This forum is for questions about the Communities themselves. You'll be more likely to get a quick and helpful answer if you post in the  forum dedicated for your product. The QuickTime forum can be found here:
    QuickTime
    Regards.

  • How to read .class file?

    i am trying to read java classfile and display it in my notepad ,but
    can not get the anticipative result . who can tell me why and give me
    a hand please...

    and when i see the bytecode with javap can i edit it
    manulay at java bytecode level and translate it to
    class again ?Take a look at Apache BCEL.

  • Xcode 3/Interface Builder - Adding classes to NIB file doesn't work

    I'm attempting to learn Objective-C and Cocoa GUI through Apple's "Currency Convertor" tutorial. I'm currently at the "Add the ConverterController Class to Your Nib File" step, and I add ConverterController.h to the Interface Builder project (both by Read Class Files and dragging) and... nothing happens. The tutorial clearly states that the class should appear as a new icon in the MainMenu.nib window. I've tried researching this problem, and it appears to be quite common, however every fix isn't really a fix at all. They all involve using the Identity Inspector for something, which appears very complicated, and is otherwise uncovered in the tutorial. It occurs to me that anyone knowing enough to be able to use this fix wouldn't be reading this tutorial, thus making such answers moot. Any help anyone could provide on this issue would be appreciated.

    The tutorial you linked to should work fine except that they've just got the illustration (Figure 5-3) in the wrong place.
    The placement of that illustration implies that you should see the instance of your class in the MainMenu.nib window right after doing step 2 (where you read your class file). But that's not really true. In reality it's step 3 that gets you the blue box in the MainMenu.nib window and steps 4 and 5 that will transform it from an "Object" into a "ConverterController". Steps 3, 4 and 5 are exactly what Thomvis suggested that you do earlier.
    Steve

  • Failed to Call Self Written Class Files in JAVA 1.4

    While compiling java application in JAVA 1.4 environment, import command for self written class file fails even though classpath is set and declared during compilation.
    It flashes like ". is expected" Please help,
    Regards,
    Avijit Dutta (e-mail - [email protected])

    I had a similar problem with 1.4:
    since 1.4 java doesn't accept imports of "top-level packages" any more, i.e. classes, that don't belong to a package can't be imported in other classes.
    --> always put your self written classes into a package
    then you will be able to import them.
    hoschi

  • How to include a .class file in a jsp page

    hi everyone,
    i know the syntax as:
    <%@ include file = "filename.class" %>
    then at run time the server could not find the class file
    if i use,
    <%@ page import = "FileName.class" %>
    then also the same problem persists
    & if i use
    <jsp:include page = "Relative address"/>
    the problem still remains as it is...
    please help me out...i am working on developing an EJB application in which client interacts with server's Stateful session bean through a jsp page...it is necessary for me to include the home interface class file in my jsp page.
    P.S. do not suggest me to include the class file in a package & then use
    <%@ page import = "packageName.ClassFileName" %>
    i
    Edited by: Ankit_JIITU on 6 Jul, 2008 1:55 AM

    Ankit_JIITU wrote:
    i have already included the remote interface class file by <%@ page import = "University.RemoteInterfaceName" %>in my jsp page ...
    if i try to make a new package called test & then include my home interface in that package...i need to import University.*to generate the class file of my home interface ; but the class file generation is not taking place as i am getting the error..
    "package University does not exist".How can i overcome this problem. The package University, which you are trying to import, must be in the classpath. If you removed it then you will have to add it back.
    i have tried my best..but tell me if there's any possible way of including a class file in the jsp page without involving a package.No, there isn't.
    If not,then pls help me to generate the class file of my home interface within a package called test.Read the New To Java Tutorial and understand how packages work.
    >
    i am assuming that u have a deep knowledge of developing EJB applications.

  • Copying files failed. An unknown error occurred (-50)

    I currently have a PC (Samsung Q330 running Windows 7) and I am getting a Macbook Pro in a few days! Therefore I am transferring my iTunes (10.6) library to an external hardrive (Hitachi X250). While I was doing this I received an error message that read “Copying files failed. An unknown error occurred (-50)”. Therefore I was wondering, how the heck do I fix this???
    What I have done.
    I have gone in to “Advance Preferences”.
    I have changed the “iTunes Media folder location” to my external hardrive.
    I have the following two option selected “Keep iTunes Media folder organized” and “Copy files to iTunes Media folder when adding to library”.
    Then I go to File> Library> Organize Library. Then I select “Consolidate files” then I press the “OK” button.
    Then about half way in or so I get a pop up that reads “Copying files failed. An unknown error has occurred (-50).
    As you can see iTunes is not working. Could anyone help me???
    Thanks in advance, Donald Louch!

    Hmm... you may find iTunes is still connected to some files in the original location rather than the new one. You can check with my script Unconsolidated. If that is the case the script ConsolidateByMoving ought to switch the connection to a file already in the correct place however I'm currently working on a new build so the behaviour of the live version might be slightly different.
    tt2

  • Java version from class file

    How to decide from class file that which java version (1.3, 1.4 etc) was used to compile it?

    Sorry I made a mistake,
    its minor, major
    Dont we have some utility given by Sun for this?
    javap -verbose <classname>will print out versions plus more...
    Do I need to use InputStream for reading class file then see the version?
    DataInputStream din = new DataInputStream(new FileInputStream(classFile));
    din.readInt();
    short minor = din.readShort();
    short major = din.readShort();Why do you need to do this?

  • HT1449 Help! This all runs quite smoothly until i get to 'consolidate library'. Then, tracks start copying, then stop followed by a pop up saying 'Copying files failed. The disc could not be read from or written to.'  Any suggestions? Thank you!

    Help! This all runs quite smoothly until I get to 'consolidate library'. Then, tracks start copying, then stop followed by a pop up saying 'Copying files failed. The disc could not be read from or written to.'  Any suggestions? Thank you!

    I had similar problems, it was a nightmare and on a 3 month ipod too!. I use a Powerbook G4 at home and a G5 at work - both were returning the same problems. so I sent it off to apple, they quickly sent it back saying there was nothing wrong with and it didn't need to be repaired. I tried it again and the same problems occurred "disc cannot be written to or read from." I could copy 20 songs onto it at the very most. A couple of guys at my work suggested updating it on a PC, then adding tunes via my mac as normal - guess what!? it works a treat!?. How ridiculous is that!? an Apple product works best on a PC. these generations of ipods are obviously designed to work best on Intel based Macs. What is wrong Apple? are you abandoning the G-generation!? still, atleast my ipod works for now - it will prove a problem when I have to update the iPod's software since I don't own a PC or an intel-based Mac.

  • Where to place an xml file that is read by  java class file  dir structure

    Hello all,
    I have an xml file that I am using in lieu of a database to track conference rooms . This is a small file. I need to read this file from my java class file which is used by a jsp. Currently I have an absolute path C://logger/conference.xml. All works fine but I need to deploy to a different machine soon and so I need to place this file somewhere in the project directory structure (created by netbeans) so that it will be included in the war file and can be read by the java class file.
    Also what would be the relative path to this suggested directory.
    TIA!!!

    public class DOMconference {
        /** Creates a new instance of DOMconference */
        public DOMconference() { }
        //private final static String XML_FILE_NAME = "/opt/conference.xml";//set the output file and location
        public String XML_FILE_NAME = "";
        private final static String FIRST_CONF_ID = "8200";//set the initial conference number
        static Document document;
        public void getFilePath(String path)
            XML_FILE_NAME = path.replaceAll("\\\\","/");
            System.out.println("XML==============="+XML_FILE_NAME);
        File file = new File(XML_FILE_NAME);
        *generic method that returns a Document object
       public Document getDocument() throws SAXException, ParserConfigurationException,
               IOException
           DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
           factory.setIgnoringComments(true);
           factory.setCoalescing(true);
           factory.setNamespaceAware(false);
           factory.setValidating(false);
           DocumentBuilder builder = factory.newDocumentBuilder();
           document = builder.parse(file);   //HERE IS WHERE THE ERROR POINT S TO
           return document;
       }Here is the complete error:
    INFO: Server startup in 1282 ms
    XML===============C:/Documents and Settings/gforte/agi/build/web/WEB-INF/conference.xml
    [Fatal Error] bin:1:1: Content is not allowed in prolog.
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:172)
    at agi.DOMconference.getDocument(DOMconference.java:91)
    at agi.DOMconference.getLdapConferences(DOMconference.java:466)
    at agi.Ldap.getConferences(Ldap.java:243)
    at org.apache.jsp.test_jsp._jspService(test_jsp.java:111)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    [Fatal Error] bin:1:1: Content is not allowed in prolog.
    NotifyUtil::java.net.SocketException: Software caused connection abort: recv failed
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:606)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:571)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:936)
    at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:248)
    So if I change my code to this (note that all I change is how the constant XML_FILE_NAME is set and I copy and paste the path that is derived from getFilePath after the String.replaceAll call.):
    public class DOMconference {
        /** Creates a new instance of DOMconference */
        public DOMconference() { }
        private final static String XML_FILE_NAME = "C:/Documents and Settings/gforte/agi/build/web/WEB-INF/conference.xml";//set the output file and location
        //public String XML_FILE_NAME = "";
        private final static String FIRST_CONF_ID = "8200";//set the initial conference number
        static Document document;
        public void getFilePath(String path)
            //XML_FILE_NAME = path;//.replaceAll("\\\\","/");
            System.out.println("XML==============="+XML_FILE_NAME);
        File file = new File(XML_FILE_NAME);
        *generic method that returns a Document object
       public Document getDocument() throws SAXException, ParserConfigurationException,
               IOException
           DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
           factory.setIgnoringComments(true);
           factory.setCoalescing(true);
           factory.setNamespaceAware(false);
           factory.setValidating(false);
           DocumentBuilder builder = factory.newDocumentBuilder();
           document = builder.parse(file);
           return document;
       }All is fine..
    Just in case, here is my xml file contents copy and paste from notepad.
    <?xml version="1.0"?><conf_rooms><conf_room><conf_id>8200</conf_id><conf_name>Conference room 1</conf_name></conf_room><conf_room><conf_id>8201</conf_id><conf_name>Conference Room 2</conf_name></conf_room><conf_room><conf_id>8202</conf_id><conf_name>dufus</conf_name></conf_room></conf_rooms>Thanks for hanging in there with me on this.
    Graham

  • Failed to read wsdl file from url

    Hi all,
    I am struggling with WL 9.2, consuming a WSRP enabled portlet at the following point:
    Having created a proxy portlet, refering to the WSDL of the WSRP producer, I did successfully deploy the portal. When accessing the portal and consuming the portlet the following exception is thrown:
    com.bea.wsrp.faults.TransportException: Failed to read wsdl file from url due to -- java.net.ConnectException: Tried all: '8' addresses, but could not connect over HTTP to server: 'www.w3.org', port: '80';
    The WSDL includes a schema (http://www.w3.org/2001/XMLSchema). The URL is definetely accessible by the server.
    I am open for any kind of support ;) Thanks in advance!
    Kind regards,
    Matthias

    Yes, they are all local schemas. The way ALSB works, even if the import path in the wsdl or parent schema doesn't exist, relative to the current directory, you can specify which schema resolves that reference. My WSDL imports several schemas, all of which import others. When I was done importing all the schemas and resolving references, all the references in WSDLs and XSDs were assigned and valid. However, after all of those imports and reference resolution, it still says the WSDL is invalid, with the following odd error message:
    The WSDL is not semantically valid: Failed to read wsdl file from url due to -- java.net.MalformedURLException: no protocol: /XMLSchema/PaymentServices/Resources/PaymentServices-200802.
    That path listed refers to one of the schemas imported by the WSDL. The reference to that schema in the WSDL was resolved, and it doesn't complain about that reference.

  • How to read the java class file to convert it in java.

    hello all,
    i m developing the java application which generated the java code from the java 'class file' .
    Can anybody please help me, Is any java support for reading the class file? or how to know the class file format?
    I know the application javad, jad, javap which is doing the same thing.
    thanks for reply,
    - Jayd

    do you mean decompiling? there are tons of java decompilers available out there, what exactly are you trying to do here?

Maybe you are looking for

  • How to block deletion of Inspection Plan

    Dear Experts Accicendatally, our users are deleting the Inspection Plan, Is there any authorisation object to make Restriction on this,Transaction is QP02. Regards Sandeep patil

  • SharePoint Provider-hosted Apps - Expired OAuth Client Secret - Token Request failed

    Hi everyone, in the past days, we have encountered authentication problems with our provider-hosted SharePoint apps. The apps are not deployed through the Office Store, but through the specific organizational app-catalog of the SharePoint tenant of o

  • Merge with MDM automation

    Hi Folk, Has anyone tried the merge functionality with either with syndicator batch or syndication server ? It doesn't seem tobe working in our testing. Manual syndication, however seems tobe working.  Let me know your experiences/work arounds for th

  • What to do with a wet Mac

    Help !!! Iced Tea directly onto my MacBook Pro and I took the back off.. It's drying but wanted to know if there were any other tips to ensure that I can get this back in working order. Any advice would be greatly recommended. Thank you very much. Be

  • What is meaning in help document?

    when i find something from help document of JDK,i notice signs of <E> and <T>.could you tell me what are the meaning of those?thank you.