|
Post by basica on Sept 27, 2015 1:45:38 GMT 1
Great new stuff to try out. Thanks for creating.
When run on 3.1, canvas.bac gave me this error..
Looking at the PEN sub.
SUB PEN(size#, flag)
IF flag THEN glEnable(GL_POINT_SMOOTH) glEnable(GL_LINE_SMOOTH) ELSE glDisable(GL_POINT_SMOOTH) glDisable(GL_LINE_SMOOTH) ENDIF glPointSize(size#) glLineWidth(size#)
ENDSUB
Seems to be correct --- IMPORT "glPointSize/Width(float)" FROM lib$ TYPE void
I notice that if I change the size# (float) to just size, there's no error.
Puzzled.
Regards, Basica
|
|
|
Post by Pjot on Sept 27, 2015 3:30:33 GMT 1
Hi basica,
You're running the canvas context from the BaCon scratchpad in BaConGUI, right?
Did you copy and paste everything correctly? Because this line you are mentioning:
IMPORT "glPointSize/Width(float)" FROM lib$ TYPE void
...does not seem correct to me.
When I copy and paste all canvas code into the scratchpad I do not receive any errors... can you describe exactly what you are doing when using 'canvas.bac'?
Thx Peter
|
|
|
Post by basica on Sept 27, 2015 15:44:12 GMT 1
Hi basica, You're running the canvas context from the BaCon scratchpad in BaConGUI, right? Did you copy and paste everything correctly? Because this line you are mentioning: IMPORT "glPointSize/Width(float)" FROM lib$ TYPE void ...does not seem correct to me. When I copy and paste all canvas code into the scratchpad I do not receive any errors... can you describe exactly what you are doing when using 'canvas.bac'? Thx Peter Peter, Thanks for your reply. This item below.... IMPORT "glPointSize/Width(float)" FROM lib$ TYPE void was my lame shorthand for- IMPORT "glPointSize(float)" FROM lib$ TYPE void IMPORT "glLineWidth(float)" FROM lib$ TYPE void The canvas.bac code I pasted to both the scratchpad, and main program, is correct, and produces the same above error for the PEN function. Same error if canvas.bac is INCLUDED. I guess I'm alone here Regards, Basica
|
|
|
Post by Pjot on Sept 28, 2015 5:16:32 GMT 1
Thanks basica,
Are you sure that you're using BaConGUI 3.1, and not a pre 3.0.1 version? Because the recognition of '#' as double is available since 3.0.1.
BR Peter
|
|
|
Post by basica on Sept 28, 2015 16:45:55 GMT 1
Thanks basica, Are you sure that you're using BaConGUI 3.1, and not a pre 3.0.1 version? Because the recognition of '#' as double is available since 3.0.1. BR Peter Peter, Thanks for looking into this. I definitely have BaConGUI 3.1. If I remove the PEN sub or redefine "size#" to "size" everything works. The other subs using the '#" notation do not err. Regards, Basica (hmm. maybe this is caused by schools no longer teaching cursive penmanship
|
|
|
Post by Pjot on Sept 29, 2015 2:49:49 GMT 1
Hi basica, Well, I am puzzled - it simply should work, nobody else experiences this error. Could it be that you're using a beta version of 3.1? Because these beta versions did not mention their beta status (e.g. you'll not see from the version number that you're actually using a beta). Apart from the simple advise to reinstall BaConGUI 3.1 from scratch, you could also try to install the latest beta and try again. Or you could post the temporary c/h code files in a tar.gz , so I can take a look at the generated sources? Because unfortunately, I cannot reproduce your problem... BR Peter
|
|
|
Post by basica on Sept 30, 2015 17:22:44 GMT 1
Peter, Thank you for your help. I've done all of your suggestions and can't seem to rid myself of that PEN error. Attached is a tar of the /tmp files when running the bacongui with canvas-1.3.bac pasted in the main window. Regards, Basica
|
|
|
Post by Pjot on Oct 1, 2015 9:47:27 GMT 1
Hi basica, Thanks for your files, I found the reason for this issue. It does not happen with the shell version or BaCon version, only the GUI version 3.1 suffers from this problem. I have installed 3.1 in a temporary location and I can see that it does not recognize the '#' suffix when used in the beginning of an argument list. However, it turns out that I accidentally already fixed the problem in the beta release. It is the last fix "arguments to SUB/FUNC could not contain array with dimension (BaCon and BaConGUI version)" which solves this problem. Therefore I could not reproduce the issue. So, if you install the latest beta it should work. BR Peter
|
|
|
Post by basica on Oct 1, 2015 22:21:18 GMT 1
Peter, Bingo.. I downloaded, compiled, and ran the Bacon-3.1.1 beta as you suggested - pasted canvas-1.3 in the scratchpad and "yes" it ran smooth as silk Again, it amazes me how you can keep such a keen grasp on all these aspects. Many thanks, basica
|
|