Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Embedding F-Script into Cocoa Applications
Subject:   example parameters and result
Date:   2002-08-07 15:32:56
From:   psheldon
"@class Airplane;" kept compiler from complaining class was not defined, but got warning :
cannot find class (factory) method (you only get those warnings the first build after a clean).


Added :
#import <FScript/Airplane.h>


and then there were no complaints after a clean.


This "@ construct" works good in headers where there are no method calls but produces innocuous, yet slightly confusing, warnings in .m files where the methods are called. Target code is produced that works, there are just warnings.


It seems, though, that when I program in the future I will get a whole lot of warnings and errors and, the more I know how to eliminate, the more I will be able to ferrit out the ones that count!


So, I am happy to have cleaned out the warnings. This shows that all my work in following columns is paying off in my losing my confusions.


Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • example parameters and result
    2002-08-09 10:16:23  pmougin [View]

    These warning were, as you said, innocuous. But note that this was specific to this use-case with Airplane. Actually, this kind of warning is not innocuous in the general case. It signal that the compiler do not have all the type information to generate a call to some methods. The compiler then fall back to a default typing rule, which may not actually be ok, depending on your real method signature. In this case, your application will have run-time errors.


    Phil
    • thank you, the use of warnings
      2002-08-10 08:40:18  psheldon [View]

      Now I know what warnings are for! They are nice. In my early experience of programming, when I got past listings with all their error messages, I would announce, attempting to smile to the boss, I am now ready for "trial by execution". The sentence embodied an unfair legal system much as the puritan dunking stool. Maybe the phrase, "getting your feet wet" is a euphemism for the way I should have felt back then.

      The boss had the luxury of irresponsibility and would sit back and see what happened. I was paid to be responsible if it didn't work. I see that bosses nowadays have also paid compiler designers to be responsible. I imagine compiler designers are left to do the trial by execution. That is what Apple tried to have the community understand when it had us users be beta testers and participate in development.