API generation

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

API generation

Amit Rana
Hi,

I am trying to configure API viewer for my application.

I have done no changes in config.json or any file. I simply run
"generate.py api" and when I launch index.html, I see the API tree with
qx part and my application class and its structure and everything works
fine.

But, if I call index.html from a different path, I only see the
structure. When I click on any node in the tree, I get popup errors
saying  Couldn't load file: ./script/qx.application.AbstractGui.js etc.
(for both qx part and my application path). I guess I have to change
some setting but not sure what ?

I have traced the flow (index.html refers script/apiviewer.js which i
turn refers apiviewer-0.js), but am unable to correct the problem. I
tried changing the path in index.html and apiviewer.js but then I get
blank screens. :-(

Can anyone help me out here?

regards

--
Amit Rana
SpagoBI Developer
www.eng.it                    
www.spagoworld.org


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

Thomas Herchenroeder


Amit Rana wrote:

> Hi,
>
> I am trying to configure API viewer for my application.
>
> I have done no changes in config.json or any file. I simply run
> "generate.py api" and when I launch index.html, I see the API tree with
> qx part and my application class and its structure and everything works
> fine.
>
> But, if I call index.html from a different path, I only see the
> structure. When I click on any node in the tree, I get popup errors
> saying  Couldn't load file: ./script/qx.application.AbstractGui.js etc.
> (for both qx part and my application path). I guess I have to change
> some setting but not sure what ?
>
> I have traced the flow (index.html refers script/apiviewer.js which i
> turn refers apiviewer-0.js), but am unable to correct the problem. I
> tried changing the path in index.html and apiviewer.js but then I get
> blank screens. :-(
>
> Can anyone help me out here?
>  

The 'api' sub-folder created when running 'generate.py api' represents a
complete and self-contained qooxdoo 'build' application. The index.html
and the script/*.js files use URIs to reference each other that are
contained in the directory tree under the 'api' folder. This also
includes references to resources like images, which are used in the
apiviewer app.

You cannot just move the index.html of that application around. Move the
whole directory tree, but don't take it apart. If you are desperate
about splitting the app into pieces and distribute it, there is a way in
theory to achieve that, but I never tried it with apiviewer and I
wouldn't recommend it.

If you just want the index.html to be "remote", use a proxy index.html
that contains only an iframe that loads the original index.html. Then
everything should work.

HTH,
Thomas

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

Amit Rana
Hi,

I found out the problem but the can't figure out its solution.

The problem is that even though all my classes are inside api/script folder, their is a problem with the name of the class.

If my code had custom.abc.Xyz (with Uppercase X in Xyz.js), the API job generates custom.abc.xyz (with lowercase x).
Now, in my API tree, I see Xyz, but on clicking, qooxdoo cannot find Xyz.js as it has renamed it to xyz.js. So, it gives an error Cannot load file Xyz.js.

So, can someone tell me why is the classname getting renamed by the api job ?

regards
Amit Rana


thron7-2 wrote

Amit Rana wrote:
> Hi,
>
> I am trying to configure API viewer for my application.
>
> I have done no changes in config.json or any file. I simply run
> "generate.py api" and when I launch index.html, I see the API tree with
> qx part and my application class and its structure and everything works
> fine.
>
> But, if I call index.html from a different path, I only see the
> structure. When I click on any node in the tree, I get popup errors
> saying  Couldn't load file: ./script/qx.application.AbstractGui.js etc.
> (for both qx part and my application path). I guess I have to change
> some setting but not sure what ?
>
> I have traced the flow (index.html refers script/apiviewer.js which i
> turn refers apiviewer-0.js), but am unable to correct the problem. I
> tried changing the path in index.html and apiviewer.js but then I get
> blank screens. :-(
>
> Can anyone help me out here?
>  

The 'api' sub-folder created when running 'generate.py api' represents a
complete and self-contained qooxdoo 'build' application. The index.html
and the script/*.js files use URIs to reference each other that are
contained in the directory tree under the 'api' folder. This also
includes references to resources like images, which are used in the
apiviewer app.

You cannot just move the index.html of that application around. Move the
whole directory tree, but don't take it apart. If you are desperate
about splitting the app into pieces and distribute it, there is a way in
theory to achieve that, but I never tried it with apiviewer and I
wouldn't recommend it.

If you just want the index.html to be "remote", use a proxy index.html
that contains only an iframe that loads the original index.html. Then
everything should work.

HTH,
Thomas

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

Amit Rana
In reply to this post by Amit Rana
Hi all,

Has anyone tried generating API for their applications ? I try to call
api/index.html from my server's index.html and get the errors as
mentioned below.

If I open api/index.html directly in web browser, it works perfectly.

Do I have to edit my config.json ?

regards
Amit

Amit Rana wrote on 16-12-2008:

> Hi,
>
> I am trying to configure API viewer for my application.
>
> I have done no changes in config.json or any file. I simply run
> "generate.py api" and when I launch index.html, I see the API tree
> with qx part and my application class and its structure and everything
> works fine.
>
> But, if I call index.html from a different path, I only see the
> structure. When I click on any node in the tree, I get popup errors
> saying  Couldn't load file: ./script/qx.application.AbstractGui.js
> etc. (for both qx part and my application path). I guess I have to
> change some setting but not sure what ?
>
> I have traced the flow (index.html refers script/apiviewer.js which i
> turn refers apiviewer-0.js), but am unable to correct the problem. I
> tried changing the path in index.html and apiviewer.js but then I get
> blank screens. :-(
>
> Can anyone help me out here?
>
> regards
>


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

thron7
Amit,

what are you trying to achieve?! What do you mean when you say you
"...try to *call* api/index.html from my server's index.html...". You
cannot "call" a web page, can you?! So what does that mean you "call"
one web page from another?! If you *load* the Apiviewer index.html from
your web server, this should work as it works for me and the many
apiviewers we have published on qooxdoo.org. So, does it? Obviously, you
are doing something bizarre so that relative paths throw up. (I have a
faint feeling I answered your OP, didn't I ...?!).

Thomas

Amit Rana wrote:

> Hi all,
>
> Has anyone tried generating API for their applications ? I try to call
> api/index.html from my server's index.html and get the errors as
> mentioned below.
>
> If I open api/index.html directly in web browser, it works perfectly.
>
> Do I have to edit my config.json ?
>
> regards
> Amit
>
> Amit Rana wrote on 16-12-2008:
>  
>> Hi,
>>
>> I am trying to configure API viewer for my application.
>>
>> I have done no changes in config.json or any file. I simply run
>> "generate.py api" and when I launch index.html, I see the API tree
>> with qx part and my application class and its structure and everything
>> works fine.
>>
>> But, if I call index.html from a different path, I only see the
>> structure. When I click on any node in the tree, I get popup errors
>> saying  Couldn't load file: ./script/qx.application.AbstractGui.js
>> etc. (for both qx part and my application path). I guess I have to
>> change some setting but not sure what ?
>>
>> I have traced the flow (index.html refers script/apiviewer.js which i
>> turn refers apiviewer-0.js), but am unable to correct the problem. I
>> tried changing the path in index.html and apiviewer.js but then I get
>> blank screens. :-(
>>
>> Can anyone help me out here?
>>
>> regards
>>
>>    
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>  

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

Amit Rana
Hi Thron,

Thanks for the details.

By "call", I mean a simple HTML HREF tag inside in server's index.html
to the api/index.html (<a href="js/custom/api/index.html">)

And, yes you had also replied earlier
(http://n2.nabble.com/API-generation-td1663754.html) but you told not to
break api folder into parts which i was not doing then as well as now.

I know it may be a very simple thing for you guys but I am not able to
figure it out.

Best regards
Amit Rana

thron7 wrote:

> Amit,
>
> what are you trying to achieve?! What do you mean when you say you
> "...try to *call* api/index.html from my server's index.html...". You
> cannot "call" a web page, can you?! So what does that mean you "call"
> one web page from another?! If you *load* the Apiviewer index.html from
> your web server, this should work as it works for me and the many
> apiviewers we have published on qooxdoo.org. So, does it? Obviously, you
> are doing something bizarre so that relative paths throw up. (I have a
> faint feeling I answered your OP, didn't I ...?!).
>
> Thomas
>
> Amit Rana wrote:
>  
>> Hi all,
>>
>> Has anyone tried generating API for their applications ? I try to call
>> api/index.html from my server's index.html and get the errors as
>> mentioned below.
>>
>> If I open api/index.html directly in web browser, it works perfectly.
>>
>> Do I have to edit my config.json ?
>>
>> regards
>> Amit
>>
>> Amit Rana wrote on 16-12-2008:
>>  
>>    
>>> Hi,
>>>
>>> I am trying to configure API viewer for my application.
>>>
>>> I have done no changes in config.json or any file. I simply run
>>> "generate.py api" and when I launch index.html, I see the API tree
>>> with qx part and my application class and its structure and everything
>>> works fine.
>>>
>>> But, if I call index.html from a different path, I only see the
>>> structure. When I click on any node in the tree, I get popup errors
>>> saying  Couldn't load file: ./script/qx.application.AbstractGui.js
>>> etc. (for both qx part and my application path). I guess I have to
>>> change some setting but not sure what ?
>>>
>>> I have traced the flow (index.html refers script/apiviewer.js which i
>>> turn refers apiviewer-0.js), but am unable to correct the problem. I
>>> tried changing the path in index.html and apiviewer.js but then I get
>>> blank screens. :-(
>>>
>>> Can anyone help me out here?
>>>
>>> regards
>>>
>>>    
>>>      
>>    
>
>  


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

thron7
Hi Amit,


> By "call", I mean a simple HTML HREF tag inside in server's index.html
> to the api/index.html (<a href="js/custom/api/index.html">)
>  

Ok, so that would normally be called "linking" from one page to another :).

Please have a look at the following web page:
http://demo.qooxdoo.org/current/

Please not only look at the rendered page but also at the page's source.
It's a fairly straight-forward HTML page which, among other things,
features a link to an apiviewer instance ("<a
href="apiviewer/index.html">). And it does so with a relative URI which
is immediately down from the current page's directory. So this looks
like it is pretty close to your scenario, right?!

If I click on the link, the apiviewer is loaded alright. How about you?
What is different to your server's index.html?

T.

> And, yes you had also replied earlier
> (http://n2.nabble.com/API-generation-td1663754.html) but you told not to
> break api folder into parts which i was not doing then as well as now.
>
> I know it may be a very simple thing for you guys but I am not able to
> figure it out.
>
> Best regards
> Amit Rana
>
> thron7 wrote:
>  
>> Amit,
>>
>> what are you trying to achieve?! What do you mean when you say you
>> "...try to *call* api/index.html from my server's index.html...". You
>> cannot "call" a web page, can you?! So what does that mean you "call"
>> one web page from another?! If you *load* the Apiviewer index.html from
>> your web server, this should work as it works for me and the many
>> apiviewers we have published on qooxdoo.org. So, does it? Obviously, you
>> are doing something bizarre so that relative paths throw up. (I have a
>> faint feeling I answered your OP, didn't I ...?!).
>>
>> Thomas
>>
>> Amit Rana wrote:
>>  
>>    
>>> Hi all,
>>>
>>> Has anyone tried generating API for their applications ? I try to call
>>> api/index.html from my server's index.html and get the errors as
>>> mentioned below.
>>>
>>> If I open api/index.html directly in web browser, it works perfectly.
>>>
>>> Do I have to edit my config.json ?
>>>
>>> regards
>>> Amit
>>>
>>> Amit Rana wrote on 16-12-2008:
>>>  
>>>    
>>>      
>>>> Hi,
>>>>
>>>> I am trying to configure API viewer for my application.
>>>>
>>>> I have done no changes in config.json or any file. I simply run
>>>> "generate.py api" and when I launch index.html, I see the API tree
>>>> with qx part and my application class and its structure and everything
>>>> works fine.
>>>>
>>>> But, if I call index.html from a different path, I only see the
>>>> structure. When I click on any node in the tree, I get popup errors
>>>> saying  Couldn't load file: ./script/qx.application.AbstractGui.js
>>>> etc. (for both qx part and my application path). I guess I have to
>>>> change some setting but not sure what ?
>>>>
>>>> I have traced the flow (index.html refers script/apiviewer.js which i
>>>> turn refers apiviewer-0.js), but am unable to correct the problem. I
>>>> tried changing the path in index.html and apiviewer.js but then I get
>>>> blank screens. :-(
>>>>
>>>> Can anyone help me out here?
>>>>
>>>> regards
>>>>
>>>>    
>>>>      
>>>>        
>>>    
>>>      
>>  
>>    
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>  

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

Amit Rana
Hi,

I saw the source and its pretty straightforward. I don't get why my code doesn't work. :-(
My index.html is similar but the api/index.html is nested deep inside (which should not be a problem):

<li>
    <h2>API Viewer</h2>
        <p>qooxdoo-based API viewer featuring the API reference.</p>
          <span class="local"><a href="myJSfolder/custom/api/index.html"><b>Open API viewer</b></a>
          <span class="publish"><a href="myJSfolder/custom/api/index.html"><b>Open API viewer</b></a></span>
</li>

regards
Amit


thron7 wrote:
Hi Amit,


  
By "call", I mean a simple HTML HREF tag inside in server's index.html 
to the api/index.html (<a href="js/custom/api/index.html">)
  
    

Ok, so that would normally be called "linking" from one page to another :).

Please have a look at the following web page: 
http://demo.qooxdoo.org/current/

Please not only look at the rendered page but also at the page's source. 
It's a fairly straight-forward HTML page which, among other things, 
features a link to an apiviewer instance ("<a 
href="apiviewer/index.html">). And it does so with a relative URI which 
is immediately down from the current page's directory. So this looks 
like it is pretty close to your scenario, right?!

If I click on the link, the apiviewer is loaded alright. How about you? 
What is different to your server's index.html?

T.

  
And, yes you had also replied earlier 
(http://n2.nabble.com/API-generation-td1663754.html) but you told not to 
break api folder into parts which i was not doing then as well as now.

I know it may be a very simple thing for you guys but I am not able to 
figure it out.

Best regards
Amit Rana

thron7 wrote:
  
    
Amit,

what are you trying to achieve?! What do you mean when you say you 
"...try to *call* api/index.html from my server's index.html...". You 
cannot "call" a web page, can you?! So what does that mean you "call" 
one web page from another?! If you *load* the Apiviewer index.html from 
your web server, this should work as it works for me and the many 
apiviewers we have published on qooxdoo.org. So, does it? Obviously, you 
are doing something bizarre so that relative paths throw up. (I have a 
faint feeling I answered your OP, didn't I ...?!).

Thomas

Amit Rana wrote:
  
    
      
Hi all,

Has anyone tried generating API for their applications ? I try to call 
api/index.html from my server's index.html and get the errors as 
mentioned below.

If I open api/index.html directly in web browser, it works perfectly.

Do I have to edit my config.json ?

regards
Amit

Amit Rana wrote on 16-12-2008:
  
    
      
        
Hi,

I am trying to configure API viewer for my application.

I have done no changes in config.json or any file. I simply run 
"generate.py api" and when I launch index.html, I see the API tree 
with qx part and my application class and its structure and everything 
works fine.

But, if I call index.html from a different path, I only see the 
structure. When I click on any node in the tree, I get popup errors 
saying  Couldn't load file: ./script/qx.application.AbstractGui.js 
etc. (for both qx part and my application path). I guess I have to 
change some setting but not sure what ?

I have traced the flow (index.html refers script/apiviewer.js which i 
turn refers apiviewer-0.js), but am unable to correct the problem. I 
tried changing the path in index.html and apiviewer.js but then I get 
blank screens. :-(

Can anyone help me out here?

regards
          

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

thron7


Amit Rana wrote:

> Hi,
>
> I saw the source and its pretty straightforward. I don't get why my
> code doesn't work. :-(
> My index.html is similar but the api/index.html is nested deep inside
> (which should not be a problem):
>
> <li>
>    <h2>API Viewer</h2>
>        <p>qooxdoo-based API viewer featuring the API reference.</p>
>          <span class="local"><a
> href="myJSfolder/custom/api/index.html"><b>Open API viewer</b></a>
>          <span class="publish"><a
> href="myJSfolder/custom/api/index.html"><b>Open API viewer</b></a></span>
> </li>
>

Why are you using two links with different 'class' attributes around
them? Is there some magic in the CSS for those classes going on? Are the
resulting URLs correctly requested by the browser once you click them
(check Firebug Net tab)? What happens to the URLs on the server
(aliases, rewriting, ..)?

Can you reproduce the issue in a stripped-down scenario (simple HTML
page, no CSS, one link to Apiviewer, no server-side rewriting, ...)?

Thomas

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

Amit Rana
I tried with a simple version too but got the same error.

The issue which Firebug states (when I click on say qx.Class) is :
GET qx.Class.js - Error 404

It tries to look for /api/script/qx.Class.js but actually the file name on server (under api/script) is qx.class.js (Note that qx.class.js is with "c" and not "C")

qx.class.js code snippet:
{type:"class",attributes:{"isStatic":"true","name":"Class","packageName":"qx","fullName":"qx.Class","type":"bootstrap"}...

So, api/index.html#qx.Class should be calling qx.class.js but tries to look for qx.Class.js.

This thing works properly if api/index.html is called independently in the browser.

Amit

thron7 wrote:
Amit Rana wrote:
  
Hi,

I saw the source and its pretty straightforward. I don't get why my 
code doesn't work. :-(
My index.html is similar but the api/index.html is nested deep inside 
(which should not be a problem):

<li>
   <h2>API Viewer</h2>
       <p>qooxdoo-based API viewer featuring the API reference.</p>
         <span class="local"><a 
href="myJSfolder/custom/api/index.html"><b>Open API viewer</b></a>
         <span class="publish"><a 
href="myJSfolder/custom/api/index.html"><b>Open API viewer</b></a></span>
</li>

    

Why are you using two links with different 'class' attributes around 
them? Is there some magic in the CSS for those classes going on? Are the 
resulting URLs correctly requested by the browser once you click them 
(check Firebug Net tab)? What happens to the URLs on the server 
(aliases, rewriting, ..)?

Can you reproduce the issue in a stripped-down scenario (simple HTML 
page, no CSS, one link to Apiviewer, no server-side rewriting, ...)?

Thomas

  


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

thron7


Amit Rana wrote:
> I tried with a simple version too but got the same error.
>
> The issue which Firebug states (when I click on say qx.Class) is :
> GET qx.Class.js - Error 404
>
> It tries to look for /api/script/qx.Class.js but actually the file
> name on server (under api/script) is qx.class.js (Note that
> qx.class.js is with "c" and not "C")

But that means it is looking for an *absolute* server path
(/api/script/qx.Class.js), not for a relative one, which is a big
difference. Again, what is the *exact* URL that is requested by the
browser (don't guess, look), what is at least the server path? If your
initial request for the index.html was myJSfolder/custom/api/index.html,
this is translated to some full URL with a server path like
/a/b/myJSfolder/custom/api/index.html. When now qx.Class.js is requested
it has to translate into an URL with a server path of
/a/b/myJSfolder/custom/api/script/qx.Class.js. - Is this the case?

(I don't think it relates to capitalisation; why would it then work when
you open api/index.html directly. Have you checked capitalisation in
URLs when you open apiviewer directly?).

T.

>
> qx.class.js code snippet:
>
> {type:"class",attributes:{"isStatic":"true","name":"Class","packageName":"qx","fullName":"qx.Class","type":"bootstrap"}...
>
>
>
> So, api/index.html#qx.Class should be calling qx.class.js but tries to
> look for qx.Class.js.
>
> This thing works properly if api/index.html is called independently in
> the browser.
>
> Amit
>
> thron7 wrote:
>> Amit Rana wrote:
>>  
>>> Hi,
>>>
>>> I saw the source and its pretty straightforward. I don't get why my
>>> code doesn't work. :-(
>>> My index.html is similar but the api/index.html is nested deep
>>> inside (which should not be a problem):
>>>
>>> <li>
>>>    <h2>API Viewer</h2>
>>>        <p>qooxdoo-based API viewer featuring the API reference.</p>
>>>          <span class="local"><a
>>> href="myJSfolder/custom/api/index.html"><b>Open API viewer</b></a>
>>>          <span class="publish"><a
>>> href="myJSfolder/custom/api/index.html"><b>Open API
>>> viewer</b></a></span>
>>> </li>
>>>
>>>    
>>
>> Why are you using two links with different 'class' attributes around
>> them? Is there some magic in the CSS for those classes going on? Are
>> the resulting URLs correctly requested by the browser once you click
>> them (check Firebug Net tab)? What happens to the URLs on the server
>> (aliases, rewriting, ..)?
>>
>> Can you reproduce the issue in a stripped-down scenario (simple HTML
>> page, no CSS, one link to Apiviewer, no server-side rewriting, ...)?
>>
>> Thomas
>>
>>  
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>  

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

Amit Rana
My Application start page is :
http://localhost:8080/MyApplicationName/   (which shows the server's index.html)

This index.html has the link to API as :
<span class="local"><a href="myJSfolder/custom/api/index.html"><b>Open API viewer</b></a></span>

Clicking on this shows the URL on browser as : http://localhost:8080/MyApplicationName/myJSfolder/custom/api/index.html
This index.html has code as :
<script type="text/javascript" src="script/apiviewer.js"></script>
and I see the application tree with qx and my custom application nodes and all the sub-nodes properly.

Now, when I click Class node (qx.Class), the URL shows : http://localhost:8080/MyApplicationName/myJSfolder/custom/api/index.html#qx.Class (which is correct), but I get the following popup error:


Firebug console says :
GET http://localhost:8080/Chiron/js/spagobi/api/script/qx.Class.js
with response as :  The requested resource (/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js) is not available.

And, when I go to : http://localhost:8080/MyApplicationName/myJSfolder/custom/api/script/ in browser URL, I see a list of files with qx.class.js as one of them.


I went into : qooxdoo-0.8-sdk\component\apiviewer and did a generate.py source. It also generated a script folder with classes in lowercase (qx.class.js) and calling index.html works.
I created a dummy index.html and called qooxdoo-0.8-sdk\component\apiviewer\index.html and that too works.
Then, from dummy index.html, I called MyApplicationName/myJSfolder/custom/api/index.html and that works too.

So, the problem occurs only when data is on server. I am trying to dig into that.

Amit

thron7 wrote:
Amit Rana wrote:
  
I tried with a simple version too but got the same error.

The issue which Firebug states (when I click on say qx.Class) is :
GET qx.Class.js - Error 404

It tries to look for /api/script/qx.Class.js but actually the file 
name on server (under api/script) is qx.class.js (Note that 
qx.class.js is with "c" and not "C")
    

But that means it is looking for an *absolute* server path 
(/api/script/qx.Class.js), not for a relative one, which is a big 
difference. Again, what is the *exact* URL that is requested by the 
browser (don't guess, look), what is at least the server path? If your 
initial request for the index.html was myJSfolder/custom/api/index.html, 
this is translated to some full URL with a server path like 
/a/b/myJSfolder/custom/api/index.html. When now qx.Class.js is requested 
it has to translate into an URL with a server path of 
/a/b/myJSfolder/custom/api/script/qx.Class.js. - Is this the case?

(I don't think it relates to capitalisation; why would it then work when 
you open api/index.html directly. Have you checked capitalisation in 
URLs when you open apiviewer directly?).

T.

  
qx.class.js code snippet:

{type:"class",attributes:{"isStatic":"true","name":"Class","packageName":"qx","fullName":"qx.Class","type":"bootstrap"}... 



So, api/index.html#qx.Class should be calling qx.class.js but tries to 
look for qx.Class.js.

This thing works properly if api/index.html is called independently in 
the browser.

Amit

thron7 wrote:
    
Amit Rana wrote:
 
      
Hi,

I saw the source and its pretty straightforward. I don't get why my 
code doesn't work. :-(
My index.html is similar but the api/index.html is nested deep 
inside (which should not be a problem):

<li>
   <h2>API Viewer</h2>
       <p>qooxdoo-based API viewer featuring the API reference.</p>
         <span class="local"><a 
href="myJSfolder/custom/api/index.html"><b>Open API viewer</b></a>
         <span class="publish"><a 
href="myJSfolder/custom/api/index.html"><b>Open API 
viewer</b></a></span>
</li>

    
        
Why are you using two links with different 'class' attributes around 
them? Is there some magic in the CSS for those classes going on? Are 
the resulting URLs correctly requested by the browser once you click 
them (check Firebug Net tab)? What happens to the URLs on the server 
(aliases, rewriting, ..)?

Can you reproduce the issue in a stripped-down scenario (simple HTML 
page, no CSS, one link to Apiviewer, no server-side rewriting, ...)?

Thomas

  
      


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

thron7


Amit Rana wrote:

> My Application start page is :
> http://localhost:8080/MyApplicationName/   (which shows the server's index.html)
>
> This index.html has the link to API as :
> <span class="local"><a href="myJSfolder/custom/api/index.html"><b>Open API
> viewer</b></a></span>
>
> Clicking on this shows the URL on browser as :
> http://localhost:8080/MyApplicationName/myJSfolder/custom/api/index.html
> This index.html has code as :
> <script type="text/javascript" src="script/apiviewer.js"></script>
>
> Firebug console says :
> GET http://localhost:8080/Chiron/js/spagobi/api/script/qx.Class.js
>  

THIS ^^^^ is very suspicious! Why is there a request to a URL with
server path starting with "/Chiron/js/...", when we are in a path that
starts with "/MyApplicationName/..."?!

- Clear your browser cache.
- Clear any server cache you might have.


> with response as :  The requested resource
> (/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js) is not available.
>
> And, when I go to :
> http://localhost:8080/MyApplicationName/myJSfolder/custom/api/script/ in browser
> URL, I see a list of files with qx.class.js as one of them.
>
>
> I went into : qooxdoo-0.8-sdk\component\apiviewer and did a generate.py source.
>  

Why would that help? Aren't you trying to browse a custom api viewer,
built in your own project with "generate.py api"?!

> It also generated a script folder with classes in lowercase (qx.class.js) and
> calling index.html works.
>  

You're using Windows, so capitalisation doesn't matter.

> I created a dummy index.html and called
> qooxdoo-0.8-sdk\component\apiviewer\index.html and that too works.
> Then, from dummy index.html, I called
> MyApplicationName/myJSfolder/custom/api/index.html and that works too.
>
> So, the problem occurs only when data is on server. I am trying to dig into that.
>  

Yes, there is not much use in testing against an offline access (file://
protocol). You have to test and compare online access.

T.


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

Amit Rana
Hi,

Since I was getting error as "Couldn't load file: ..", so searching in apiviewer-0.js revealed a code snippet :

var M=new qx.io.remote.Request(L);
M.addListener(D,function(N){this.error("Couldn't load file: "+L);},this);

So, I tried a simple code  :

        var L = "http://localhost:8080/Chiron/js/spagobi/api/script/qx.Class.js";
        var M=new qx.io.remote.Request(L);
         M.addListener("failed",function(N){this.error("Couldn't load file: "+L);},this);
         M.addListener("completed",function(N){this.error("Loaded file: "+L);},this);
         M.send();

This gives console output as Couldn't load file ....

And, var L = "http://localhost:8080/Chiron/js/spagobi/api/script/qx.class.js";
gives output as Loaded file ...

I know that this had to work because files on server are with lowercase names. But, if its not a case-sensitive issue, then why is the server giving me Error 404.
Now, how to solve this for the server (online access) and why the local file (offline access) work's are the real mysteries for me. :-)

thron7 wrote:
Amit Rana wrote:
  
My Application start page is :
http://localhost:8080/MyApplicationName/   (which shows the server's index.html)

This index.html has the link to API as :
<span class="local"><a href="myJSfolder/custom/api/index.html"><b>Open API 
viewer</b></a></span>

Clicking on this shows the URL on browser as : 
http://localhost:8080/MyApplicationName/myJSfolder/custom/api/index.html
This index.html has code as :
<script type="text/javascript" src="script/apiviewer.js"></script>

Firebug console says :
GET http://localhost:8080/Chiron/js/spagobi/api/script/qx.Class.js
  
    

THIS ^^^^ is very suspicious! Why is there a request to a URL with 
server path starting with "/Chiron/js/...", when we are in a path that 
starts with "/MyApplicationName/..."?!

- Clear your browser cache.
- Clear any server cache you might have.

  
Sorry Thomas, the firebug console error is not
GET http://localhost:8080/Chiron/js/spagobi/api/script/qx.Class.js (was trying with a dummy application earlier)
but
GET http://localhost:8080/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js
with response as :
The requested resource (/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js) is not available.
  
with response as :  The requested resource 
(/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js) is not available.

And, when I go to : 
http://localhost:8080/MyApplicationName/myJSfolder/custom/api/script/ in browser 
URL, I see a list of files with qx.class.js as one of them.


I went into : qooxdoo-0.8-sdk\component\apiviewer and did a generate.py source. 
  
    

Why would that help? Aren't you trying to browse a custom api viewer, 
built in your own project with "generate.py api"?!

  
I just wanted to test if the files generated are with lower/upper case (because qooxdoo-0.8-sdk\framework\api\script has the files with uppercase which got ma confused)

  
It also generated a script folder with classes in lowercase (qx.class.js) and 
calling index.html works.
  
    

You're using Windows, so capitalisation doesn't matter.

  
I agree as the offline access works fine. I need to solve how.

  
I created a dummy index.html and called 
qooxdoo-0.8-sdk\component\apiviewer\index.html and that too works.
Then, from dummy index.html, I called 
MyApplicationName/myJSfolder/custom/api/index.html and that works too.

So, the problem occurs only when data is on server. I am trying to dig into that.
  
    

Yes, there is not much use in testing against an offline access (<a class="moz-txt-link-freetext" href="file://">file:// 
protocol). You have to test and compare online access.

T.
I tried the same with online access but no success. I got the same error. I have to set some path in a file (mostly apiviewer-0.js and via config.json) but not able to get that. :-(

amit

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

thron7


Amit Rana wrote:

> Hi,
>
> Since I was getting error as "Couldn't load file: ..", so searching in
> apiviewer-0.js revealed a code snippet :
>
> var M=new qx.io.remote.Request(L);
> M.addListener(D,function(N){this.error("Couldn't load file: "+L);},this);
>
> So, I tried a simple code  :
>
>        var L =
> "http://localhost:8080/Chiron/js/spagobi/api/script/qx.Class.js";
>        var M=new qx.io.remote.Request(L);
>         M.addListener("failed",function(N){this.error("Couldn't load
> file: "+L);},this);
>         M.addListener("completed",function(N){this.error("Loaded file:
> "+L);},this);
>         M.send();
>
> This gives console output as Couldn't load file ....
>
> And, var L =
> "http://localhost:8080/Chiron/js/spagobi/api/script/qx.class.js";
> gives output as Loaded file ...
>
> I know that this had to work because files on server are with
> lowercase names. But, if its not a case-sensitive issue, then why is
> the server giving me Error 404.
> Now, how to solve this for the server (online access) and why the
> local file (offline access) work's are the real mysteries for me. :-)

No, it only shows that you cannot compare online with offline access, as
I suggested. Go back to online access and try the direct loading of the
apiviewer app ... and then tell me again, like you did before, it is
working while the access through a link is not! (I wouldn't belive it...).

And, I'm still wondering why this "/Chiron/..." path suddenly comes into
play...

T.

>
> thron7 wrote:
>> Amit Rana wrote:
>>  
>>> My Application start page is :
>>> http://localhost:8080/MyApplicationName/   (which shows the server's
>>> index.html)
>>>
>>> This index.html has the link to API as :
>>> <span class="local"><a
>>> href="myJSfolder/custom/api/index.html"><b>Open API
>>> viewer</b></a></span>
>>>
>>> Clicking on this shows the URL on browser as :
>>> http://localhost:8080/MyApplicationName/myJSfolder/custom/api/index.html 
>>>
>>> This index.html has code as :
>>> <script type="text/javascript" src="script/apiviewer.js"></script>
>>>
>>> Firebug console says :
>>> GET http://localhost:8080/Chiron/js/spagobi/api/script/qx.Class.js
>>>      
>>
>> THIS ^^^^ is very suspicious! Why is there a request to a URL with
>> server path starting with "/Chiron/js/...", when we are in a path
>> that starts with "/MyApplicationName/..."?!
>>
>> - Clear your browser cache.
>> - Clear any server cache you might have.
>>
>>  
> Sorry Thomas, the firebug console error is not
> GET http://localhost:8080/Chiron/js/spagobi/api/script/qx.Class.js 
> (was trying with a dummy application earlier)
> but
> GET
> http://localhost:8080/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js 
>
> with response as :
> The requested resource
> (/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js) is not
> available.
>>  
>>> with response as :  The requested resource
>>> (/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js) is not
>>> available.
>>>
>>> And, when I go to :
>>> http://localhost:8080/MyApplicationName/myJSfolder/custom/api/script/ 
>>> in browser URL, I see a list of files with qx.class.js as one of them.
>>>
>>>
>>> I went into : qooxdoo-0.8-sdk\component\apiviewer and did a
>>> generate.py source.      
>>
>> Why would that help? Aren't you trying to browse a custom api viewer,
>> built in your own project with "generate.py api"?!
>>
>>  
> I just wanted to test if the files generated are with lower/upper case
> (because qooxdoo-0.8-sdk\framework\api\script has the files with
> uppercase which got ma confused)
>>> It also generated a script folder with classes in lowercase
>>> (qx.class.js) and calling index.html works.
>>>      
>>
>> You're using Windows, so capitalisation doesn't matter.
>>
>>  
> I agree as the offline access works fine. I need to solve how.
>>> I created a dummy index.html and called
>>> qooxdoo-0.8-sdk\component\apiviewer\index.html and that too works.
>>> Then, from dummy index.html, I called
>>> MyApplicationName/myJSfolder/custom/api/index.html and that works too.
>>>
>>> So, the problem occurs only when data is on server. I am trying to
>>> dig into that.
>>>      
>>
>> Yes, there is not much use in testing against an offline access
>> (file:// protocol). You have to test and compare online access.
>>
>> T.
> I tried the same with online access but no success. I got the same
> error. I have to set some path in a file (mostly apiviewer-0.js and
> via config.json) but not able to get that. :-(
>
> amit
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>  

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

thron7
In reply to this post by Amit Rana

> Sorry Thomas, the firebug console error is not
> GET http://localhost:8080/Chiron/js/spagobi/api/script/qx.Class.js 
> (was trying with a dummy application earlier)
> but
> GET
> http://localhost:8080/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js 
>
> with response as :
> The requested resource
> (/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js) is not
> available.

Ah, sorry, I didn't spot your other comments on first sight... So it's
really all about capitalization of resource names in the online access.

> I tried the same with online access but no success.

Ok, that gives me some relief that the behaviour is consisten for any
kind of online access - that is good.

> I got the same error. I have to set some path in a file (mostly
> apiviewer-0.js and via config.json) but not able to get that. :-(

I don't think that messing with the generated qooxdoo application will
get you far. You can of course, just for testing, edit the
script/apidata.js and convert all 'fullName' entries to all-lower case,
in the hope that the generated URLs will then work. But this is just a
vague guess, and a dead end at this. qooxdoo class and file names are
aligned and usually work nicely together.

The real problem seems to be your web server. Which server are you
using? Why does it force all lower-case names when looking for resources
on the file system? Is this configurable?

T.

T.


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

Amit Rana
Hi Thomas,

I know I have been bombarding you with queries. But, thanks a lot for replying back. Its just that I have been working on this API issue since days without much success. :'(

Please find my comments below.

thron7 wrote:
Sorry Thomas, the firebug console error is not
GET http://localhost:8080/Chiron/js/spagobi/api/script/qx.Class.js 
(was trying with a dummy application earlier)
but
GET 
http://localhost:8080/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js 

with response as :
The requested resource 
(/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js) is not 
available.
    

Ah, sorry, I didn't spot your other comments on first sight... So it's 
really all about capitalization of resource names in the online access.

  
Yes, it looks capitalization issue to me.

  
I tried the same with online access but no success.
    

Ok, that gives me some relief that the behaviour is consisten for any 
kind of online access - that is good.

  
I got the same error. I have to set some path in a file (mostly 
apiviewer-0.js and via config.json) but not able to get that. :-(
    

I don't think that messing with the generated qooxdoo application will 
get you far. You can of course, just for testing, edit the 
script/apidata.js and convert all 'fullName' entries to all-lower case, 
in the hope that the generated URLs will then work. But this is just a 
vague guess, and a dead end at this. qooxdoo class and file names are 
aligned and usually work nicely together.

  
This is working. I changed "qx.Class" in apidata.js to "qx.class" and its working (when i click on Class node, I see the information). So, maybe I need to see how apidata is being generated.
The real problem seems to be your web server. Which server are you 
using? Why does it force all lower-case names when looking for resources 
on the file system? Is this configurable?

T.
  
I am using Tomcat server v5.0 in Eclipse v3.3.1.1. I will try to explore the searching of files problem in my server settings.

amit

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

Amit Rana
The main thing is that why does calling "generate.py api" generate files in lowercase.

Tracing the "generate.py api", I found that eventually the "build-data" job of qooxdoo-0.8-sdk\component\apiviewer\api.json file is called which in turn runs the "api"  job on python generator. This generates all the data files (class files) in the custom/api/script folder (like qx.class.js etc).
Now, since I don't know much about python, so I cannot explore how this job runs internally by python and why does it generate files in lowercase instead of uppercase.

Now, I have 2 options:
1. Know the internal working and try to generate files in uppercase.
2. Understand how offline access is able to resolve case name and implement similar thing for server.

amit

P.S. : Pretty strange that only I faced this issue =-O



Amit Rana wrote:
Hi Thomas,

I know I have been bombarding you with queries. But, thanks a lot for replying back. Its just that I have been working on this API issue since days without much success. :'(

Please find my comments below.

thron7 wrote:
Sorry Thomas, the firebug console error is not
GET http://localhost:8080/Chiron/js/spagobi/api/script/qx.Class.js 
(was trying with a dummy application earlier)
but
GET 
http://localhost:8080/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js 

with response as :
The requested resource 
(/MyApplicationName/myJSfolder/custom/api/script/qx.Class.js) is not 
available.
    

Ah, sorry, I didn't spot your other comments on first sight... So it's 
really all about capitalization of resource names in the online access.

  
Yes, it looks capitalization issue to me.
I tried the same with online access but no success.
    

Ok, that gives me some relief that the behaviour is consisten for any 
kind of online access - that is good.

  
I got the same error. I have to set some path in a file (mostly 
apiviewer-0.js and via config.json) but not able to get that. :-(
    

I don't think that messing with the generated qooxdoo application will 
get you far. You can of course, just for testing, edit the 
script/apidata.js and convert all 'fullName' entries to all-lower case, 
in the hope that the generated URLs will then work. But this is just a 
vague guess, and a dead end at this. qooxdoo class and file names are 
aligned and usually work nicely together.

  
This is working. I changed "qx.Class" in apidata.js to "qx.class" and its working (when i click on Class node, I see the information). So, maybe I need to see how apidata is being generated.
The real problem seems to be your web server. Which server are you 
using? Why does it force all lower-case names when looking for resources 
on the file system? Is this configurable?

T.
  
I am using Tomcat server v5.0 in Eclipse v3.3.1.1. I will try to explore the searching of files problem in my server settings.

amit
  


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

thron7
In reply to this post by Amit Rana

> This is working. I changed "qx.Class" in apidata.js to "qx.class" and
> its working (when i click on Class node, I see the information). So,
> maybe I need to see how apidata is being generated.

Rather, you could post-process apidata.js to make the changes. You might
also want to look at apiindex.js, to see if your searches still work.

> I am using Tomcat server v5.0 in Eclipse v3.3.1.1. I will try to
> explore the searching of files problem in my server settings.
>

You might want to check this page
(http://tomcat.apache.org/tomcat-5.5-doc/config/context.html), look for
"caseSensitive".

Cheers,
Thomas


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: API generation

thron7
In reply to this post by Amit Rana


Amit Rana wrote:

> The main thing is that why does calling "generate.py api" generate
> files in lowercase.
>
> Tracing the "generate.py api", I found that eventually the
> "build-data" job of qooxdoo-0.8-sdk\component\apiviewer\api.json file
> is called which in turn runs the "api"  job on python generator. This
> generates all the data files (class files) in the custom/api/script
> folder (like qx.class.js etc).
> Now, since I don't know much about python, so I cannot explore how
> this job runs internally by python and why does it generate files in
> lowercase instead of uppercase.
>
> Now, I have 2 options:
> 1. Know the internal working and try to generate files in uppercase.
> 2. Understand how offline access is able to resolve case name and
> implement similar thing for server.

I think I found it! It has nothing to do with *reading* the files from
disk (as I thought). It is the generator when *writing* the files to
disk. You can easily test  the following patch: Locate the file
tool\pylib\misc\filetool.py. Then change the lines:


    def normalize(filename):
        return os.path.normcase(os.path.normpath(filename))


to

    def normalize(filename):
        return os.path.normpath(filename)

This should do the trick :). Let me know if it works.



>
> amit
>
> P.S. : Pretty strange that only I faced this issue =-O

I believe it was a combination of factors. For one, our old tool chain
on Windows was based on Cygwin, which produced mixed case file names
alright. But when we switched to Python-only tools (with 0.8), it was
possible to run the generator with native Python implementations. Now
running *that* turned on a platform-dependend feature in Python that
would convert the file names to all-lower case.
Now this alone wouldn't have sufficed. It took the additional piece of
an application (a web server in your case) that was particular about
character case, so Tomcat would distinguish "qx.class.js" from
"qx.Class.js" (while most other Windows apps, including browsers, would
not).

So it was your combination of tools that brought up the issue - good one :).

T.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
12