Re: WOComponent .api files
"Jerry W. Walker" <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Mike (and William), First to William, Now that we've dissolved the suspicion regarding your crashes resulting from missing .api files, we still have only helped you a bit with solving your original problem. If you post a stack trace or a bit more information about what you mean by "crash", perhaps we could offer a bit more useful help. ...and to Mike! On Feb 3, 2007, at 12:14 PM, Mike Schrag wrote: > OK Jerry Walker -- the gauntlet is thrown :) I wondered what that smacking sound was. > What I should have said is "it's impossible to autogenerate api > files that are particularly useful". Once again, I have to register a mild disagreement (since the gauntlet has been thrown). I've often auto-generated a useful subcomponent .api in WOBuilder by asking it to simply add all the iVars in as bindings (a one click process). Though this seldom creates the required API, once in a while it does, which constitutes my existence proof and negates your "it's impossible to autogenerate..." statement. However, whether it does the complete job or not, it often generates a VERY USEFUL . api file as a starting point. :-) > Any WebObjects IDE worth its salt doesn't need API files for > something that could be autogenerated. While I'll grant that with today's much faster processors the need has diminished considerably, when processors ran in the 10's of MHz range (like the original NeXT systems), auto-generated API files were very useful. Who knows, they might even be useful someday on the new iPhones (believing that its processor probably runs in the 10s of MHz range). I know, one questions how much development anyone would want to do on an iPhone, but hey... I can dream, right? Light fades to dimly lit conference room with projector displaying a browser window to the members of the meeting. Jerry: Now if you'll just point your browser to http:// www.jerrysmobilesite.com/cgi-bin/WebObjects/salesfigures.wo, you'll... Mike: Wow, Jerry, I thought your servers were still suffering from that DDoS attack. Jerry: They are, this is coming from this little Objective C based WO app on my iPhone here through WiFi. Now click on the 2009 figures to see that WO is clearly overtaking RoR for AJAX apps on ... or whatever. > SOME WebObjects IDE's, for instance, can live introspect your > components, and thus only need API files for things that couldn't > be autogenerated. At least that's what I've heard ... :) And with that, you probably feel like you've Eclipsed my arguments? Heh, WO unto you, foul knave! Fond regards, Jerry > ms > > On Feb 3, 2007, at 11:59 AM, Jerry W. Walker wrote: > >> Hi, William (and Mike), >> >> Actually, Mike is incorrect. There is a tool that can generate >> your .api files automatically. It's called WOBuilder. :-) >> >> To confirm this, simply open your project in Xcode, double click >> on the WOComponent to open WOBuilder and associate it with your >> project, and save the component again from within WOBuilder. You >> may have to make a change for WOBuilder to generate the .api file, >> but I think it will do so by simply re-saving. On the other hand, >> if you're using Xcode/WOBuilder, the fact that WOBuilder >> regenerated the .api file doesn't clue Xcode into this fact, so to >> see the new .api file in Xcode's Groups & Files listing, you will >> have to explicitly re-add it. >> >> It isn't often I get to correct Mike, and I relish the >> opportunities. However, overall, Mike is correct (as usual): >> >> * the .api file is not used (to my knowledge) during execution >> >> * it is impossible for WOBuilder to know what your API for any >> component really is, so it only autogenerates a minimal .api file >> as it does when you first create a WOComponent >> >> On the other hand, the API for most WOComponents is trivial if >> you're only using them for complete pages. It's when you start >> using subcomponents that they become very useful in helping >> WOBuilder (or any IDE that hopes to replace it) determine that a >> subcomponent is being used correctly (i.e. all of its required >> bindings are bound, its mutually exclusive bindings are not all >> bound, bindings with common domains have values selected from >> their domains, optional bindings are represented in the GetInfo >> panel, etc.). >> >> Having said all that, it seems that the real problem lies in your >> copying the components over. The .api files should still exist in >> your old project, they're just not normally contained within the >> WOComponent's directory. Like the .java class file for the >> component, they are external to it. So just copy the old .api >> files over from your old project and your WOComponents should >> retain all of their (development environment) advantages. >> >> Regards, >> Jerry >> >> On Feb 3, 2007, at 9:53 AM, Mike Schrag wrote: >> >>> .api files are used only by development environments to provide >>> things like code completion, etc. They are not used at all in >>> deployment, so that's not your problem. It's also not really >>> possible to autogenerate .api files because the point of them is >>> to define things that an IDE is not able to figure out on its >>> own. For instance, if you have a dynamic element, it's >>> impossible for an IDE to know what the bindings are for it. >>> >>> ms >>> >>> On Feb 3, 2007, at 9:18 AM, WILLIAM GARNETT wrote: >>> >>>> Hello everyone; >>>> >>>> >>>> >>>> A recent disaster required me to re-generate my project. >>>> >>>> I started a new project and added in all the WOCompents - but >>>> this process >>>> did not generate the corresponding .api files. >>>> >>>> It all seems to work fine, but sporadically I have some >>>> mysterious crashes >>>> in deployment mode. >>>> >>>> >>>> >>>> My question is: Could these crashes be due to the fact that >>>> the .api files >>>> are not there? Are they essential? >>>> >>>> >>>> >>>> If so, do I have to generate the .api's manually? Or is there a >>>> tool that >>>> will build them automatically? >>>> >>>> >>>> >>>> Thanking you in advance for your replies, >>>> >>>> >>>> >>>> Cheers, >>>> >>>> Bill. >>>> >>>> >>>> _______________________________________________ >>>> WebObjects-dev mailing list >>>> [email protected] >>>> http://www.omnigroup.com/mailman/listinfo/webobjects-dev >>> >>> >>> _______________________________________________ >>> WebObjects-dev mailing list >>> [email protected] >>> http://www.omnigroup.com/mailman/listinfo/webobjects-dev >> >> >> -- >> __ Jerry W. Walker, >> WebObjects Developer/Instructor for High Performance Industrial >> Strength Internet Enabled Systems >> >> [email protected] >> 203 278-4085 office >> >> >> > > > _______________________________________________ > WebObjects-dev mailing list > [email protected] > http://www.omnigroup.com/mailman/listinfo/webobjects-dev -- __ Jerry W. Walker, WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems [email protected] 203 278-4085 office