Binary File problem

Ianmac

Member
Licensed User
Longtime User
I am trying to set up a binary file system, which shouldn't be too difficult as you provide a perfectly good example, however, when I copy and paste this into Basic4ppc on trying to run it I get an error message 'bin is not a known control or object' and when I compile I get this error and another 'Object reference is not set to an instance of an object'.
A correctly named binary file appears in the right column under 'Objects'.
I thought the problem might lie in the set up I have where the working folder is on my desktop and the .dll file appears here and not with the Basic4ppc executable, but copying it to the programs folder made no difference.
All help gratefully received.
 

agraham

Expert
Licensed User
Longtime User
I get an error message 'bin is not a known control or object'
I have tried to reproduce your error by cutting and pasting erels' example BinaryFile code into a new project, adding a BinaryFile component and adding a BinaryFile object called "bin".

If BinaryFile.dll is not in the same folder as the source code I get a " Could not load file or assembly 'file:///C:\Temp\BinaryFile.dll ..." error. This happens whether or not any BinaryFile objects have been added. So if you can start B4PPC and load the saved source without error then the dll has been found.

If the dll has been found then the only way to get your error is to not have a BinaryFile object called "bin" added. Are you sure that you don't have an extraneous character in the name of your "bin" object? e.g an object called "bin " (note the extra space) looks right but causes the error you are seeing as " bin" also does.
 

Ianmac

Member
Licensed User
Longtime User
Can't see the wood for the trees

OK, problem solved, I didn't take the first first line comment as literally as it was intended.
I just created a file called 'test' of type bin, not a file called 'bin' - of type bin.
Sometimes the blindingly obvious just passes me by.

Thanks for the help.:sign0161:
 
Top