|
Post by alexfish on Dec 27, 2022 23:23:26 GMT 1
there were some widgets not suitable for the designer esp cannot have callback since been of opaque structure one been FRAME now found a way into this one + can attach widgets to it code as it stands 'WINDOWFRAME' INCLUDE "includegtk.bac"
SUB CLICK() PRINT "click" END SUB
win= WINDOW("framed",500,300)
frame = WINDOWFRAME("My Frame",200,295) ATTACH(win,frame,80,2)
but = BUTTON("but",75,25) ATTACH(frame,but,1,4) CALLBACK(frame,CLICK)
but2 = BUTTON("but2",75,25) ATTACH(win,but2,1,4)
DISPLAY
its not in the lib yet, will update just prior to posting a tutorial, and @ will be more graphics orientated BR Alex Picky Attachments:
|
|
|
Post by rikky on Dec 28, 2022 7:24:47 GMT 1
I'm so sorry. But I'm still missing a whole function INDEX$(iconnames$,hug_name$) in includegtk.bac.
It simply is not there. Also the programs that do not have an includegtk.bac., they compile fine, but do not do nothing.
|
|
|
Post by alexfish on Dec 28, 2022 10:03:58 GMT 1
Hi Rik Think what you need are in the archive guidesigner2 that contains the icon names put what you need in the main folder imager4, if have duplicate , replace what is in imager4 see what happens mapping programs require internet + think some of the mapping program take a while to boot on pi4 can take three or four minutes , possible p three may take longer however once loaded, + the latest mapping app should be up in reasonable time if getting fail. post the problem program + I will check the includegtk.bac in imager4 Back soon BR Alex Attachments:
|
|
|
Post by rikky on Dec 28, 2022 10:58:15 GMT 1
Included is the file includegtk.bac that is in the folder imager4 of post #1. There is no includegtk.bac in folder guidesigner2
Line 529 says:
nm$ = INDEX$(colorname$,hug_name$) but there is no function INDEX$(string1$ , string2$) anywhere.
includegtk.bac (30.59 KB)
|
|
|
Post by alexfish on Dec 28, 2022 11:28:35 GMT 1
Hi Rik as mention above put that is where the includegtk.bac is HTH BR Alex Compile the gui_designer2.bac and should have This Attachments:
|
|
|
Post by alexfish on Dec 28, 2022 14:33:59 GMT 1
Hi All
Now have the sliders an spinbutton working
+ the WINDOWFRAME aka FRAME done
Hence Lib will be updated sometime today,
If have to split the bits likes of gui_designer and demos, note ,copy files from one folder into the imager5 folder BR Alex
|
|
|
Post by rikky on Dec 28, 2022 16:27:39 GMT 1
I know where the includegtk.bac is. And I now that there isn't an INDEX$(string1$,string2$) function in it. hence everybody who try to run your programs will run into a includegtk.bac:529:62: warning: implicit declaration of function ‘INDEX$’; did you mean ‘INTL$’? [-Wimplicit-function-declaration]
|
|
|
Post by Pjot on Dec 28, 2022 16:48:00 GMT 1
Hi rikky,
The INDEX$ function is a new function in the official 4.6 release. Can you see which version of BaCon you are using?
BR Peter
|
|
|
Post by rikky on Dec 28, 2022 17:20:29 GMT 1
Oeps, my bad. Luckily I have a FOSSIL lying around. Now everything compiles fine. Running seamaps I get a Runtime error: function 'WALK$' at line 28 in 'seamaps.bac': Unable to stat file: No such file or directory
That's an error I can solve myself. First updating my system to bacon 4.6 Thanks.
|
|
|
Post by alexfish on Dec 28, 2022 19:39:59 GMT 1
Find this rather puzzling in fashion I was using 4.6 , but changed to 4.6.1 after a bug was reported : re concerning a server program extract this is what I check the server with + checked and compiled these latest archives both the gui & shell 'bacon' Alex Picky of bits in the server Attachments:
|
|
|
Post by rikky on Dec 28, 2022 20:20:04 GMT 1
Yes it is, but I have more Raspies lying around. Well off course, to test the server. So It's a bit messy around here. Sorry. PS. The Server in the steering cabin, connected to the AIS, does not even have a bacon installed on it. It only has the executables. Neither does it have a screen, or a keyboard or a mouse. Everything is done via ssh.
|
|
|
Post by rikky on Dec 28, 2022 20:57:03 GMT 1
Did not update bacon, for YouTube came in between. Using the Fossil. And I can confirm that it works. testmap.bac: and Not quite sure howto use Seamaps though.
|
|
|
Post by alexfish on Dec 28, 2022 21:23:42 GMT 1
Hi Rik
Look at first post demo
There is a TIMEOUT to Update
FUNCTION UPDATE() SYNC() MAPTILES(0,0) PRINT "Here Mouse xy :" , MOUSE(0) , " : ",MOUSE(1) RETURN TRUE END FUNCTION '=========================================================== SUB ZOOMOUT() DECR zoomed IF zoomed < 4 THEN zoomed = 4 TEXT(lab,STR$(zoomed)) GPS(54.6425,-3.54413,zoomed) SET_GEO(N,S,W,E) TILES_GET() MAPTILES(0,0) END SUB
need to change that
FUNCTION UPDATE() GPS(54.6425,-3.54413,zoomed) SET_GEO(N,S,W,E) TILES_GET() MAPTILES(0,0 RETURN TRUE END FUNCTION
the
GPS(54.6425,-3.54413,zoomed) needs to be GPS(lat,lon,zoomed) the lat , lon is from your gps
and need to be start in the main program at HERE
ts = TIMER N = 2 S = 3 W = 2 E = 7 'HERE GPS(54.6425,-3.54413,zoomed) SET_GEO(N,S,W,E) BB_MAPBOX.provider$ = "https://a.tile.openstreetmap.org" BB_MAPBOX.cache$ = "bacon-osm-maps" 'BB_MAPBOX.rem$ = "Pos: " & BB_MAPBOX.degsec$ TILES_GET()
win = WINDOW("test imager2",800,600)
Else prog may stall,
TRY timeout 10 secs then work down but if updating on zooms set the timeout a bit above what time shows in terminal
Once maps are loaded, then updated of maps is less than one second need change the other functions as well... HTH Alex
|
|
|
Post by rikky on Dec 29, 2022 18:37:17 GMT 1
It took a while before the coin dropped. But it has dropped. Yes it is working. I can do something with this. Thanks.
|
|
|
Post by alexfish on Dec 30, 2022 19:46:44 GMT 1
Hi All Updates delayed During the event till now m decided to improve the gui designer , added colour button add dialog warning if save new or freshly open file to existing file Edited the default size of the widgets , both sides now match Added Callback to widgets that would normally have one, the callback default is commented widgets names now aligned to ATTACH to default window Hence can just type the keyword Results example 'INCLUDE "hug.bac" 'HUGOPTIONS("NOSCALING") INCLUDE "includegtk.bac"
window = WINDOW("title", 606, 406)
but = BUTTON("caption", 75 , 25 ) ATTACH(window,but,3,3) 'CALLBACK(but,Call)
edit = EDIT(300 , 400 ) ATTACH(window,edit,83,3)
icon = ICON("document-save") ATTACH(window,icon,3,3) 'CALLBACK(icon,Call)
DISPLAY just adjust default positions , add the DISPLAY , compile , and away you go Update : all been well :Sunday BR Alex Attachments:
|
|