Welcome, Guest. Please login or register.


Author Topic: Questions about QUIGS programming. (Read 13286 times)

Offline gflorez

  • EP addict
  • *
  • Posts: 3614
  • Country: es
    • Támogató Támogató
Questions about QUIGS programming.
« on: 2020.March.05. 21:15:10 »
Tutus, can you put here your .qpf program? Maybe I can fix it.

 

Offline Tutus

  • EP lover
  • *
  • Posts: 692
  • Country: hu
    • Enterprise 128
Re: Questions about QUIGS programming.
« Reply #1 on: 2020.March.06. 11:27:29 »
Thank you for this topic, Gustavo :)

I did the following:
- I rewrote the header
- I loaded a small image into the sheet with a .bmp extension
- I opened an image box on the form and referred to the image in the sheet
- I signed a text under the picture
After Compile, the .exe launched in SymbOS: the cursor is bounced, nothing else is displayed.



Offline gflorez

  • EP addict
  • *
  • Posts: 3614
  • Country: es
    • Támogató Támogató
Re: Questions about QUIGS programming.
« Reply #2 on: 2020.March.06. 18:44:53 »
It has not been easy....

Code: [Select]
// Quigs 1.01 Application for Symbos
// Name:
// Coder:
// Date / Version:

// Declare variables
Var Enter:Sheet   // a curious type of variable to store  graphics

// End declares

Function Main:Void()
// Main loop

EndF

Function Image1.Event:Void()

//Lets load the Sheet according to No. of colours
If Screen.Colour = 2 Then
//Its a 2 colour image so xxx.qs1
Enter.Load(App.Path+"Sheet1.qs1")   // these two sets of graphics are created automatically
Else
//Its a 4 colour image so xxx.qs2
Enter.Load(App.Path+"Sheet1.qs2")   // and have to go with the application.
EndIf

Ctrl.Image.Tile.Set Image1, Enter,0   // this command loads the file on the Image1 control
Ctrl.Refresh Image1       // this command rewrites the event.


EndF

Function Form1.Close.Event:Void()
Enter.Free   //releases memory at exit
EndF
Function Form1.Open.Event:Void()
Image1.Event       // this is necessary to launch the Image1 event just at opening the program.


Also, if you want to show a text, the space has to be bigger than the No. of characters:

[ Guests cannot view attachments ]
« Last Edit: 2020.March.06. 18:52:38 by gflorez »

Offline Tutus

  • EP lover
  • *
  • Posts: 692
  • Country: hu
    • Enterprise 128
Re: Questions about QUIGS programming.
« Reply #3 on: 2020.March.10. 20:50:51 »
Thank You! :)



It's really not easy. I'll study the code :D

Offline gflorez

  • EP addict
  • *
  • Posts: 3614
  • Country: es
    • Támogató Támogató
Re: Questions about QUIGS programming.
« Reply #4 on: 2020.April.13. 01:41:13 »
I have the threads about SymbOS a little abandoned, sorry.

Tutus, today I have made some changes to your program. First I have modified the type of control for the line "Magazine...", instead of a control line only a label, the "A" symbol is used to select it. This avoids the text to be modified with the keyboard.

But then I have thought about a nice touch to the label, some action. I have added a button, and declared a matrix of short strings with the same text but on other languages....

The good side is that you can define all the matrix values on the same definition.

But... the Quigs text editor has a great limitation with very long lines, so I have needed to cut and paste the strings on single lines, with the added difficulty of it not allowing you to cut and paste with the mouse buttons.... only with the menu.

Then, I have learned that you can't assign values to variables on the definition area(for example a=0), so the best place I have found is inside the  Form1.Open.Event function. It only happens once, Just at the start of the app.

Also, I have declared a counter that is increased every time the button is clicked. When it reaches 10 it is reset to 0. Then the new text is displayed.

The result is effective, with so few changes.
« Last Edit: 2020.April.13. 01:47:46 by gflorez »

Offline szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 10085
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: Questions about QUIGS programming.
« Reply #5 on: 2020.April.13. 11:03:38 »
The result is effective, with so few changes.
It was cool, so many languages! Some more sentences in some languages would be interesting.
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline gflorez

  • EP addict
  • *
  • Posts: 3614
  • Country: es
    • Támogató Támogató
Re: Questions about QUIGS programming.
« Reply #6 on: 2020.April.13. 12:11:24 »
I have put a matrix of 10, some are still empty, but you can put the limit you want.

The code for doing it is very "Basic":

Code: [Select]
// Declare variables
Var Enter:Sheet
Var LangText(10):String   //   0 to 9  Here you can set the limit
Var Lang:Int=0
// End declares
//
Function Main:Void()
// Main loop

EndF

Function Form1.Open.Event:Void()
Image1.Event
LangText(0)="Magazine for Enterprise users"
LangText(1)="Magazin Enterprise felhasznalok szamara"
LangText(2)="Revista para usuarios de Enterprise"
LangText(3)="Magazyn dla uzytkownikow Enterprise"
LangText(4)="Benutzermagazin Enterprise"
LangText(5)="Magazine utilisateur Entreprise"
LangText(6)="Language 7"
LangText(7)="Language 8"
LangText(8)="Language 9"
LangText(9)="Language 10"
        // Add more lines if you want
// No accent marks are allowed
EndF

