Getting a list of keywords
Posted
#1
(In Topic #930)
Trainee
However, not sure how to use it. I guess I need to declare an array and write a loop, but all my attempts thus far have generated errors. Could someone kindly point me in the right direction?
Thanks!
Posted
Regular

Posted
Trainee
I haven't quite got my head around how the Gambas object system works and was using the wrong syntax. I've always avoided OO languages until now and have only a hazy grasp of how OOP works, and all languages seem to implement it slightly differently.
Posted
Regular

Official website of Gambas:
Official Wiki of Gambas:
Official Mailing List of Gambas:
Forum, Wiki and other sites about Gambas:
- https://gambas-es.org/
- https://foro.gambas-es.org/forum.php
- http://www.gambas-club.de/index.php
- https://forum.gambas.one/
- https://gambaslinux.fr/v2/
- http://89.234.156.109/
- https://www.gambas-it.org/smf/
- http://www.gambas-it.o…p?title=Pagina_principale
- https://gambas-buch.de/dwen/doku.php
- https://de.wikibooks.org/wiki/Gambas
- http://sologambas.blogspot.com/p/indice.html
- https://jsbsan.blogspot.com/
- http://captainbodgit.b…t.com/search/label/Gambas
- https://pigalore.miraheze.org/wiki/Main_Page
- http://icculus.org/piga/
- http://novatocodegambas.blogspot.com/
Texts, manuals and courses:
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Trainee
Posted
Guru

Median Joe said
Thanks vuott,
I haven't quite got my head around how the Gambas object system works and was using the wrong syntax. I've always avoided OO languages until now and have only a hazy grasp of how OOP works, and all languages seem to implement it slightly differently.
OOP rocks
you can do the same print out like this..
System.Keywords returns a String[] array so i use Sort() on that
Sort returns a sorted String[] array so i use Join("\n") on that to join the items with a newline so a single string.
Note: Keywords is a "property" and Sort() and Join() are functions so no brackets needed for Keywords but needed for Sort() and Join()
After typing a Keyword/function()/method()/property/etc then pressing the dot . the autocomplete shows all the properties/methods available.
This has been pretty much all the documentation I ever needed. I find it's kind of "learn as you go"
Posted
Trainee
BruceSteers said
OOP rocks
All criticism of OOP (and there is a lot of it) seems to revolve around knowing when it's a appropriate to use it. It's a good fit for GUI, but maybe not other applications, like merging files or doing calculations for example. At least Gambas doesn't force OOP on you in all situations, as Java seems to.
Yes the built-in documentation is very good.
1 guest and 0 members have just viewed this.


