Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-02

Re: Como passar uma procedure local como callback?

10 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Everton Vieira

Has been felt need for examples in the documentation.

Bah, tu tais complementamente certo, faz muito falta um exemplo ou at? alguns n?.

silvioprog wrote 41 lines
Em 20 de fevereiro de 2012 13:37, Daniel Gaspary escreveu: > Silvio, mas quer executar procedure interna mesmo ou foi s? pro exemplo ? > > Por que me parece t?o errado. Est? querendo usar em outro escopo algo > que s? existe um escopo. N?o ? errado, s? n?o ? muito comum ver por a?. H? casos que realmente esta seria uma boa sa?da, por?m ainda n?o posso falar o que ?. :) Veja isso: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&revision=15656 Atrav?s desse link tudo indica que o recurso j? est? implementado, mas n?o tenho a menor ideia de qual seria a sintaxe. E ainda tem esse link: http://www.freepascal.org/docs-html/rtl/objects/callvoidlocal.html Por?m infelizmente o FPC segue uma metodologia de documenta??o que n?o exp?es um m?sero demo para os mortais. -- Silvio Cl?cio ==================================== Site - <silvioprog.com.br> LazSolutions - <code.google.com/p/lazsolutions> ==================================== -- Voc? recebeu esta mensagem porque est? inscrito no Grupo "Lazarus-BR" nos Grupos do Google. Para postar neste grupo, envie um e-mail para Para cancelar a sua inscri??o neste grupo, envie um e-mail para Para ver mais op??es, visite este grupo em http://groups.google.com.br/group/lazarus-br?hl=pt-BR
Everton Vieira. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120220/ec900717/attachment.html>

Reply by email

waldo kitty
to Everton Vieira
Everton Vieira wrote
Has been felt need for examples in the documentation.

i haven't yet gotten to this stage of my stack of "round to its" (joke "getting around to it") and this seems ok time... not only are examples needed but also sample output... i have been digging in the help, as many know, trying to get back my "coding legs" and have found examples that didn't have any output so that one could see what the result would be with certain input... i've also seen examples that said something to the effect of "see this example over here" which took you to another help item that did actually have some example code that may or may not contain the topic you were looking at before... and again, there is the need for sample output from sample input...

not only should these examples be in/on the wiki, but they should also be in the offline local documentation... offline local documentation being the most important (IMhO)...

Reply by email

Everton Vieira
to waldo kitty
waldo kitty wrote 6 lines
On 2/20/2012 10:59, Everton Vieira wrote: > Has been felt need for examples in the documentation. i haven't yet gotten to this stage of my stack of "round to its" (joke "getting around to it") and this seems ok time... not only are examples needed but also sample output... i have been digging in the help, as many know, trying to get back my "coding legs" and have found examples that didn't have any output so that one could see what the result would be with certain input... i've also seen examples that said something to the effect of "see this example over here" which took you to another help item that did actually have some example code that may or may not contain the topic you were looking at before... and again, there is the need for sample output from sample input... not only should these examples be in/on the wiki, but they should also be in the offline local documentation...

Some parts of the wiki could be generated by the same database that could also generate the offline help. I`m not well aware of the development of the help system but i bet some is been done in this way. After all, is far well know the benefits of have centralized data. And i`m not aware how the help data are been stored, but if it is like a relational database then would be possible to store more than one example for each case, and more, should be store also who contributed with that example and when. Is important that the work of a friend be acknowledge. And that information should be elegantly showed on offline help and also online.

Show quoted text 7 lines
offline local documentation being the most important (IMhO)... -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Everton Vieira
to Everton Vieira
Everton Vieira wrote 11 lines
Em 20/02/2012, ?s 19:46, waldo kitty escreveu: > On 2/20/2012 10:59, Everton Vieira wrote: >> Has been felt need for examples in the documentation. > > i haven't yet gotten to this stage of my stack of "round to its" (joke "getting around to it") and this seems ok time... not only are examples needed but also sample output... i have been digging in the help, as many know, trying to get back my "coding legs" and have found examples that didn't have any output so that one could see what the result would be with certain input... i've also seen examples that said something to the effect of "see this example over here" which took you to another help item that did actually have some example code that may or may not contain the topic you were looking at before... and again, there is the need for sample output from sample input... > > not only should these examples be in/on the wiki, but they should also be in the offline local documentation... Some parts of the wiki could be generated by the same database that could also generate the offline help. I`m not well aware of the development of the help system but i bet some is been done in this way. After all, is far well know the benefits of have centralized data. And i`m not aware how the help data are been stored, but if it is like a relational database then would be possible to store more than one example for each case, and more, should be store also who contributed with that example and when. Is important that the work of a friend be acknowledge. And that information should be elegantly showed on offline help and also online.

