First test project in Gambas
Posted
#1
(In Topic #1200)
Trainee
I am trying to do my first test project in Gambas after maybe 12 years not looking at VB.. This would a basic checker tool to assist me writing titles & keywords for my amazon listings and to calculate fee and taxes etc. I am facing some problems or maybe I don't understand to work with it yet. Some help would be appreciated to guide me solve the riddles:
When I close the application / form it clears the text from clipboard (in case I copy something from TextBox).. how can I fix it?
And below code to validate a product title is reading hyphen (-) as invalid character from TextBox input (typed or pasted).. though the character '-' is included in the pattern.. idk why?
Code (gambas)
- .....
- PatMatch = False
- TextBox1.Foreground = Color.DarkRed
- TextBox1.Text = "None"
- TextBox1.Foreground = Color.DarkGreen
- .....
Posted
Guru

A clipboard contents is held active by each program task, if you close the task the clipboard contents die with it.
This is true for EVERY program you use on linux.
the only way around it is to have a clipboard manager like diodon tool installed.
And there's easier ways to remove/detect valid characters
Posted
Guru

/lang/like - Gambas Documentation
maybe you want this…
Code (gambas)
- Like "\{A-Z, a-z, 0-9, ',', '.', '-', ' ', '/'}"
I do not know
I do not use Like in detail like that but documentations says…
{aaa,bbb,…} One of the strings between the square brackets. The strings are separated by commas.
and that not accurate as it should say "curly brackets" not "square brackets"
Posted
Guru

Code (gambas)
- PatMatch = False
- TextBox2.Foreground = Color.DarkRed
- TextBox2.Text = "None"
- TextBox2.Foreground = Color.DarkGreen
Posted
Regular

BruceSteers said
install diodon or clipman or some other clipboard manager.
A clipboard contents is held active by each program task, if you close the task the clipboard contents die with it.
This is true for EVERY program you use on linux.
the only way around it is to have a clipboard manager like diodon tool installed.
And there's easier ways to remove/detect valid characters
Hi I searched for my doubt and find this post. (clipboard desapearing when close the app)
You said that "all programs" in linux miss the clipboard when they die.
Why some programs do different? For instance, geany editor, if I copy some text and close it, I still can paste the text although geany is not open.
Do you know why ?
1 guest and 0 members have just viewed this.


