IonicWind Software

IWBasic => General Questions => Topic started by: Topdecker on January 10, 2014, 07:12:37 PM

Title: Includes and commonly used values
Post by: Topdecker on January 10, 2014, 07:12:37 PM
I started learning IWBasic by playing a little bit with files and folders.  The file directory system is a good way to learn at little bit because it is boring and predictable (and I understand how it works).  Anyhow, I encountered this follow example of how to use the attributes of a returned file name:

        IF attrib & @FILE_DIRECTORY THEN PRINT filename

It produces a compiler error and will not execute - I am presuming that a lot of the commonly used variables are stored in an include file which isn't included in the examples using predefined values.  If someone could clue me in about the command and file to use, it would be greatly appreciated.

Top
Title: Re: Includes and commonly used values
Post by: LarryMc on January 10, 2014, 07:19:21 PM
what's the compiler error?
It always helps to post your code so we can run it and see what you are doing.

And the line as written shouldn't need and additional include files.
Title: Re: Includes and commonly used values
Post by: Topdecker on January 10, 2014, 07:31:31 PM
I had the previous build of the executable still running behind the IDE. 

Yeah, it was a noobie error :)  But I'll be better armed when I actually run into a real problem :)


Top
Title: Re: Includes and commonly used values
Post by: Topdecker on January 10, 2014, 07:35:11 PM
Still, it does lead to a question.

Is there a list for constants like @FILE_DIRECTORY?

Thanks,

Top
Title: Re: Includes and commonly used values
Post by: LarryMc on January 10, 2014, 08:10:00 PM
Specifically  for @FILE_DIRECTORY
If you use the search feature of the help file for FILE_DIRECTORY it will take you to the command appendix page for the FINDNEXT command.

More generally they appear in the one or more of the commands they are associated with.
A lot are shown in Appendix B.

Ultimately, all constants that use the @ have been defined with the SETID command somewhere.
Those defined by IWBasic and that are always available when compiling are located in *.incc files located in he IWBDev/bin folder.
Suggest you use the Find in Files utility and search in the bin folder for SETID.

There are also the SETID commands that are in the IWBDev/include folder in *.inc files which must be included one way or the other by the user in order to use them.  I make my life simple by ALWAYS including "windowssdk.inc" at the beginning of all my program source files.


Other constants, that do not use the @, are defined with CONST in the same incc  and inc files
Title: Re: Includes and commonly used values
Post by: Topdecker on January 10, 2014, 09:48:49 PM
iwbstd.incc held the constants that I was initially interested in.

For whatever reason, the find in files tool doesn't seem to be working with the INCC files.  I've tried a number of key words which do appear in one or more files and have had no luck.  I am probably missing something.