Now, to make easy and secure that kind of contribution, i bet is a challenge.

Show quoted text 9 lines
> offline local documentation being the most important (IMhO)... > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Everton Vieira
to Everton Vieira
Everton Vieira wrote 16 lines
Em 20/02/2012, ?s 21:02, Everton Vieira escreveu: > > Em 20/02/2012, ?s 19:46, waldo kitty escreveu: > >> On 2/20/2012 10:59, Everton Vieira wrote: >>> Has been felt need for examples in the documentation. >> >> i haven't yet gotten to this stage of my stack of "round to its" (joke "getting around to it") and this seems ok time... not only are examples needed but also sample output... i have been digging in the help, as many know, trying to get back my "coding legs" and have found examples that didn't have any output so that one could see what the result would be with certain input... i've also seen examples that said something to the effect of "see this example over here" which took you to another help item that did actually have some example code that may or may not contain the topic you were looking at before... and again, there is the need for sample output from sample input... >> >> not only should these examples be in/on the wiki, but they should also be in the offline local documentation... > > Some parts of the wiki could be generated by the same database that could also generate the offline help. I`m not well aware of the development of the help system but i bet some is been done in this way. After all, is far well know the benefits of have centralized data. And i`m not aware how the help data are been stored, but if it is like a relational database then would be possible to store more than one example for each case, and more, should be store also who contributed with that example and when. Is important that the work of a friend be acknowledge. And that information should be elegantly showed on offline help and also online. Now, to make easy and secure that kind of contribution, i bet is a challenge.

Easy is about to click a button (or a link inside the help), login the account, and send the data.

And of course theres the noise that could be generated, but to prevent that is also about to make the means secured, and the login is something that helps in that.

And of course we should concern about the elegancy of the environment and none of this could be ugly.

Show quoted text 11 lines
> >> offline local documentation being the most important (IMhO)... >> >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >

Reply by email

Hans-Peter Diettrich
to waldo kitty: i haven't yet gotten to this stage of my stack of "round to its" (joke "getting around to…
Show quoted text 6 lines
On 2/20/2012 10:59, Everton Vieira wrote: > Has been felt need for examples in the documentation. not only should these examples be in/on the wiki, but they should also be in the offline local documentation... offline local documentation being the most important (IMhO)...

There exists an examples directory in your Lazarus installation.

While RTL and FCL topics can be demonstrated in simple console applications, LCL topics usually require big sample applications. See how e.g. examples/listview/listview.lpi demonstrates the capabilities of a TListView.

About things like callback functions, which are common to many components, there should exist references to examples that *also* demonstrate such features, amongst possibly many others.

Just an idea: It could help to "tag" the existing examples with keywords, so that a search in the examples directory could reveal all applicable examples. A keywords.txt or <project>.keys file in every subdirectory could be used for tagging, for a global search in the examples. A list of "registered" keywords could be kept in another file, e.g. in examples/tags.txt.

DoDi

Reply by email

waldo kitty
to Hans-Peter Diettrich
Hans-Peter Diettrich wrote 9 lines
waldo kitty schrieb: > On 2/20/2012 10:59, Everton Vieira wrote: >> Has been felt need for examples in the documentation. > not only should these examples be in/on the wiki, but they should also be in > the offline local documentation... offline local documentation being the most > important (IMhO)... There exists an examples directory in your Lazarus installation.

yes and i've been thru there but i'm speaking more of on the documentation side of the fence...

eg: http://www.freepascal.org/docs-html/rtl/sysutils/datetostr.html

there should be sample output and definitely something for the formatsettings... http://www.freepascal.org/docs-html/rtl/sysutils/tformatsettings.html definitely doesn't help and i spent hours digging in there (the site) trying to find something... i finally got to
http://www.freepascal.org/docs-html/rtl/sysutils/formatdatetime.html and found a little bit of help which i still had to guess at some stuff and i have *just now* noticed the link to
http://www.freepascal.org/docs-html/rtl/sysutils/formatchars.html which appears to offer more than what i had found before... but even that page needs some concrete alpha-numerical examples of what the output would look like...

While RTL and FCL topics can be demonstrated in simple console applications, LCL topics usually require big sample applications. See how e.g. examples/listview/listview.lpi demonstrates the capabilities of a TListView.

