Board Logo
« getting started, Pigeon Breeders Records program »

Welcome Guest. Please Login or Register.
Jan 21st, 2018, 12:51am


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Please use the forums Search feature before asking.
Please post code using the code box described in Format Your Messages.
This will keep indentation, separate it better form the message and prevent gibberish.
If the code is too long for one post or additional files are needed, upload a ZIP archive to the Just BASIC Files Archive Site.

« Previous Topic | Next Topic »
Pages: 1 ... 6 7 8 9 10  11 Notify Send Topic Print
 veryhotthread  Author  Topic: getting started, Pigeon Breeders Records program  (Read 10845 times)
stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #105 on: Sep 27th, 2016, 6:09pm »

tsh73, that's most helpful

re. 1.) Right, forgot to unpack those vital guides into 'breeders'!

re. 2.) Quote:
somehow, colored bars is bigger then text on both screens at 1280x1024. So 13th colored box stays along 14th line of text.
That is a puzzle. I have re-checked on '1280x1024' display and found the numbers and lines very nearly match as intended.

To get this sorted, it could help a lot too if someone else would kindly have a look?

re. 3) Very good. Calibri_narrow, when properly specified, is definitely clearer so have corrected that, as well as 1.), and used text editor for 1920, instead of text box for the extra whiteboard, and improved layout + new intro.bmp.

https://www.filesanywhere.com/fs/v.aspx?v=8b71648c5d6373b97396

PS
No, the real Calibri_"narrow" font has turned out to be wider, which has affected the layout, so will have to redo that again, but worth it for clarity on screen...maybe tomorrow
« Last Edit: Sep 27th, 2016, 6:44pm by stumpy » User IP Logged

stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #106 on: Sep 29th, 2016, 1:19pm »

That was a good thing because I found that in the 1920 version I can easily add an essential feature, which OP did not mention but which would actually be very handy.

It will be a texteditor to receive the strings belonging to young birds already listed in the nest lists:
Code:
[add_to_team]

 playwave "bmp\click.wav", async

team1$ = team1$ + ringlist$ + "," + str$(listno) + " " +  teambird$ + chr$(13) ' ------------ (ringlist$ = nest 1. etc...) + number of squeaker in that list,
                                                                               ' (teambird$ = squeakers ring no. etc.)
print #main.teamtext, "!cls" '------------------------ #main.teamtext is the texteditor
#main.teamtext team1$ '----------------------- display the team list in the texteditor box

gosub [reloadnestboxes] '--------------- get rid of text box, including button for 'add to team', and deselect pairs
close #hndl
gosub [deselect]

wait 


The idea is that the texteditor will receive up to four lists, of 20 young birds each, which will be the birds trained in teams. If they get mixed up it can be a pain!

The addition of a line of text as above works fine, and the list, but if, as intended, the order of the birds in the texteditor is then rearranged with cut and paste etc. (using the PC widget and edit menu) a gap consisting of 3 empty lines appears when the next bird is added, and can't be eliminated by further editing.

What am I doing wrong please?



« Last Edit: Sep 29th, 2016, 1:23pm by stumpy » User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: getting started with Prog for Pigeon Breeding
« Reply #107 on: Sep 30th, 2016, 03:20am »

stumpy,
can you add your example to runnable code?
As for now I just acnnot understand your problem.

I started, but it needes some sums (does it for this exmaple? ) and I have no idea what should be in text variables.
Code:
button #main.btn, "tap it", [add_to_team], UL, 10, 10

texteditor #main.teamtext, 10, 50, 300, 250
open "" for window as #main
#main "trapclose [quit]"
wait

[add_to_team]

 playwave "bmp\click.wav", async

team1$ = team1$ + ringlist$ + "," + str$(listno) + " " +  teambird$ + chr$(13) ' ------------ (ringlist$ = nest 1. etc...) + number of squeaker in that list,
                                                                               ' (teambird$ = squeakers ring no. etc.)
print #main.teamtext, "!cls" '------------------------ #main.teamtext is the texteditor
#main.teamtext team1$ '----------------------- display the team list in the texteditor box

gosub [reloadnestboxes] '--------------- get rid of text box, including button for 'add to team', and deselect pairs
close #hndl
gosub [deselect]

wait

[quit]
close #main
end
 
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3151
xx Re: getting started with Prog for Pigeon Breeding
« Reply #108 on: Sep 30th, 2016, 03:29am »

If a bird is in a team should there not be a team name in the standard bird record? Adding lists of birds already recorded seems hard work.
User IP Logged

stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #109 on: Sep 30th, 2016, 05:24am »

