Re: WOComponent .api files

Mike Schrag <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
OK Jerry Walker -- the gauntlet is thrown :)  What I should have said  
is "it's impossible to autogenerate api files that are particularly  
useful".  Any WebObjects IDE worth its salt doesn't need API files  
for something that could be autogenerated.  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 ... :)

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
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.