The Wiki has this example of creating a map for a JSON "object".
$map := new collection("id"; ->[contacts]id; "name";
->[contacts]fullname; "recnum"; ->[contacts]; "company"; ->[company]name)
I'm learning Ext. As a sample project I'm reworking a status page that
is currently generated by Active4D.
In less than a day I've developed something that is really nice and am
now tweaking it.
I've defined a map like this.
$map := new collection("id" ;
->[Mail_Queued_Messages]ID; \\
"status" ;
->[Mail_Queued_Messages]Message_Sent; \\
"error" ;
->[Mail_Queued_Messages]Message_ErrorCode; \\
"queued_on" ;
->[Mail_Queued_Messages]Message_QueuedDTS; \\
"last_sent_on" ;
->[Mail_Queued_Messages]Message_LastSentDTS; \\
"subject" ;
->[Mail_Queued_Messages]Message_Subject )
Note the Message_ErrorCode field. That stores an longint error value
returned from 4DIC, if one is returned upon SMTP_Send.
In my old pages I display 4DIC's error string for that numeric error
code. I'd like to do the same here.
Is there a straightforward way that I can pass a function to new
collection the when I create my $map, so that the "error" would contain
the error string instead of the numeric code?
Thanks,
Brad
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/