471,893 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,893 software developers and data experts.

Debugging simple script under Aptana

Hi,

First, is this an appropriate NG for talking about debugging
JavaScript in Aptana?

Assuming it is, I'm trying to get a script to read an external text
file and display the text somehow. The script just dies in the file-
read operation, with no symptom. I tried unsuccessfully to get the
Debugger to run the HTML file.

I put up the following on my personal website:

1. The HTML file: http://home.comcast.net/~CaptQueeg/DemoFileIO.html
2. Some Aptana settings: http://home.comcast.net/~CaptQueeg/A...ugSettings.jpg

Did any obvious mistakes jump out at you? Do my Aptana settings
suggest a reason why I can get anything happening under the debugger?

Thanks in Advance,
Richard

Key software: WinXP-Pro/SP2, FireFox 2.0.0.6, Firebug IE 7.0, Apatana
0.2.9.16696, Java JVM 1.5.0_11-b03

Other S/S: Ruby 1.8.2-15, Rails 1.1.6, Gem 0.9, MySQL 5.0.27-nt,
SciTE 1.72, SeaMonkey 1.1.4, OE 6.0, IE7,Apache Tomcat/5.5.12,
MS Office 2003 SP2, MSDevEnv 2002 v. 7.0.9466. .NET Frwk 1.0,
AVG-Free 7.5.476, Prevx1 2.0.2.23, Startup Cop Pro 2.03

Sep 15 '07 #1
4 3090
RichardOnRails said the following on 9/14/2007 8:36 PM:
Hi,

First, is this an appropriate NG for talking about debugging
JavaScript in Aptana?
Probably not and if my curiosity hadn't got the best of me wanting to
know what Aptana was I wouldn't even have replied.
Assuming it is, I'm trying to get a script to read an external text
file and display the text somehow. The script just dies in the file-
read operation, with no symptom. I tried unsuccessfully to get the
Debugger to run the HTML file.
The problem is your call to the undefined fopen function. fopen is,
typically, a PHP function that opens a file. If you want to read/write
to the local file system then you might try the group FAQ which has an
entry dedicated to this very question:

<URL: http://jibbering.com/faq/index.html#FAQ4_3>
I put up the following on my personal website:

1. The HTML file: http://home.comcast.net/~CaptQueeg/DemoFileIO.html
2. Some Aptana settings: http://home.comcast.net/~CaptQueeg/A...ugSettings.jpg

Did any obvious mistakes jump out at you?
The error message was very intuitive as it pointed straight at the fopen
call.
Do my Aptana settings suggest a reason why I can get anything happening under the debugger?
No idea unless Aptana has a callable fopen function.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 15 '07 #2
On Sep 14, 10:04 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
First, is this an appropriate NG for talking about debugging
JavaScript in Aptana?

Probably not and if my curiosity hadn't got the best of me
I've heard it killed a cat. This time it snared a knowledgeable
answer. I glad for that.
The problem is your call to the undefined fopen function. fopen is,
typically, a PHP function that opens a file.
I'm new to JavaScript and Aptana. I found an example on the Web
offering this code, but I didn't see any mention of PHP. But thanks
for alerting me to the problem.
<URL:http://jibbering.com/faq/index.html#FAQ4_3>
Nice site; thanks.

I've just found some AJAX routines that may serve my purpose despite
FAQ 43; I'll see.
The error message was very intuitive as it pointed straight at the fopen
call.
You're so right. I never noticed that red warning in the Status Bar.
I know from the alerts the the "fopen" line was problematic, but I
didn't know exactly what the problem was. Thanks for pointing that
out, Randy.

Best wishes,
Richard
Sep 15 '07 #3
RichardOnRails said the following on 9/14/2007 10:35 PM:
On Sep 14, 10:04 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
><URL:http://jibbering.com/faq/index.html#FAQ4_3>
Nice site; thanks.

I've just found some AJAX routines that may serve my purpose despite
FAQ 43; I'll see.
If you are trying to open a local file on the client machine then AJAX
isn't the solution. It will "work" when testing locally but it won't
work when testing from a server. Or, are you trying to open a file on
the server?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 15 '07 #4
On Sep 15, 12:07 am, Randy Webb <HikksNotAtH...@aol.comwrote:

Hi Randy,

Thanks for your follow-up.
If you are trying to open a local file on the client machine then AJAX
isn't the solution. It will "work" when testing locally but it won't
work when testing from a server. Or, are you trying to open a file on
the server?
Initially, I'm working on my client machine, where the text file is
in the same directory as the HTML file, or a sub-directory.

When I put it up on a web server, the same relationship will obtain.

I haven't worked on that today, because I got distracted by another
question: how to have multiple <script type="text/javascript"
src= ...entries. I just solved that, so my day ends nicely.

Regards,
Richard

Sep 16 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dale | last post: by
23 posts views Thread by keyser_Soze | last post: by
1 post views Thread by Jim Land | last post: by
3 posts views Thread by levilista | last post: by
1 post views Thread by JCD | last post: by
6 posts views Thread by Morgan Packard | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.