Count template parameters of method

2020-10-10 Thread Andrey via Digitalmars-d-learn
Hello, How to count a number of parameters in uninitialized template method? For example: struct Test { void abc(int a, bool status, string text)() {} { The method "Test.abc" has three template paramenters. I know that "TemplateArgsOf" exists but it is used only for INITIALIZED templa

Re: Docs generation example

2020-10-10 Thread Zekereth via Digitalmars-d-learn
On Saturday, 10 October 2020 at 02:07:02 UTC, Виталий Фадеев wrote: Wanted! Docs generation example. I have dub project, sources/*.d. I want html-index with all classes/functions. Is exists simple, hi-level, one-line command line solution ? The more official way is: dub build --build=docs Alt

Re: List of exceptions?

2020-10-10 Thread Imperatorn via Digitalmars-d-learn
On Saturday, 10 October 2020 at 20:32:22 UTC, DMon wrote: On Saturday, 10 October 2020 at 19:55:44 UTC, Ali Çehreli wrote: On 10/10/20 12:51 PM, DMon wrote: Thank you for your and Imperatorns time. Even if it did go in circles and get stuck in the mud. No problem. We're doing it out of free

Re: List of exceptions?

2020-10-10 Thread DMon via Digitalmars-d-learn
On Saturday, 10 October 2020 at 19:55:44 UTC, Ali Çehreli wrote: On 10/10/20 12:51 PM, DMon wrote: Thank you for your and Imperatorns time. Even if it did go in circles and get stuck in the mud.

Re: List of exceptions?

2020-10-10 Thread Ali Çehreli via Digitalmars-d-learn
On 10/10/20 12:51 PM, DMon wrote: > I will copy that down. > > The idea for specific exceptions came from the online docs and > Programing in D, 39.2 The try-catch statemet > > try > { // the code block that is being executed, where an // exception may be > thrown > } > catch (an_exception_type)

Re: List of exceptions?

2020-10-10 Thread DMon via Digitalmars-d-learn
On Saturday, 10 October 2020 at 18:16:45 UTC, Ali Çehreli wrote: On 10/10/20 9:16 AM, DMon wrote: > catch (Exception e) // implicit (any exception) > catch (ConvException f) // explicit (conversion only) > > Or is that not correct? I think in class hierarchies, "more general" and "more specifi

Re: Why does sum not work in static arrays?

2020-10-10 Thread mw via Digitalmars-d-learn
On Sunday, 6 December 2015 at 12:27:49 UTC, cym13 wrote: On Sunday, 6 December 2015 at 12:23:05 UTC, Tim K. wrote: Hi! I have the following code: int main(string[] argv) { import std.algorithm: sum; import std.stdio: writeln; uint[3] a1 = [1, 2, 3]; uint

Re: List of exceptions?

2020-10-10 Thread Ali Çehreli via Digitalmars-d-learn
On 10/10/20 9:16 AM, DMon wrote: > catch (Exception e) // implicit (any exception) > catch (ConvException f) // explicit (conversion only) > > Or is that not correct? I think in class hierarchies, "more general" and "more specific" are better terms. :) The answer is, catch by the most general

Re: Docs generation example

2020-10-10 Thread Guillaume Piolat via Digitalmars-d-learn
On Saturday, 10 October 2020 at 02:07:02 UTC, Виталий Фадеев wrote: Wanted! Docs generation example. I have dub project, sources/*.d. I want html-index with all classes/functions. Is exists simple, hi-level, one-line command line solution ? Alternatively: 1. Publish the 'blablah' package on t

Re: vibe.d / experience / feedback

2020-10-10 Thread Andre Pany via Digitalmars-d-learn
On Saturday, 10 October 2020 at 16:00:47 UTC, Alaindevos wrote: For a framework to be successful you need at least a minimum of sample code in public domain. For vibe it is none existent. I could not even find demo code doing a redirect which is the most basic stuff. The number of books on a fr

Re: List of exceptions?

2020-10-10 Thread DMon via Digitalmars-d-learn
On Saturday, 10 October 2020 at 16:37:23 UTC, Imperatorn wrote: On Saturday, 10 October 2020 at 12:12:35 UTC, DMon wrote: To clarify, do you want a list of *possible* exceptions, like in Java? Please. I've been looking and thinking that I'm over complicating it for myself so it may not be ne

Re: List of exceptions?

2020-10-10 Thread Imperatorn via Digitalmars-d-learn
On Saturday, 10 October 2020 at 12:12:35 UTC, DMon wrote: Is there a list of a list of the exceptions or what can be used with catch? I'm thinking that I missed it and there is something easier than breaking old code, scouring the site, or hypnotic regression. To clarify, do you want a list

Re: vibe.d / experience / feedback

2020-10-10 Thread Imperatorn via Digitalmars-d-learn
On Thursday, 1 October 2020 at 06:32:23 UTC, Robert M. Münch wrote: Hi, we are currently using vibe.d for a prototype and I want to post some experiences. I know one shouldn't only address the problems but provide some solutions. [...] Have you tried Diamond? https://code.dlang.org/packages

Re: List of exceptions?

2020-10-10 Thread DMon via Digitalmars-d-learn
On Saturday, 10 October 2020 at 16:00:26 UTC, Ali Çehreli wrote: On 10/10/20 8:46 AM, DMon wrote: On Saturday, 10 October 2020 at 14:56:31 UTC, Ali Çehreli wrote: On 10/10/20 5:12 AM, DMon wrote: Is there a list of a list of the exceptions or what can be used with catch? Only Throwable and c

Re: vibe.d / experience / feedback

2020-10-10 Thread Alaindevos via Digitalmars-d-learn
For a framework to be successful you need at least a minimum of sample code in public domain. For vibe it is none existent. I could not even find demo code doing a redirect which is the most basic stuff. The number of books on a framework is also an indication of the success after a few years.

Re: List of exceptions?

2020-10-10 Thread Ali Çehreli via Digitalmars-d-learn
On 10/10/20 8:46 AM, DMon wrote: On Saturday, 10 October 2020 at 14:56:31 UTC, Ali Çehreli wrote: On 10/10/20 5:12 AM, DMon wrote: Is there a list of a list of the exceptions or what can be used with catch? Only Throwable and classes that are derived from it can be thrown and caught. Ali

Re: List of exceptions?

2020-10-10 Thread DMon via Digitalmars-d-learn
On Saturday, 10 October 2020 at 14:56:31 UTC, Ali Çehreli wrote: On 10/10/20 5:12 AM, DMon wrote: Is there a list of a list of the exceptions or what can be used with catch? Only Throwable and classes that are derived from it can be thrown and caught. Ali Thanks for the reply. I am looki

Re: List of exceptions?

2020-10-10 Thread Ali Çehreli via Digitalmars-d-learn
On 10/10/20 5:12 AM, DMon wrote: Is there a list of a list of the exceptions or what can be used with catch? I'm thinking that I missed it and there is something easier than breaking old code, scouring the site, or hypnotic regression. Only Throwable and classes that are derived from it can b

Re: Win32Api GetDlgItemText How make buffer with no fixed size?

2020-10-10 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 10 October 2020 at 10:15:03 UTC, Marcone wrote: wchar[100] buffer; // I don't want fixed size :( wchar[] buffer; // no fixed size buffer.length = GetWindowTextLength(hwn); // set it to the text length of the window // now get the text GetDlgItemText(hwn, widget, buffer.ptr, buf

List of exceptions?

2020-10-10 Thread DMon via Digitalmars-d-learn
Is there a list of a list of the exceptions or what can be used with catch? I'm thinking that I missed it and there is something easier than breaking old code, scouring the site, or hypnotic regression.

Win32Api GetDlgItemText How make buffer with no fixed size?

2020-10-10 Thread Marcone via Digitalmars-d-learn
wchar[100] buffer; // I don't want fixed size :( GetDlgItemText(hwn, widget, buffer.ptr, buffer.sizeof);

Re: Docs generation example

2020-10-10 Thread Виталий Фадеев via Digitalmars-d-learn
On Saturday, 10 October 2020 at 05:04:54 UTC, Anonymouse wrote: On Saturday, 10 October 2020 at 02:07:02 UTC, Виталий Фадеев wrote: Wanted! Docs generation example. I have dub project, sources/*.d. I want html-index with all classes/functions. Is exists simple, hi-level, one-line command line