stumpy
Member in Training
Posts: 66
|
Post by stumpy on Apr 28, 2023 13:41:26 GMT
Hi again all , (I'm still in training)
Came back to get more help because of problems with continuing to maintain the Pigeon Records Program which is in the shared section: Pigeon Records
I have just started to use Windows 11 and having slightly modified the .bas code, which works ok with Win11, I tried to 'make tkn' with it
which produced this error on screen:
I guess this is really a Windows error because a new one does not appear in JB's error log.
Please advise me once more
|
|
|
Post by plus on Apr 28, 2023 14:24:33 GMT
Although I've never found the error log very helpful, do you know where it is and have you checked to see what it said?
|
|
stumpy
Member in Training
Posts: 66
|
Post by stumpy on Apr 28, 2023 14:31:00 GMT
Thanks but yes, and there is nothing new added to the error log when I have tried to make tkn
I guess this is really a Windows error because a new one does not appear in JB's error log.
|
|
|
Post by Rod on Apr 28, 2023 14:49:22 GMT
Nothing to do with Windows, you can get this error if you have left out a parameter in a command line.
Does your program run as a .bas?
|
|
|
Post by xxgeek on Apr 28, 2023 15:11:59 GMT
That looks like an error message from the compiler. Check for an error log in the same folder your bas file is in. Not that those error logs help much.....but they do sometimes point in the right direction.
What did you modify? Was it an array? Forget to redim? Can you post the code?
|
|
stumpy
Member in Training
Posts: 66
|
Post by stumpy on Apr 28, 2023 19:32:10 GMT
The tkn made on a different laptop, with Win 10 and the 'Old' unaltered .bas file, still works on the later Win 11 laptop
But when trying to 'make tkn' again now (on the laptop with Win 11) out of the (still working) old .bas file this gives another too:-
============================================================================
There follows the two versions of the relevant section of the program,
first showing just the unaltered 'Old' part and the later (altered) 'New' part, and then the whole 'Old' then the 'New' sections
===========================================================================
'OLD unaltered PART OF CODE '--------------------------------
'otherwise.... g$ = "Cancelled" + chr$(13) + "The program cannot provide the correct resolution" + chr$(13) + chr$(13) g$ = g$ + "Please try a different screen setting on PC" + chr$(13) + chr$(13) g$ = g$ + "e.g. 100% or 150%, or contact the Author..." notice g$ wait
'OLD TO HERE ---------------------------------- ==========================================================================
'NEW altered PART OF CODE '-------------------------------- 'otherwise.... g$ = "Cancelled" + chr$(13) + "The program cannot provide the correct resolution" + chr$(13) + chr$(13) g$ = g$ + "Please refer to the notes: 'README Set Up'," + chr$(13) + chr$(13) g$ = g$ + "which is within the original package," + chr$(13) + chr$(13) g$ = g$ + "or contact the Author..." notice g$ wait 'NEW TO HERE '-----------------------
NEW VERSION of the relevant section of code
[getauto]
If DisplayWidth = 1280 and DisplayHeight = 720 then set$(1) = "1920.150" version$ = "1920.150" goto [displayfound] end if
If DisplayWidth = 1920 then set$(1) = "1920.100" version$ = "1920.100" goto [displayfound] end if
If DisplayWidth = 1280 and DisplayHeight = 1024 then set$(1) = "1280" version$ = "1280" goto [displayfound] end if
If DisplayWidth = 1366 then set$(1) = "1366" version$ = "1366" goto [displayfound] end if
If DisplayWidth = 1600 then set$(1) = "1600" version$ = "1600" goto [displayfound] end if
'NEW altered PART '-------------------- 'otherwise.... g$ = "Cancelled" + chr$(13) + "The program cannot provide the correct resolution" + chr$(13) + chr$(13) g$ = g$ + "Please refer to the notes: 'README Set Up'," + chr$(13) + chr$(13) g$ = g$ + "which is within the original package," + chr$(13) + chr$(13) g$ = g$ + "or contact the Author..." notice g$ wait 'NEW TO HERE '-----------------------
[displayfound]
gosub [loadsettings]'also get them into set$ 2 to 6 (of 10)
gosub [loadallteamsfromdisc]
foregroundColor$ = "black" WindowWidth = DisplayWidth
UpperLeftX = 1 UpperLeftY = 1 WindowWidth = DisplayWidth WindowHeight = DisplayHeight
scale = WindowWidth/1920 fontscale = 1.3*scale
if set$(2) = "intro" then selection$ = "intro" goto [intro] end if
if set$(2) = "stock" then selection$ = "stock" goto [stock] end if
if set$(2) = "young" then selection$ = "young" goto [young] end if
wait
'======================================= OLD VERSION of the relevant section of code
[getauto]
If DisplayWidth = 1280 and DisplayHeight = 720 then set$(1) = "1920.150" version$ = "1920.150" goto [displayfound] end if
If DisplayWidth = 1920 then set$(1) = "1920.100" version$ = "1920.100" goto [displayfound] end if
If DisplayWidth = 1280 and DisplayHeight = 1024 then set$(1) = "1280" version$ = "1280" goto [displayfound] end if
If DisplayWidth = 1366 then set$(1) = "1366" version$ = "1366" goto [displayfound] end if
If DisplayWidth = 1600 then set$(1) = "1600" version$ = "1600" goto [displayfound] end if
'OLD unaltered PART '-----------------------
'otherwise.... g$ = "Cancelled" + chr$(13) + "The program cannot provide the correct resolution" + chr$(13) + chr$(13) g$ = g$ + "Please try a different screen setting on PC" + chr$(13) + chr$(13) g$ = g$ + "e.g. 100% or 150%, or contact the Author..." notice g$ wait
'OLD TO HERE ----------------------------------
[displayfound]
gosub [loadsettings]'also get them into set$ 2 to 6 (of 10)
gosub [loadallteamsfromdisc]
foregroundColor$ = "black" WindowWidth = DisplayWidth
UpperLeftX = 1 UpperLeftY = 1 WindowWidth = DisplayWidth WindowHeight = DisplayHeight
scale = WindowWidth/1920 fontscale = 1.3*scale
if set$(2) = "intro" then selection$ = "intro" goto [intro] end if
if set$(2) = "stock" then selection$ = "stock" goto [stock] end if
if set$(2) = "young" then selection$ = "young" goto [young] end if
wait
.=====================================
|
|
stumpy
Member in Training
Posts: 66
|
Post by stumpy on Apr 28, 2023 20:12:03 GMT
re. my earlier commment "But when trying to 'make tkn' again now (on the laptop with Win 11) out of the (still working) old .bas file this gives no error first time,
i.e. when no tkn. existed in the same folder.
However trying to run that new tkn does give the error below
When I try to delete the tkn, to try it again, windows tells me I can't because the file is still open in 'breeders 4.20' (the bas program's title)
I had been confused (more than usually!) and the JB error in this connection, is as follows (with apologies) ------------------------------------------------------------ Error log timestamp Friday 28/04/23 21:07:36 Runtime error: index: 0 is outside of collection bounds Error(Exception)>>defaultAction Error(Exception)>>activateHandler: <anUndefinedObject> Error(Exception)>>handle Error(Exception)>>signal Error class(Exception class)>>signal: <'index: 0 is outside ...'> OrderedCollection(Object)>>error: <'index: 0 is outside ...'> OrderedCollection(IndexedCollection)>>errorInBounds: <0> OrderedCollection>>at: <0> put: <anOrderedCollection> BasicOnDemandCompiler class>>readTknFile: <aFileStream> callingProgram: <anUndefinedObject> commandLine: <''> Basic class>>start Message>>perform NotificationManager>>empty NotificationManager>>runPendingEvents NotificationManager>>runEventLoop Message>>perform Message>>evaluate Process>>safelyEvaluate: <aMessage> Process>>evaluate: <aMessage> -----------------------------------------
*** Post is To be re- re- edited asap ***
|
|
|
Post by Rod on Apr 28, 2023 20:33:02 GMT
What directories are you using? Where is the .bas file stored. It sure why it is trying to read the tkn file when you say you are trying to build a .tkn file.
|
|
stumpy
Member in Training
Posts: 66
|
Post by stumpy on Apr 28, 2023 20:56:31 GMT
What directories are you using? Where is the .bas file stored. It sure why it is trying to read the tkn file when you say you are trying to build a .tkn file. Thanks for hanging in there.
The source file is in a main folder 'breeders v4.20' where the stored data, photos, and everything else is also located,
- the idea being that the folder may be put and used anywhere because commands only look for things there. I think it is called (something?) 'relative' (something?) and anyway it has worked ok for years.
In particular it has, until now, given no problems allowing me to change the source then simply 'make tkn' to update things, which failure has coincided with using a different laptop because my Win 10 one blew up.
1.) It may be a clue that I can make a new tkn from modified code when I have deleted the old one, but if I leave it and in effect try to overwrite it that's when the errors recur in the process... I will just check that is right before confirming here, and report after another restart, as in 2.) below...
2.) The other clue may be that after making a tkn, when it is allowed, I can't delete it without a restart because of
"When I try to delete the tkn, to try it again, windows tells me I can't because the file is still open in 'breeders 4.20' (the bas program's title)"
|
|
stumpy
Member in Training
Posts: 66
|
Post by stumpy on Apr 28, 2023 22:45:32 GMT
btw Rod On the win 10 laptop: 'Just BASIC v1.01' is in directory C:\Just Basic On the Win11 laptop: 'Just BASIC v2.0' is in directory C:\Program Files (x86) ----------------------------------------------------------
Yes, the old bas file still works and if I try to overwrite the tkn it does it, but the redone tkn fails to run with popup and related error log "Runtime error: index: 0 is outside of collection bounds"
Using the new bas file, which runs ok on the Win11 laptop, an error is not shown when the appropriate screen resolution is being employed, or when an inapprropriate resolution is in use, when the edited message is shown, as intended. So far so good.
When the old tkn has been deleted, a new one can be made by the the new bas (to incorporate the edited message produced by the (working) new bas version,
a.) However the new tkn fails when one attempts to run the program with that with "Runtime error: index: 0 is outside of collection bounds" and upon trying to overwrite it by using 'make tkn' again from the new bas, the error is "Runtime error: FileSharing Violation (see error log for more information)" which prevent it being overwritten...but there is no record of this error in the JB 'error log' within the main folder.
b.) After another restart, once more the new bas can overwrite its failed tkn but upon running that, things go back to a.) with 'outside of collection bounds' and 'FileSharing Violation' etc. ----------------------------------------------
On another Old laptop with Win 10 There are no problems a.) and b.) when performing the same operations, i.e. back to normal, so that modifications to bas may be combined with new tkns to do updates
|
|
stumpy
Member in Training
Posts: 66
|
Post by stumpy on Apr 28, 2023 23:49:32 GMT
Its to do with the program's available auto settings for the more common resolutions, in order to match various users' displays,
which are needed because the program uses bitmaps. And this ** is what it is intended to do if a user's display is unusual.
From the readme: DISPLAY REQUIREMENTS
"Before starting the program, please set your display to one of the sizes listed below. (**Otherwise it will just stop and refer to these notes) The program can adjust to running on Windows Laptop/PC/tablets with displays set to:- 1280 x 800 at 100% 1600 x 900 at 100% 1920 x 1080 at 100% 1920 x 1080 at 150%
or proportionately:- e.g. the program's auto setting for 1920 x 1080 at 150% would also display correctly at 3840 x 2160 at 300%
Upon starting first, the program opens the 'Settings' page, having set the layout automatically for whichever screen resolution had been detected.
If the right resolution should not yet have been provided, please notify the author at the email address above."
|
|
|
Post by xxgeek on Apr 29, 2023 1:01:30 GMT
Ok, after a lot of trials and errors I think I have this figured out.
I believe you have the old dll, sll, and renamed jbrun.exe in the folder with your new .bas file. Trying to make a JB 2 tkn with JB(old version) jbrun2.exe, or an old .dll/.sll.
Try this..(it worked for me after downloading your breeders v4.20 file and testing)
Copy all your files\folders, including your new bas file into a new folder. Don't copy the dll, sll, the exe, or the tkn.
Now go get copies of those dll's, sll's, and the jbrun2.exe files from the Just Basic v2.0 install folder (usually by default - c:\Program Files (x86)\Just Basic v2.0)
Paste those files in with all your other files. Rename jbrun.exe to the name of your new bas file, but with .exe extension. (eg: breeders v4.20.exe)
Now, make your new tkn with the .bas file in the new folder.
From then on, use the new folder when updating.
Let us know if that fixed you up. I'm almost positive it is the old jbrun2.exe(renamed to breeder v2.0.exe), or one of the dll, sll files of old.
|
|
stumpy
Member in Training
Posts: 66
|
Post by stumpy on Apr 29, 2023 1:12:47 GMT
Thank you so much for that...it makes very good sense but I would never have got there otherwise
Tomorrow I will be able to concentrate better, do what you have recommended as best I can, and report progress
- and it feels better already!
|
|
|
Post by Rod on Apr 29, 2023 5:57:32 GMT
Yes, if you move to a new version of Just basic you need to recompile old .bas and remake a new .tkn and runtime.exe. These files need to reference the new set of .dlls. So it is a complete rebuild of the file set. You would probably need to distribute a whole new folder as version x to stop uses getting in the same position.
|
|
stumpy
Member in Training
Posts: 66
|
Post by stumpy on Apr 29, 2023 6:45:53 GMT
Like me, Victor Meldrew would be appalled! Right, for the long run it might seem best to go to Just BASIC v2.0, as described and understood,
but in the short term it could save bother to stick with Just BASIC v1.01 (I found it at Queas but would that be ok do you think, or is it available at JB still?)
and what are other pros and cons please?
|
|