4 Replies Last post: Feb 8, 2008 11:45 AM by rshiplett

Curl projects, start files and start.curl

Feb 4, 2008 12:30 PM

Click to view rshiplett's profile MVP rshiplett 36 posts since
Oct 17, 2007

A typical project manifest allows the likes of

{component resource start.curl,
|| location = "Profiler-start.curl"
location = "QTP-start.curl"
}

which is very useful, but in a complex project, clicking on RUN in the IDE always tries to run a "start.curl"

But if the manifest for the project is saved with an alternate, it would be helpful if the project would update the last line of the CPRJ file with

{file-setting "HeatMap-start.curl", start-file? = true}

instead of the static

{file-setting "start.curl", start-file? = true}

The former works, although the meaning of the boolean keyword start-file? becomes unclear . . .

Click to view phil's profile Curl phil 34 posts since
Oct 17, 2007
1. Re: Curl projects, start files and start.curl Feb 4, 2008 1:42 PM
A few points here:

  • in the {component} example you provide, the resource name is "start.curl". This resource name happens to look like a filename, but it doesn't have any semantic association with a file on disk. The association with the file system is only through the component's location attribute.
  • the start file setting in the project file is URL based, not resource name based.

So you can change your component resource declaration, but it won't have any effect on your project's start file setting. The only way to change this is by adding, removing or changing the {file-setting} attribute in the project, or by using the IDE UI to do this.

I'm not sure what problem you're trying to solve here.. are you looking for a way to change a project's start file without using the UI?
Click to view rshiplett's profile MVP rshiplett 36 posts since
Oct 17, 2007
2. Re: Curl projects, start files and start.curl Feb 5, 2008 9:01 AM
in response to: phil
The IDE is failing to set this value in CPRJ file setting to match the manifest component setting ( or the former should be ignored when the latter is set )

I have SVN directories that include more than one CPRJ file, more than one logical 'start' file and more than one manifest all with 'specific' names and not 'default' names. It is very handy.

Starting any project and clicking on the enabled GREEN Project-RUN button causes an error (missing "start.curl" physical file) until the CPRJ is manually edited.

Selecting the logical 'start' file in the Project list and right-click to run works fine. ( no bug )

Double clicking the logical 'start' file opens the correct physical file and then clicking the 'Run this script' button runs that file fine. (no bug )

After manually editing the CPRJ to reflect what it says in the Manifest, the 'Run-Project' button then behaves with no error. (work-around to preserve my preferred startup)

My problem is that bug ;-)

If I change the logical name in the {component} I lose the generality of having a 'start.curl' with each project which varies by physical file as tasks such as testing and change-requests progress. But at any time it is great to have a known default 'start' setting for the project.

Let me come at this in another way: what in the IDE can be used to flip that boolean in the CPRJ ?

Another way of saying this: my edit to the CPRJ ensures that I always have a default start value and can run any project regardless of where it at in the course of change-requests, refactoring etc. as reflected in the current {component} setting when last saved by the developer ( so I get no spurious "edit" in Eclipse/SVN just for having RUN the project default start )

Is there such a {default-start} of which I am unaware? Should I have two components, both with entries in the CPRJ but one flagged as false ? (rather as we have a default {target} in the CPRJ ? )

Time permitting I can experiment later today ...

Click to view phil's profile Curl phil 34 posts since
Oct 17, 2007
3. Re: Curl projects, start files and start.curl Feb 8, 2008 10:33 AM
in response to: rshiplett
OK, I think I now understand your issue.

You can change the start file for a project by using the project properties dialog (select Project/Properties). The start file setting is in the General tab. You can pick any launchable file as your start file (e.g. you can pick .curl, .dcurl, .html, etc).

There just isn't support for changing your manifest to change the start file; all you can do is either rename your file (or, I suppose, use a symbolic link if your filesystem supports it) or use the GUI to change the start file.

I've considered having the project's target also control the project's curren tstart file but there haven't been requests for a feature like this yet. Maybe this is the first such request?
Click to view rshiplett's profile MVP rshiplett 36 posts since
Oct 17, 2007
4. Re: Curl projects, start files and start.curl Feb 8, 2008 11:45 AM
in response to: phil

Yup. Not all requests are XmlHttpRequests ... ;-)

And not all are reasonable LOL