i see it, yes but i'm lost in all the other controls' code in there... running the project doesn't help me to understand a listview, either :? yes, i see the effect of some of the controls but, for example, it is not clear to me why i can select "new 1" or "New 2" but not "Sub 1"... neither is it clear to me what the items and columns tabs are for... i can't even get anything to react when i choose the columns tab and click about :(

About things like callback functions, which are common to many components, there should exist references to examples that *also* demonstrate such features, amongst possibly many others.

agreed... i think... but yes, everything should be documented that can be... even basic things like what a "callback" is... i see/hear that and i think telco stuff :(

Show quoted text 5 lines
Just an idea: It could help to "tag" the existing examples with keywords, so that a search in the examples directory could reveal all applicable examples. A keywords.txt or <project>.keys file in every subdirectory could be used for tagging, for a global search in the examples. A list of "registered" keywords could be kept in another file, e.g. in examples/tags.txt.

that might be ok but these examples like listview need some documentation explaining them a bit, too... as i wrote above, i get lost in all the other controls' code :?

Reply by email

Everton Vieira
to Everton Vieira: Easy is about to click a button (or a link inside the help), login the account, and send…

What the list thinks about this concepts:

* The benefits of have centralized data on the help.
* If it is like a relational database then would be possible to store more than one example for each case.
* Should be store also who contributed with that example and when.
* Is important that the work of a friend be acknowledge.
* That information should be elegantly showed on offline help and also online help.
* Make easy and secure that kind of contribution.
* Easy is about to click a button (or a link inside the help), login the account, and send the data.
* The noise that could be generated, to prevent that the login is something that helps.
* Take care of the elegancy of the environment and none of it could be ugly.

Everton Vieira wrote 38 lines
Em 20/02/2012, ?s 21:15, Everton Vieira escreveu: > > Em 20/02/2012, ?s 21:02, Everton Vieira escreveu: > >> >> Em 20/02/2012, ?s 19:46, waldo kitty escreveu: >> >>> On 2/20/2012 10:59, Everton Vieira wrote: >>>> Has been felt need for examples in the documentation. >>> >>> i haven't yet gotten to this stage of my stack of "round to its" (joke "getting around to it") and this seems ok time... not only are examples needed but also sample output... i have been digging in the help, as many know, trying to get back my "coding legs" and have found examples that didn't have any output so that one could see what the result would be with certain input... i've also seen examples that said something to the effect of "see this example over here" which took you to another help item that did actually have some example code that may or may not contain the topic you were looking at before... and again, there is the need for sample output from sample input... >>> >>> not only should these examples be in/on the wiki, but they should also be in the offline local documentation... >> >> Some parts of the wiki could be generated by the same database that could also generate the offline help. I`m not well aware of the development of the help system but i bet some is been done in this way. After all, is far well know the benefits of have centralized data. And i`m not aware how the help data are been stored, but if it is like a relational database then would be possible to store more than one example for each case, and more, should be store also who contributed with that example and when. Is important that the work of a friend be acknowledge. And that information should be elegantly showed on offline help and also online. > > Now, to make easy and secure that kind of contribution, i bet is a challenge. Easy is about to click a button (or a link inside the help), login the account, and send the data. And of course theres the noise that could be generated, but to prevent that is also about to make the means secured, and the login is something that helps in that. And of course we should concern about the elegancy of the environment and none of this could be ugly. > >> >>> offline local documentation being the most important (IMhO)... >>> >>> -- >>> _______________________________________________ >>> Lazarus mailing list >>> >>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> >

Reply by email

Hans-Peter Diettrich
to waldo kitty: yes and i've been thru there but i'm speaking more of on the documentation side of the…
Show quoted text 14 lines
eg: http://www.freepascal.org/docs-html/rtl/sysutils/datetostr.html there should be sample output and definitely something for the formatsettings... http://www.freepascal.org/docs-html/rtl/sysutils/tformatsettings.html definitely doesn't help and i spent hours digging in there (the site) trying to find something... i finally got to http://www.freepascal.org/docs-html/rtl/sysutils/formatdatetime.html and found a little bit of help which i still had to guess at some stuff and i have *just now* noticed the link to http://www.freepascal.org/docs-html/rtl/sysutils/formatchars.html which appears to offer more than what i had found before... but even that page needs some concrete alpha-numerical examples of what the output would look like...

Please suggest a pleasant solution. Perhaps a separate overview topic could be added, explaining the date and time formatting. "Using Dates and Times"...

Show quoted text 7 lines
> While RTL and FCL topics can be demonstrated in simple console > applications, LCL > topics usually require big sample applications. See how e.g. > examples/listview/listview.lpi demonstrates the capabilities of a > TListView. i see it, yes but i'm lost in all the other controls' code in there...

This example demonstrates the effects of various property settings, and how to access detailed information in code.

running the project doesn't help me to understand a listview, either :? yes, i see the effect of some of the controls but, for example, it is not clear to me why i can select "new 1" or "New 2" but not "Sub 1"...

A ListView is not a Grid.

neither is it clear to me what the items and columns tabs are for...

It should be obvious, from the buttons in those pages, that they demonstrate adding and removing items and columns.

i can't even get anything to react when i choose the columns tab and click about :(

The About menu shows information about the application, not help.

Again feel free to supply whatever you think would be better :-) Topic "Using ListView"?

Show quoted text 9 lines
> About things like callback functions, which are common to many > components, there > should exist references to examples that *also* demonstrate such > features, > amongst possibly many others. agreed... i think... but yes, everything should be documented that can be... even basic things like what a "callback" is... i see/hear that and i think telco stuff :(

Topic "Using Callbacks"?

DoDi

Reply by email

waldo kitty
to Hans-Peter Diettrich
Hans-Peter Diettrich wrote 18 lines
waldo kitty schrieb: > eg: http://www.freepascal.org/docs-html/rtl/sysutils/datetostr.html > > there should be sample output and definitely something for the > formatsettings... > http://www.freepascal.org/docs-html/rtl/sysutils/tformatsettings.html > definitely doesn't help and i spent hours digging in there (the site) trying > to find something... i finally got to > http://www.freepascal.org/docs-html/rtl/sysutils/formatdatetime.html and found > a little bit of help which i still had to guess at some stuff and i have *just > now* noticed the link to > http://www.freepascal.org/docs-html/rtl/sysutils/formatchars.html which > appears to offer more than what i had found before... but even that page needs > some concrete alpha-numerical examples of what the output would look like... Please suggest a pleasant solution. Perhaps a separate overview topic could be added, explaining the date and time formatting. "Using Dates and Times"...

that might be ok as long as it is prominent... i've been on several of those pages numerous times and the links just do not stand out in a very visible way... i was very surprised to find the link i did considering i had been back and forth to the previous page(s) containing ig a huge number of times :?

Show quoted text 8 lines
>> While RTL and FCL topics can be demonstrated in simple console applications, LCL >> topics usually require big sample applications. See how e.g. >> examples/listview/listview.lpi demonstrates the capabilities of a TListView. > > i see it, yes but i'm lost in all the other controls' code in there... This example demonstrates the effects of various property settings, and how to access detailed information in code.

so it is more than just a listview demonstrator?

Show quoted text 5 lines
> running the project doesn't help me to understand a listview, either :? yes, i > see the effect of some of the controls but, for example, it is not clear to me > why i can select "new 1" or "New 2" but not "Sub 1"... A ListView is not a Grid.

wotz a "grid"? remember, i do not have any delphi experience nor turbovision, really... i've always written straight forward, non-complicated apps and tools with no graphics or other things to slow processing or bloat unnecessarily... in other words, i've always written my code like a bikini... short and to the point ;)

> neither is it clear to me what the items and columns tabs are for... It should be obvious, from the buttons in those pages, that they demonstrate adding and removing items and columns.

yeah, i guess but...

> i can't even get anything to react when i choose the columns tab and click > about :( The About menu shows information about the application, not help.

nonononono... "click about" meaning "clicking on random stuff to try to figure it out"...

Again feel free to supply whatever you think would be better :-) Topic "Using ListView"?

i don't have any idea what to supply... it is all alien to me but i'm trying to learn it with the materials, what few they are, at hand... i don't even know why i would want to use a "grid" or "listview", TBH... what is their basic purpose? is this documented anywhere or is it all just "here! we can do this with that. ya got the code if ya wanna know more."

Show quoted text 8 lines
>> About things like callback functions, which are common to many components, there >> should exist references to examples that *also* demonstrate such features, >> amongst possibly many others. > > agreed... i think... but yes, everything should be documented that can be... > even basic things like what a "callback" is... i see/hear that and i think > telco stuff :( Topic "Using Callbacks"?

yes, i guess that would be ok as would one for listview and grid ;)

Reply by email