• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can't import a header file? + other warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't import a header file? + other warnings


  • Subject: Can't import a header file? + other warnings
  • From: Joel Rosenblum <email@hidden>
  • Date: Tue, 30 Apr 2002 02:34:54 -0400

(Please bear with me, there are a lot of questions here, I'm new to cocoa, and not finding it very self-explanatory.)

I downloaded the MOKit from lorax.com for its RegEx capabilities, and I installed it by dragging the MOKit.framework folder to my /Library/Frameworks folder, as the Installation Guide told me to. Then, in the class where I used the RegEx, at the top I put #import "MOKit.h" but when I built the app, I got a compiler error saying it couldn't find MOKit.h. Well, I don't know why it can't find it. Is it in the wrong folder? I tried going to Project:Add Frameworks and adding MOKit.framework manually. That didn't fix the problem though, it still can't find MOKit.h. Any suggestions?

Also, I'm getting a number of other compiler warnings which I don't understand:
WindowController.m:11: warning: cannot find method.
WindowController.m:11: warning: return type for `setController:' defaults to id
WindowController.m:12: warning: cannot find method.
WindowController.m:12: warning: return type for `startAnimating' defaults to id

It says it can't find the method, but then it says the return type for that SAME method (which it says it can't find!) defaults to id. I don't know why it would default to id, since I know that the return type is void. And even though it can't find the method, I'm fairly certain (by use of a beep) that the method IS being called! At least one of them is. startAnimating is a method that should be in NSProgressIndicator, no?

This is a line of code I have to format a string, the compiler says "class factory method not found" referring to "makeStringWithFormat" no doubt. I must have gotten the syntax wrong, because I don't see the whole declaration in the Cocoa help.

result = [NSString makeStringWithFormat:@"%f words/min, %f %f-letter-words/min.", f1, f2, f3];

And then it says the return type for makeStringWithFormat defaults to id. Argh!


Now a few misc. questions:

I made an outlet in IB from one class to another, and connected it in the instance of the containing class, all in IB. I of course did "Create Files" from the class. The outlet did not work though, as I was unable to call any of the outlet's methods in code. What might cause the outlet to not work? All of my other outlets work.

Where is setVisible:BOOL for controls in the cocoa documentation?

How do I set the text of an editfield? I tried setText but that didn't work, the docs don't seem to mention any way of setting the text for an NSTextField. Such an elementary function, too...

What is the Ticks function in cocoa? I thought NSTicks() would return the tick count of the system, but that function doesn't seem to exist. And where would I search the docs for this?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Can't import a header file? + other warnings
      • From: Nicholas Riley <email@hidden>
    • Re: Can't import a header file? + other warnings
      • From: Ondra Cada <email@hidden>
  • Prev by Date: ON Docs
  • Next by Date: Debugging OpenGL screensaver
  • Previous by thread: Re: DOCK: CFMessagePortSendRequest returned (-1|-2)
  • Next by thread: Re: Can't import a header file? + other warnings
  • Index(es):
    • Date
    • Thread