On Friday, 22 May 2020 at 19:19:19 UTC, Arsium wrote:
Just I tried to launch those functions from win32 api and seems
doesn't work
"doesn't work" isn't very helpful. Are you seeing compiler
errors? Linker errors? Runtime errors? Please describe your
problem.
On 5/22/20 5:39 PM, Vinod K Chandran wrote:
On Friday, 22 May 2020 at 20:51:20 UTC, Steven Schveighoffer wrote:
On 5/22/20 4:04 PM, Vinod K Chandran wrote:
[...]
Yes. What you cannot do is this (which I hope doesn't compile in
VB.net, but I wouldn't be surprised):
Dim sampleList As New
On Fri, May 22, 2020 at 09:39:16PM +, Vinod K Chandran via
Digitalmars-d-learn wrote:
[...]
> So in the same manner, i want
> void function(Base) = fnPtr wiil work with
> void function(Child)
You cannot, because that's type unsafe:
class Base {}
class Derived : Base {
On Friday, 22 May 2020 at 20:51:20 UTC, Steven Schveighoffer
wrote:
On 5/22/20 4:04 PM, Vinod K Chandran wrote:
[...]
Yes. What you cannot do is this (which I hope doesn't compile
in VB.net, but I wouldn't be surprised):
Dim sampleList As New List(Of Child)
sampleList.Add(New Base(10))
On Fri, May 22, 2020 at 08:55:45PM +, Vinod K Chandran via
Digitalmars-d-learn wrote:
> On Friday, 22 May 2020 at 20:06:20 UTC, Adam D. Ruppe wrote:
> > On Friday, 22 May 2020 at 20:04:24 UTC, Vinod K Chandran wrote:
> > > sampleList.Add(New Child(10.5)) Is this possible in D without
> > >
On Fri, May 22, 2020 at 08:25:24PM +, bauss via Digitalmars-d-learn wrote:
> Is there anyway to use the "to" template from std.conv but as nothrow?
[...]
There's std.conv.parse, though the interface is somewhat awkward, and it
only works with character ranges.
T
--
I'm still trying to
On Friday, 22 May 2020 at 20:06:20 UTC, Adam D. Ruppe wrote:
On Friday, 22 May 2020 at 20:04:24 UTC, Vinod K Chandran wrote:
sampleList.Add(New Child(10.5)) Is this possible in D without
casting ?
Direct translation of this code works just fine in D.
Yeah, my bad. I just checked in D. But
On 5/22/20 4:04 PM, Vinod K Chandran wrote:
On Friday, 22 May 2020 at 16:12:12 UTC, Steven Schveighoffer wrote:
On 5/22/20 9:10 AM, Vinod K Chandran wrote:
On Friday, 22 May 2020 at 12:21:25 UTC, rikki cattermole wrote:
if (Child child = cast(Child)parent) {
assert(child !is null);
}
Is there anyway to use the "to" template from std.conv but as
nothrow?
Having it throw exceptions is not always acceptable because it's
generally expensive.
Something that attempted to convert would be far more fesible.
Is there anything like that?
Ex. from C# there's int.TryParse etc.
On Friday, 22 May 2020 at 20:04:24 UTC, Vinod K Chandran wrote:
sampleList.Add(New Child(10.5)) Is this possible in D without
casting ?
Direct translation of this code works just fine in D.
On Friday, 22 May 2020 at 16:12:12 UTC, Steven Schveighoffer
wrote:
On 5/22/20 9:10 AM, Vinod K Chandran wrote:
On Friday, 22 May 2020 at 12:21:25 UTC, rikki cattermole wrote:
if (Child child = cast(Child)parent) {
assert(child !is null);
}
Actually, problem occurs in addHandler
Just I tried to launch those functions from win32 api and seems
doesn't work
Here is my code
module D_Programming_Test;
import core.sys.windows.windows;
pragma(lib, "ntdll.lib");
alias extern(C) int function(string[] args) MainFunc;
extern (C) int _d_run_main(int argc, char **argv,
There is automem to help with manual memory management
https://code.dlang.org/packages/automem
On 5/22/20 9:10 AM, Vinod K Chandran wrote:
On Friday, 22 May 2020 at 12:21:25 UTC, rikki cattermole wrote:
if (Child child = cast(Child)parent) {
assert(child !is null);
}
Actually, problem occurs in addHandler function. It expects an argument
of type "EventArgs", not MouseEventArgs.
On Friday, 22 May 2020 at 12:21:25 UTC, rikki cattermole wrote:
if (Child child = cast(Child)parent) {
assert(child !is null);
}
Actually, problem occurs in addHandler function. It expects an
argument of type "EventArgs", not MouseEventArgs.
if (Child child = cast(Child)parent) {
assert(child !is null);
}
Hi all,
I have a windows gui setup like this;
class EventArgs {} \\ Base class for all messages
class MouseEventArgs : EventArgs { // child class for handling
mouse messages
...
int x;
int y;
this(WPARAM wpm, LPARAM lpm){
this.x = xFromLparam(lpm);
this.y =
On Friday, 22 May 2020 at 06:10:38 UTC, Atwork wrote:
Is it possible to mix fibers with sockets from phobos?
If so, how would I do it?
Like just a simple example of async sockets using fibers in D.
I will say that I'd prefer to not use any packages ex. vibe.d
Yes you can mix std sockets
On Thursday, 21 May 2020 at 17:19:10 UTC, Konstantin wrote:
Hi all! I will try to ask again(previous two posts still have
no answers) : are there any site/page/docs somewhere to track
actual info about @nogc support in language itself and in
phobos library? Or, at least plans to extend such
Is it possible to mix fibers with sockets from phobos?
If so, how would I do it?
Like just a simple example of async sockets using fibers in D.
I will say that I'd prefer to not use any packages ex. vibe.d
20 matches
Mail list logo