On Wednesday, 10 November 2021 at 19:23:44 UTC, Chris Bare wrote:
What am I missing?
I figured out part of it. In the html input element the name has
to be employeeform.first_name.
but now I get a different error: Error handling field
'employeeform.id': Missing form field.
I tried declaring
I know I can do this manually by looking at HTTPServerRequest
req, but the documentation for registerWebInterface sounds like
there's an automatic way to do this.
```
required/>
required/>
```
```d
struct Employee
{
long id;
string first_name;
@string last_name
On Saturday, 6 November 2021 at 19:51:09 UTC, Adam Ruppe wrote:
On Saturday, 6 November 2021 at 19:45:49 UTC, Chris Bare wrote:
dbForeignKey!(Position)
static if(is(T == dbForeignKey!Arg, Arg)) {
// use Arg here
}
Thanks, that did it.
In the example below, one of the attributes is
@dbForeignKey!Position. pragma (msg, attr) gives me:
dbForeignKey!(Position). I want to be able to extract the Postion
as a type so I can call another template like: save!Position ();
Is this possible?
```d
import std.stdio;
import std.traits;
im
On Saturday, 13 February 2021 at 01:21:56 UTC, Steven
Schveighoffer wrote:
On 2/12/21 6:22 PM, Chris Bare wrote:
[...]
Does @ignore work? That's a UDA that tells vibe to ignore the
field. Though I don't know if it means it leaves it alone
completely.
https://vibed.org/api/vibe.data.seriali
I'm working on a project with vibe.d and ddbc to access my
database.
Both have powerful functions that operate on Struct types to
avoid a lot of boilerplate code.
I have a web site that sends a json message to update a record.
deserializeJson creates a new Foo record containing the json data.
Ho
I'm missing something about the way associative arrays are
allocated.
In the example below, case 1 and case 2 seem to be the same, a
type indexed by a long.
Case 2 fails with a Range violation.
Can someone explain the difference?
I found a work around (or the correct way) in case 3.
struct Pro
auto matches = matchAll(str, searchRegex);
foreach (m; matches) // this walks the list forward
I tried:
foreach_reverse (m; matches)
foreach (m; reverse (matches))
foreach (m; retro (matches))
and they all failed to compile.
I also tried to index matches (matches[i]) but that does not work
eit
I think I finally figured it out.
I think the GTKapplication shutdown signal is called after the
window has been destroyed.
If I attach a handler to the window's destroy signal, then I am
able to get the data from the sourceView.
Weird, the code does work in my program during startup, but when
I call the same function from Application.onShutdown it gets the
0 results.
Are the widgets destroyed before onShutdown?
Here's a stripped down version my Application subclass:
int
main (string[] args)
{
auto applicatio
I would have posted this in the Gtkd forum, but it has been down
for a while.
I'm porting a GTK2/C program to Gtkd. I'm trying to read the data
from a GtkSourceView, but when I try to get the bounds, it's
always zero.
Here's the c version that works:
GtkSourceBuffer *bf;
GtkT
I have a file in xdr format and I'm trying to use the xdr module
from dub.
After a lot of failures, I got this to work:
ubyte[] b2 = cast (ubyte[]) read(fname);
string n = cast (string) b2.get!string();
tracef("<%s>", n);
I feel like there should be a way for the xdr get to read
di
If I have:
class base
{
void delegate(base) stored_dg;
void
add_function (void delegate (base) dlg)
{
stored_dg = dlg;
}
}
class A : base
{
this ()
{
super ();
add_function (&this.foo);
}
void foo (A a)
{
log ("i got here")
13 matches
Mail list logo