June 25, 2024, 05:27:53 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Compile and Run greyed out

Started by ids065, July 14, 2015, 07:23:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ids065

Hi I've used Creative Basic but am new to IWBasic 3.0.
In some Projects I get 'Build Single' and also 'Compile and Run' and 'Run' Options but in others although 'Build Single' works fine and the .exe runs fine 'Compile and Run' and 'Run' Options remain greyed out, why is this or what am I doing wrong ?

Thanks for any tips.

Ian


LarryMc

My initial reaction is you are not doing anything wrong.
You said  "In some Projects.." but by the rest of your question I know you are talking about "Single File Applications" and not "Projects".

Can you tell me if when you see this are the corresponding Maint ToolBar buttons remaining grayed out also?
Any other info about what  you may have been doing(sequence of events in compiling; switching between between files,etc) is always helpful.

I have already spotted one flaw this morning were the Run option in the Build menu is enabled when it tries to load a file on startup(an IDE option) but can't find it.  I'll have to look into that.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

ids065

Hi Larry,

yes, I meant a 'Single File Application', as soon as I clicked 'Post' I knew it was a mistake to say Projects.

Yes the symbols on the Maint ToolBar are also greyed out but I think I have found the Situation in which this Problem occurs.

I normally have in the 'iwbdev3" Folder a Folder called 'myprogs' and provided the iwb file is in this Folder everything is fine.

But if I create a 'work folder' in 'myprogs' and work there, then the Problem occurs  'Single Build' works fine whether I create the .exe in the 'Work folder' or in the main 'myprogs' Folder but as Long as the iwb is in the 'Work Folder' then the 'compile and Run' and 'Run Options remain greyed out. So I have the Feeling it has to do with Folder inside Folders.

To test this I created a Folder 'Work' directly under 'IWBDev3' and then any iwb in the work Folder is fine just as it is in the 'myprogs' Folder.

Hope this Explanation helps.

Ian





LarryMc

does your "work folder" literally have the embedded space between "work" and "folder"?
if so, that may be where my problem lies.

At any rate, thanks for the feedback and additional info.
Now let's see if I can sniff out the problem and fix it.

FOOTNOTE: Oldtimers may remember me telling this before.
Way way back we had a token female project engineer who was an ex-schoolteacher.
She had never finished a successful project at our polyethylene plant.
At one of the numerous meetings we had on a rather major project she was catching a lot a grief from everyone on all the problems that were being encountered and that she need to fix before her equipment could be started up.
In utter frustration(an almost in tears) she finally blurted out: "How do ya'll ever expect me to finish my project if ya'll keep finding all these problems!?"  And she had no comprehension of what she had just said.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

ids065

Hi Larry,

no the Folder Name is just one word and now I know that I need to create a Folder for each application I'm working on, rather than puting them all in the myprogs Folder it's not too much of a Problem.

Thanks for the quick Response,

Ian

Egil

July 14, 2015, 12:56:10 PM #5 Last Edit: July 14, 2015, 12:58:03 PM by Egil
This is not an error!

It occurs every time a new Single File Application is ready to be compiled the very first time, because the path and filename for the executable must be defined before compilation.
So next time use the "Build" menu, or press "F8". Then you are given the opportunity to fill in above details, and choose an icon for the executable.
And if you then need a recompile, the "Compile and Run" is "active". So is the "Run" button.

So there is no need to do anything with this behaviour, it is just a matter of coding habbit for the user. :D

Support Amateur Radio  -  Have a ham  for dinner!

ids065

Hi Egil,
thanks but I think you have misunderstood my post. I know that these options are greyed out until I have done a successful build but in certain situations they are greyed out for ever. I'll try to explain again. I like to create a directory/folder for each of my programs. If I create these folders in the IWDEV3 folder directly then everything is fine just as we both expect but if I create a folder (for example) 'Myprogs' in the IWDev3 folder and then open 'Myprogs' and create a folder 'Prog1' for the first program. Then if I create an iwb file in the 'Prog1' folder I can select 'Build' and of course select the path for the exe file. It doesn't matter whether I choose to build the EXE file in the 'Prog1' folder or go up one level and create it in the 'Myprogs' folder or in the IWBDev3 folder in each case the EXE file is correctly created and works but the 'Compile and Run' and Run options remain greyed out in each case.

As I said it's not a big problem I simply create the 'Progx' folders directly in the IWBDev3 folder never-the-less it does seem to be a small bug to do with the number of directories in the path.

Ian

LarryMc

I haven't had time to dig into it yet but I think the way I designed it was that the source file and the exe file need to be in the same folder.  Are you trying to put the iwb file and the exe file in different folders?
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Egil

Sorry Ian,
when I read your posts today, it is obvious that I misunderstood you.
Never had that kind of problems myself.
I usually have my source files on a USB-stick. Each program in their own directory.
Support Amateur Radio  -  Have a ham  for dinner!

ids065

No problem Egil and Larry even if I create the exe in the same folder as the iwb file as in the example above with the folder 'Prog1' (which is in the folder 'Myprogs') the problem still exists. It really looks like if you have those two levels of folders then something doesn't function quite correctly. As I say it's not a serious problem and I'm now creating the program folders directly in the IWDev3 folder and everything is well or I could do as Egil does and put all of the program folders somewhere else intirely.

Ian

LarryMc

If I can duplicate it I will fix it (it's on my list)

The discussion has clarified my understanding of the bug I'm chasing and that is a good thing.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

Ian

I have duplicated the problem and it has nothing to do with nested folders.
It is simply a matter  of the exe file existing in a different folder than the .opts file which always exist in the same folder as the .iwb files.  The .opts file contains information about the Single File application used during the compile process and also in the interface to the IDE.

When you load or create an iwb file in the IDE the IDE looks for the associated .opts file,  If it is not there then all the menu options are turned off.    If it is there then it checks to see if the exe file exists IN THE SAME FOLDER AS THE IWB FILE.

That bug, in and of itself, would be a relatively easy fix.

But, that forces me to confess that my design of the dialog when initially compiling a new Single File application is a rather poor one.  I have merged what was intended to be the selection of the destination folder for the source file with the naming of exe file.

Never did I imagine that someone would do what Ian has done; put the exe in a different folder.  Just indicates my narrow mindedness.  And I do try to avoid that in my programs believe it or not.

My solution to this will require a modification of the associated dialog.
There will will three separate entries in the dialog.
One will be the folder selection for the application.
One will be the name for the iwb file
One will be for the exe file which will default to the same as the iwb file.

This way all files associated with a given application will be in one folder which will be consistent with what is done with IWBasic projects and is also done with IWB+ projects.

It will take me a few days to get the revisions made and tested.

Again, thanks to Ian for reporting and for the ensuing discussions.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

ids065

Hi Larry,

yes, I've done a new test and you are right the Location of .opts is the Problem rather than nested Folders.

Thanks again for the support,
Ian

LarryMc

Actually, the solution for the dialog is going to very simple after looking at the code.
All I have to do is remove the button that let's the user select a folder  and get rid of the path information.
Then the title will truly match the edit box.
and it will match the scheme where exe and iwb will be in same folder.

I will have to do a bit of code magic to make it work underneath.

I already have the program fix in place where the Run men option was enabled when the IDE was first opened with applications loaded.

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library