And then on the button event:

Code: [Select]
Function Button1.Event:Void()
Lang=Lang+1
If Lang>9 Then      // Here change your limit
Lang=0
EndIf
Label1.Text.Set(LangText(Lang))
Label1.Refresh

EndF
« Last Edit: 2020.April.13. 12:30:49 by gflorez »

Offline Tutus

  • EP lover
  • *
  • Posts: 692
  • Country: hu
    • Enterprise 128
Re: Questions about QUIGS programming.
« Reply #7 on: 2020.April.13. 19:55:02 »
I have the threads about SymbOS a little abandoned, sorry.
Tutus, today I have made some changes to your program. First I have modified the type of control for the line "Magazine...", instead of a control line only a label, the "A" symbol is used to select it. This avoids the text to be modified with the keyboard.
No problem! I can't run QUIGS at home. I have a PC at work, yes (but I'm working from home for the third week now).
I don't know, maybe you don't have a MacOSX version?
Thank you so much for dealing with it! Especially that with my Enterpress program! :)
That's why I'm learning the codes. And what you sent can be run on an original Enterprise machine. :)
Otherwise, it would be huge to have an Internet connection under SymbOS on an Enterprise machine once. Then I would start with a separate Enterpress newspaper that can be used here in simple HTML format. :D
« Last Edit: 2020.April.13. 19:59:10 by Tutus »

Offline gflorez

  • EP addict
  • *
  • Posts: 3614
  • Country: es
    • Támogató Támogató
Re: Questions about QUIGS programming.
« Reply #8 on: 2020.April.14. 00:54:54 »
Sorry, there is only the Windows version. I have not tried Quigs on Linux, on Wine, if it works maybe it can work on the Apple.

Yes, of course it works on the real Enterprise, I always test the programs several times until they work as I want, both on the emulator and on the machine.  I even try them on the other SymbOS computers I own, MSX and  PCW.

It would be a dream to have a connexion, yes, but you already can read it as a file on SymbOS.

A pity that development is so slow. I have good intentions but my skills don't let me do all what I want,. On the other side, our genious have their own lives, their own problems. And then the world is convulsed with the virus to make things worse....

Offline gflorez

  • EP addict
  • *
  • Posts: 3614
  • Country: es
    • Támogató Támogató
Re: Questions about QUIGS programming.
« Reply #9 on: 2020.April.14. 08:50:27 »
I have tried the Quigs program on Linux and it starts and seems to work well, but it managed to erase all the Quigs directory when I tried to load some projects.... I don't know it is is sure to run it outside real Win OS.

Offline Tutus

  • EP lover
  • *
  • Posts: 692
  • Country: hu
    • Enterprise 128
Re: Questions about QUIGS programming.
« Reply #10 on: 2020.April.16. 07:02:10 »
It would be a dream to have a connexion, yes, but you already can read it as a file on SymbOS.
But I think the SF3 card will have an internet connection under SymbOS. Or is it still under testing?

Offline gflorez

  • EP addict
  • *
  • Posts: 3614
  • Country: es
    • Támogató Támogató
Re: Questions about QUIGS programming.
« Reply #11 on: 2020.April.16. 12:05:08 »
Yes, there is the hardware, but Prodatron has to write drivers for it. He is actually missing....

Hans wrote a Webradio program(you already have the source of an old version on the Quigs dirctory) that access the hardware directly, but still the SF3 has not been integrated on SymbOS.

Edit: On the other side.... maybe this situation impulse us to not wait and make ourselves the drivers.
« Last Edit: 2020.April.16. 12:12:54 by gflorez »

Offline gflorez

  • EP addict
  • *
  • Posts: 3614
  • Country: es
    • Támogató Támogató
Re: Questions about QUIGS programming.
« Reply #12 on: 2024.January.18. 14:02:30 »
I want to put here the latest Quigs version I have, that lets the user to program V9990 apps inside SymbOS.

Offline Tuby128

  • EP addict
  • *
  • Posts: 1482
  • Country: hu
Re: Questions about QUIGS programming.
« Reply #13 on: 2024.January.18. 18:07:42 »
Do you have sample codes?
1. Opening a window. Place horizontal and vertical scrollbar in it. How to make simple message box with arbitrary text and OK button.
2. Write text into the window (with selected font size, maybe color)
3. How to make buttons in windows and how to handle if pushed
4. How to use one or multiple line edit (text) boxes, how to send and get text as a string from the edit box
5. How to draw line or rectangle in a window
6. How to redraw a window if another window overlapping and moving on it
7. How to use timer, how to setup different time for the timer event


10. How to open and save file
11. How to allocate memory to map a file

This would be a good start I think.


Offline gflorez

  • EP addict
  • *
  • Posts: 3614
  • Country: es
    • Támogató Támogató
Re: Questions about QUIGS programming.
« Reply #14 on: 2024.January.18. 23:15:09 »
Yes, there are examples on the packet.

I have not touch it for a long time and I am not quite a master, but I can say you that SymbOS is an environment driven by events, and Quigs allow you to build these events or objects: icons, clicks, windows, buttons, sliders, etc.

Windows position on screen is not managed by the app created by Quigs, it is SymbOS who manages that.

Memory is managed by SymbOS transpartently, it takes all the memory available up to 1MB.

About the other questions.... I don't remember well.