(http://kilgore.co/tim/programming/find_01.jpg)

There are at least 3 cases where the word "DIRECTORY" appears in one of the files in the BIN folder.  In all cases, DIRECTORY is part of a larger string.

Top
Title: Re: Includes and commonly used values
Post by: LarryMc on January 10, 2014, 10:03:41 PM
This is what I get
QuoteSearching for 'DIRECTORY'...
C:\Program Files (x86)\IWBDev2.5\bin\IWBDev.ini(137):  term=directory
C:\Program Files (x86)\IWBDev2.5\bin\iwbstd.incc(509):  SETID "CSIDL_DESKTOPDIRECTORY",          0x0010:'    <user name>\Desktop
C:\Program Files (x86)\IWBDev2.5\bin\iwbstd.incc(518):  SETID "CSIDL_COMMON_DESKTOPDIRECTORY",   0x0019:'    All Users\Desktop
C:\Program Files (x86)\IWBDev2.5\bin\iwbstd.incc(529):  SETID "CSIDL_WINDOWS",                   0x0024:'    GetWindowsDirectory()
C:\Program Files (x86)\IWBDev2.5\bin\iwbstd.incc(530):  SETID "CSIDL_SYSTEM",                    0x0025:'    GetSystemDirectory()
C:\Program Files (x86)\IWBDev2.5\bin\iwbstd.incc(534):  SETID "CSIDL_SYSTEMX86",                 0x0029:'    x86 system directory on RISC
C:\Program Files (x86)\IWBDev2.5\bin\iwbstd.incc(1077):  SETID "FILE_DIRECTORY",0x10
7 matches have been found.

can you post  the contents of the bin folder?
Also in the Dir window is there anything after bin\  ?
Title: Re: Includes and commonly used values
Post by: Topdecker on January 10, 2014, 10:20:34 PM
Contents of the BIN folder:

01/20/2005  02:47 PM           404,992 ar.exe
01/25/2011  02:19 PM            27,841 controlpak.incc
07/11/2003  01:14 PM           813,568 dbghelp.dll
04/20/2011  01:01 PM            14,848 ddehelper.exe
11/09/2006  05:58 PM            67,872 disassem.dll
08/29/2011  04:34 PM           151,552 elink.exe
09/13/2009  06:36 PM            55,296 gorc.exe
12/31/2011  05:23 PM            37,986 intelli.dat
02/11/2011  05:00 AM             7,688 iwb2d.incc
01/23/2013  06:46 PM            71,574 iwb3starter.exe
02/11/2011  05:00 AM             2,855 iwbdb.incc
10/04/2013  04:31 PM         2,098,028 IWBDev.exe
07/28/2013  10:27 PM           127,142 iwboptsedit.exe
09/16/2011  10:33 AM           663,617 iwbparse.exe
05/22/2013  03:41 PM            47,578 iwbstd.incc
02/11/2011  05:00 AM            28,588 iwbx3d.incc
10/27/2005  01:17 AM            38,400 libtool.exe
01/09/2011  06:54 PM           155,344 menuedit.dll
03/05/2011  10:26 AM           339,968 nasmw.exe
10/28/2009  02:18 PM           483,328 SciLexer.dll
11/19/2003  03:37 AM            80,896 tbpaint.exe


The DIR field is populated with: D:\Program Files (x86)\IWBDev2.5\bin\

I am setup with a SSD for my C: drive which is primarily just the OS, but virtually everything is installed on my D: drive.
Title: Re: Includes and commonly used values
Post by: LarryMc on January 10, 2014, 10:24:00 PM
folder contents look correct.
The only way I get the same "no files found" result that you get is to add a space after bin/
Title: Re: Includes and commonly used values
Post by: Topdecker on January 10, 2014, 10:45:53 PM
I've deleted the trailing slash and it gets reinserted when I search - so the potential for a trailing space is nil.  I am not really too worried about it - JEdit has a folder search that I've used for a long time, so it isn't as though I am without a tool.  I just thought it was worth mentioning as someone might want to look at it.

Oh, yeah.  I also noted that I could click on the ... to set the folder over and over and get a lot of dialogues opened up.  If it were mine, I'd want subsequent clicks to bring the dialogue to the foreground and set focus on it.

I guess that I will reboot to see if that helps - my PC has been up since New Year day when I upgraded AV. 

Top
Title: Re: Includes and commonly used values
Post by: Topdecker on January 10, 2014, 10:50:55 PM
Reboot = no changes.  Probably should mention that the IDE version is: 2.514b.

Top
Title: Re: Includes and commonly used values
Post by: LarryMc on January 10, 2014, 11:01:32 PM
Quote from: Topdecker on January 10, 2014, 10:45:53 PM
I've deleted the trailing slash and it gets reinserted when I search - so the potential for a trailing space is nil.  I am not really too worried about it - JEdit has a folder search that I've used for a long time, so it isn't as though I am without a tool.  I just thought it was worth mentioning as someone might want to look at it.
I am the "someone" who looks into issues with the new IDE.
Just to help me out try picking a completely different path for something you know is there and let me know what happens.  If that works for you then go back to the bin folder and try selecting directory again and see if that works.


Quote from: Topdecker on January 10, 2014, 10:45:53 PM
Oh, yeah.  I also noted that I could click on the ... to set the folder over and over and get a lot of dialogues opened up.  If it were mine, I'd want subsequent clicks to bring the dialogue to the foreground and set focus on it.
That dialog should be opened in modal mode.  I'll have to look at it and see why it wasn't.

Thanks for the feed back.  Remember, the new IDE is a beta and I want to identify and fix all the glitches I can.
Title: Re: Includes and commonly used values
Post by: LarryMc on January 11, 2014, 12:57:16 AM
Quote from: Topdecker on January 10, 2014, 10:45:53 PM
Oh, yeah.  I also noted that I could click on the ... to set the folder over and over and get a lot of dialogues opened up.  If it were mine, I'd want subsequent clicks to bring the dialogue to the foreground and set focus on it.
Corrected the problem in about a half dozen places.
The fix will be in the next beta release.

The problem with the search not working properly seems be associated with the folder selection via the button and typing (or correcting) a folder name in the edit window.  Appears they were getting out of sync with each other and the entry stored in the ini file.
So the displayed folder isn't necessarily the folder that was being searched Working on improving he code in those areas to keep them all in sync and provide error messages when it is not a valid folder being searched.  On error the search will abort and the folder will revert back to the last valid folder that was searched..
Title: Re: Includes and commonly used values
Post by: Topdecker on January 11, 2014, 08:17:33 AM
As you asked, I tried changing to "C:\" and turned off the subfolder option.  I have one *.txt file in the root of C: drive and it continued not to find known to exist search text.  I also made sure that the case of the search text was matching as well.

"Remember, the new IDE is a beta and I want to identify and fix all the glitches I can."

Yup, I know all about betas - happy to mention anything that seems like it could use some attention without injecting feature requests :)

Top
Title: Re: Includes and commonly used values
Post by: billhsln on January 11, 2014, 11:52:01 AM
Does this mean that if we compile older programs under 2.5xxx beta, they might give unpredictable results?  I have lots of code that I could test, if that would help in the testing of the beta.

Bill
Title: Re: Includes and commonly used values
Post by: LarryMc on January 11, 2014, 05:17:22 PM
Quote from: Topdecker on January 11, 2014, 08:17:33 AM
Quote"Remember, the new IDE is a beta and I want to identify and fix all the glitches I can."
Yup, I know all about betas - happy to mention anything that seems like it could use some attention without injecting feature requests :)
It is perfectly acceptable to make feature request.

Title: Re: Includes and commonly used values
Post by: LarryMc on January 11, 2014, 05:40:24 PM
Quote from: billhsln on January 11, 2014, 11:52:01 AM
Does this mean that if we compile older programs under 2.5xxx beta, they might give unpredictable results?  I have lots of code that I could test, if that would help in the testing of the beta.
The compiler in the beta is the same compiler in the latest release. So the actual compiling shouldn't be an issue.
It's all the features of the IDE beta itself that you would be testing.

It's just like with the find-in-file problem Topdecker is having.  I probably use the FIF feature 20-30 times everyday and don't ever have any problems.  So, his problem tells me there is something different about the way I always use it and the way he uses it.
And it is always hard to get people, including me, to describe in microscopic detail how they are using something.
So, it boils down to I accept he is having a problem and it is my job to figure out what the difference is and how to fix it.