tsh73,
this is current version. There are also team buttons 1,2,3.4, but they don't do much yet. The 'add to current team' button has simply been added to on the popup editing textbox: click on nest entry > add to current team> edit the team in the texteditor box, as things change and as they develop. Important notes about the individual youngster would still best be added to the 'nestcard', and the Team List give an account for the members in the team rather than each one's performance, but anything could be edited in the text editor, except that it is currently inconsistent. I think it may have something to do with what is in the windows clipboard, which, after editing the list, it adds to the list again, instead of just the newly selected youngster
https://www.filesanywhere.com/fs/v.aspx?v=8b71648d5c626e7ba2a4
(new code is right at the end of the list)

(edited)
Hi Rod, Thanks.
in the young section the progression is pair> egg> hatch> ring,
so the flying team is not formed until later.

Later, when eventually the squeakers are put on their own, the idea is to record which were being kept and flown together as a group with button 'add to a flying team' in the (pre-existing) single click edit box for that youngster. The list would serve for easy reference and further quick editing, with Cut and paste editing from the texteditor widget, when youngsters are switched between teams. Most of the youngsters would not make it onto the Stock page.

In the 'stock' section The standard list of birds is mainly for the older, breeding, 'stock birds' or birds from the past, rather than for an old bird flying team. That might not need listing because its members would be familiar by the time any made it into the team, (edited) but will look at that too, now there is space on the 1920 Stock page


User Image

« Last Edit: Oct 1st, 2016, 08:49am by stumpy » User IP Logged

stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #110 on: Oct 1st, 2016, 08:05am »

Replacement, later Records1920.bas (the rest being the same)

https://www.filesanywhere.com/fs/v.aspx?v=8b71648d5f6172a66d9d

The Current Team buttons are now being used and, after editing the Flying Team, button 'Store Edited' confirms an edited list as the current Team.

The problem persists of the unwanted insertion of a couple of empty lines, which precede the latest young bird entry, once that team has been edited.
« Last Edit: Oct 1st, 2016, 08:28am by stumpy » User IP Logged

stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #111 on: Oct 2nd, 2016, 6:50pm »

Having trouble with getting a similar texteditor to do anything at all programmatically on the alternative 'Stock' page:

There are two sections, each of which is intended to open a texteditor as well as everything else, and one window is closed before opening the other. The handle is 'main' in both windows, but the extension is '.text' in the 'young' page one and '.obteam' in the other 'stock' page .

When the program runs, the texteditor #main.text works fine in doing most of which I think it should (with the exception mentioned above). When that window is closed and another is opened, with texteditor #main.obteam in it,
no errors are announced but it does not work.

e.g.
a substituted textbox with the same name, as follows

textbox #main.obteam, 1440, 124, 440, 827
(next line)
#main.obteam, "well"

- prints "well" in the textbox

but

texteditor #main.obteam, 1440, 124, 440, 827
(next line)
#main.obteam, "well"
-
does not print anything,

and

#main.obteam, "!cls"

- does not remove any text which has been typed into the texteditor.

Is there a problem trying to use two similar texteditors in different windows like this? or is there something I have misunderstood?
Thought it might be easier to ask in this fashion, but would post the current code again, very similar, if needed...
« Last Edit: Oct 2nd, 2016, 6:59pm by stumpy » User IP Logged

Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3151
xx Re: getting started with Prog for Pigeon Breeding
« Reply #112 on: Oct 3rd, 2016, 02:11am »

The . Defines controls within the named window. So try naming the window differently #new.control
User IP Logged

stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #113 on: Oct 3rd, 2016, 03:02am »

Hello Rod, apologies, I didn't understand that and just calling the textbox, and the command reference, "#new.obteam" caused an error.
Would you kindly spell out what should be tried?

PS or did you mean try changing the 2nd use of window title #main, for the stock section, to #new, together with all the references there to #main?

Meanwhile I had been about to post the following.
Please see 'refs 705, 706, 708, 709, 710 for what is being done

at '-------------------- ref 706

textbox #main.obteam, 1440, 124, 440, 827 ' ---------- 'as a note pad

- this works, to put a new team member into textbox "obteam"

but for some reason

texteditor #main.obteam, 1440, 124, 440, 827 ' ---------- 'as a note pad

- does not work

https://www.filesanywhere.com/fs/v.aspx?v=8b71648d606775ae9ca5
« Last Edit: Oct 3rd, 2016, 03:44am by stumpy » User IP Logged

Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3151
xx Re: getting started with Prog for Pigeon Breeding
« Reply #114 on: Oct 3rd, 2016, 08:39am »

Away from home and on my iPhone. You named the first window #main you need to name the second window something else like #subsidiary. Then in the open statements you would name the controls #main.texteditor if it is a texteditor on the #main window or #subsidiary.texteditor if it is a texteditor on the #subsidiary window.
User IP Logged

stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #115 on: Oct 3rd, 2016, 1:25pm »

Edited.

Right and thank you for the quick response. It came about because the two sections started as separate programs, which were merged.

Was hoping things might somehow be allowed to stand, however incorrect, but see that JB is having to look after too many controls, many of which belong to the section which is notionally closed.

Have failed so far to put all that right but will keep trying.


« Last Edit: Oct 4th, 2016, 12:23am by stumpy » User IP Logged

stumpy
Full Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 148
xx Re: getting started with Prog for Pigeon Breeding
« Reply #116 on: Oct 4th, 2016, 03:57am »

Hello Rod.

Went through the whole list of code yet again and eventually managed to put things right as advised, and still have it working, as well as an additional texteditor in the Old Bird Flying team project, which had been the problem.

Can now get on with adding that extra flying team. Many thanks again.
User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: getting started with Prog for Pigeon Breeding
« Reply #117 on: Oct 4th, 2016, 07:00am »

I spent some time fiddling with code from Reply #113 yesterday.
I have no idea why it didn't worked as texteditor.
1) I tried different BASIC's (LB 4.5 etc), no go - same thing (I see texteditor but from program it didn't work)
2) I tried to move that control left, tried to make it any smaller - no difference
3) I tried to recreate problem as I understand from Reply #111:
made main.text a textbox
opened main
write to it - checked it works, close it
made main.text a texteditor
opened main
write to it - checked it works
-- no problems in second window. In any sequense (textbox to texteditor, texteditor to textbox)
(though probably it never was a problem)
4) I tried to get text back from texteditor with
Code:
print #handle, "!contents varname$"; 

In debug mode I saw that variable contain text!
With some invisible chars - likely chr$(13)?
But I had no any text visible
And trying to select all/copy from running program did not return it either

So I'm buffled.

---
JUST NOW I've got an idea - I wonder if it's CHR$(0) or smth like that?
CHECKED: no
Chr$(0) makes black rectangle
It prevents copying after it, but it does not prevents showing stuff after
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: getting started with Prog for Pigeon Breeding
« Reply #118 on: Oct 4th, 2016, 3:51pm »

Ok I solved it.
Kinda.

1) I used program from Reply #101 to scale program from from Reply #113. I just cannot work with 1980 wide form - and scrolling it back and forth in virtual machine just didn't cut
2) I remmed out all NOMAINWIN's
3) I put a print in "[notepadob]" branch.
Run the program, from Intro screen pressed Stock Records button
Aha! I saw (printed to a mianwin) that [notepadob] got called twice
4) I did search for "[notepadob]" and added a print near everyone, like "line 192"
Run it again.
Now I see that it first got called from "[introtostock]" branch, and then from "[start]" branch.
So I just remmed out "gosub [notepadob]" in "[start]" branch.
Viola! Problem solved.
wink

User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: getting started with Prog for Pigeon Breeding
« Reply #119 on: Oct 4th, 2016, 3:58pm »

Here's what happened
Then we run same "texteditor" line twice, we get two controls
One above other
And printing, commands all goes to below control - invisible one!
(btw changing coordinates shows that it is last control who gets text and commands. But why it ends up below I have no idea)
Code:
    nomainwin

    WindowWidth = 416
    WindowHeight = 215

    UpperLeftX=int((DisplayWidth-WindowWidth)/2)
    UpperLeftY=int((DisplayHeight-WindowHeight)/2)

    texteditor #main.texteditor1, 26, 16, 216, 120
    'texteditor #main.texteditor1, 26, 16, 216, 120 'uncomment this line - and see texteditor stops working
    texteditor #main.texteditor1, 16, 06, 216, 120  'Now I moved it up - and I see text prints in this control
        'which for some reasom ends up UNDER (Z-order) first one
    button #main.button2, "Button Caption", [button2Click], UL, 270, 16, 122, 25
    menu #main, "Edit"    '<--- Texteditor Menu can be moved but not removed.

    open "Overlaid texteditor (by doubling)" for window as #main
    print #main, "trapclose [quit.main]"

    wait

[quit.main]
    Close #main
    END


[button2Click]
     #main.texteditor1 "Hello there"
    wait
 
« Last Edit: Oct 4th, 2016, 4:00pm by tsh73 » User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
Pages: 1 ... 6 7 8 9 10  11 Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls