Can VW7.2 call VB 6 or a .NET DLL

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Can VW7.2 call VB 6 or a .NET DLL

Dmytryk, Igor
Can VW7.2 call VB 6 or a .NET DLL

Can anyone confirm that VW7.2 can connect with a .NET dll?

Also...is there VW7.2 documentation for this?

Thanks,

Igor Dmytryk

Reply | Threaded
Open this post in threaded view
|

AW: Can VW7.2 call VB 6 or a .NET DLL

Nowak, Helge
Can VW7.2 call VB 6 or a .NET DLL
Dear Igor,
 
to communicate with a .NET application you have several options:
- web services
- COM Connect if your VB app offers a COM interface or can use the .NET-COM bridge (of help could be to use the third party add-on tool to Com Connect JOOPS SmallCOM/X http://www.joops.com/)
- DotNetConnect which is shipped with VisualWorks 7.2 as a beta (see the preview directory)
 
HTH
Helge


Von: Dmytryk, Igor [mailto:[hidden email]]
Gesendet: Dienstag, 17. Juli 2007 18:09
An: vwnc-list
Betreff: Can VW7.2 call VB 6 or a .NET DLL

Can anyone confirm that VW7.2 can connect with a .NET dll?

Also...is there VW7.2 documentation for this?

Thanks,

Igor Dmytryk

Reply | Threaded
Open this post in threaded view
|

Re: Can VW7.2 call VB 6 or a .NET DLL

Carl Gundel
In reply to this post by Dmytryk, Igor

-Carl Gundel, author of Liberty BASIC
http://www.libertybasic.com
----- Original Message -----
From: "Dmytryk, Igor" <[hidden email]>
To: "vwnc-list" <[hidden email]>
Sent: Tuesday, July 17, 2007 12:08 PM
Subject: Can VW7.2 call VB 6 or a .NET DLL


Can anyone confirm that VW7.2 can connect with a .NET dll?

Also...is there VW7.2 documentation for this?

Thanks,

Igor Dmytryk


Reply | Threaded
Open this post in threaded view
|

[7.4.1]Problem sending email using SMTP

Carl Gundel
In reply to this post by Dmytryk, Igor
When sending a message using:

mail := Net.MailMessage new.
mail
    from: '[hidden email]';
    to: toEmail;
    bcc: '[hidden email]';
    subject: subject;
    text: message.
mail send

I got the following error.

  Failed to encode the body source with: 'us-ascii'

The culprit seems to be the following word in the message body.

  François

So, what should I do to fix this?

-Carl Gundel
http://www.runbasic.com 


Reply | Threaded
Open this post in threaded view
|

Re: Can VW7.2 call VB 6 or a .NET DLL

Carl Gundel
In reply to this post by Carl Gundel
Whoops.  I didn't mean to reply to Igor's post, sorry.

-Carl

----- Original Message -----
From: "Carl Gundel" <[hidden email]>
To: "Dmytryk, Igor" <[hidden email]>; "vwnc-list" <[hidden email]>
Sent: Tuesday, July 17, 2007 8:14 PM
Subject: Re: Can VW7.2 call VB 6 or a .NET DLL


>
> -Carl Gundel, author of Liberty BASIC
> http://www.libertybasic.com
> ----- Original Message -----
> From: "Dmytryk, Igor" <[hidden email]>
> To: "vwnc-list" <[hidden email]>
> Sent: Tuesday, July 17, 2007 12:08 PM
> Subject: Can VW7.2 call VB 6 or a .NET DLL
>
>
> Can anyone confirm that VW7.2 can connect with a .NET dll?
>
> Also...is there VW7.2 documentation for this?
>
> Thanks,
>
> Igor Dmytryk
>
>
>

Reply | Threaded
Open this post in threaded view
|

RE: [7.4.1]Problem sending email using SMTP

Boris Popov, DeepCove Labs (SNN)
In reply to this post by Carl Gundel
Don't have that handy in front of me, but I seem to recall seeing #charset: on messages.

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

> -----Original Message-----
> From: Carl Gundel [mailto:[hidden email]]
> Sent: Tuesday, July 17, 2007 5:23 PM
> To: vwnc-list
> Subject: [7.4.1]Problem sending email using SMTP
>
> When sending a message using:
>
> mail := Net.MailMessage new.
> mail
>     from: '[hidden email]';
>     to: toEmail;
>     bcc: '[hidden email]';
>     subject: subject;
>     text: message.
> mail send
>
> I got the following error.
>
>   Failed to encode the body source with: 'us-ascii'
>
> The culprit seems to be the following word in the message body.
>
>   François
>
> So, what should I do to fix this?
>
> -Carl Gundel
> http://www.runbasic.com
>

Reply | Threaded
Open this post in threaded view
|

Re: [7.4.1]Problem sending email using SMTP

Victor-67
In reply to this post by Carl Gundel
Where can I read documentation about this stuff?

Victor

===========================================================

Carl Gundel wrote:

> When sending a message using:
>
> mail := Net.MailMessage new.
> mail
>    from: '[hidden email]';
>    to: toEmail;
>    bcc: '[hidden email]';
>    subject: subject;
>    text: message.
> mail send
>
> I got the following error.
>
>  Failed to encode the body source with: 'us-ascii'
>
> The culprit seems to be the following word in the message body.
>
>  François
>
> So, what should I do to fix this?
>
> -Carl Gundel
> http://www.runbasic.com
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [7.4.1]Problem sending email using SMTP

Roland Wagener
In reply to this post by Boris Popov, DeepCove Labs (SNN)
The following snippet is derived from one of our apps:

        (Net.MailMessage newTextPlain)
                charset: Net.MimeTypeDescriptor iso8859x1;
                subject: 'Umlaut Email';
                text: '<myText with european umlauts öäüéè>';
                yourself.

As Boris pointed out, the charset: message does the trick. However, for
asian languages, the example is still not appropriate!

Good luck

Roland
--
Roland Wagener * Senior Consultant * [hidden email]
Tel: x49-231-9 75 99-26   Fax: x49-231-9 75 99-20
Georg Heeg eK Dortmund
Handelsregister: Amtsgericht Dortmund  A 12812


Boris Popov schrieb:
> Don't have that handy in front of me, but I seem to recall seeing #charset: on messages.
>
> -Boris
>

Reply | Threaded
Open this post in threaded view
|

Re: [7.4.1]Problem sending email using SMTP

Carl Gundel
Thanks.  That does get rid of the error, but it also gets rid of all the
formatting.  Now the message arrives as a single line of text.  :-/

-Carl Gundel
http://www.runbasic.com

----- Original Message -----
From: "Roland Wagener" <[hidden email]>
The following snippet is derived from one of our apps:

(Net.MailMessage newTextPlain)
charset: Net.MimeTypeDescriptor iso8859x1;
subject: 'Umlaut Email';
text: '<myText with european umlauts öäüéè>';
yourself.

As Boris pointed out, the charset: message does the trick. However, for
asian languages, the example is still not appropriate!

Good luck

Roland


Reply | Threaded
Open this post in threaded view
|

Re: [7.4.1]Problem sending email using SMTP

Roland Wagener
OK, but you can extend your email by implementing the tiny method
'buildHtmlBody' (;-) and then use the following:

(Net.MailMessage newTextHTML)
        charset: Net.MimeTypeDescriptor iso8859x1;
        subject: 'Umlaut Email';
        text: self buildHtmlBody;
        yourself.

Roland
--
Roland Wagener * Senior Consultant * [hidden email]
Tel: x49-231-9 75 99-26   Fax: x49-231-9 75 99-20
Georg Heeg eK Dortmund
Handelsregister: Amtsgericht Dortmund  A 12812


Carl Gundel schrieb:

> Thanks.  That does get rid of the error, but it also gets rid of all the
> formatting.  Now the message arrives as a single line of text.  :-/
>
> -Carl Gundel
> http://www.runbasic.com
>
> ----- Original Message ----- From: "Roland Wagener" <[hidden email]>
> The following snippet is derived from one of our apps:
>
> (Net.MailMessage newTextPlain)
> charset: Net.MimeTypeDescriptor iso8859x1;
> subject: 'Umlaut Email';
> text: '<myText with european umlauts öäüéè>';
> yourself.
>
> As Boris pointed out, the charset: message does the trick. However, for
> asian languages, the example is still not appropriate!
>
> Good luck
>
> Roland
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [7.4.1]Problem sending email using SMTP

kobetic
In reply to this post by Victor-67
There is the doc/NetClientDevGuide.pdf, but it's quickly getting out of date, especially with the recent "streaming" improvements throughout the MIME and HTTP frameworks. I'd like to move most of that content into the package comments and start updating it there. There's already some of it on recent versions of MIME package, but that's just a start. There's also a number of updates and examples in the class comments as well. The updates started with the HTTP changes in 7.5 and MIME and Mail changes coming in the next version of VW (also available immediately in the public repository).

Martin

Victor wrote:

> Where can I read documentation about this stuff?
>
> Victor
>
> ===========================================================
>
> Carl Gundel wrote:
>> When sending a message using:
>>
>> mail := Net.MailMessage new.
>> mail
>>    from: '[hidden email]';
>>    to: toEmail;
>>    bcc: '[hidden email]';
>>    subject: subject;
>>    text: message.
>> mail send
>>
>> I got the following error.
>>
>>  Failed to encode the body source with: 'us-ascii'
>>
>> The culprit seems to be the following word in the message body.
>>
>>  François
>>
>> So, what should I do to fix this?
>>
>> -Carl Gundel
>> http://www.runbasic.com
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [7.4.1]Problem sending email using SMTP

Carl Gundel
In reply to this post by Roland Wagener
I think I see what you're saying, but why should this be necessary?

Thanks,

-Carl Gundel
http://www.runbasic.com

From: "Roland Wagener" <[hidden email]>


OK, but you can extend your email by implementing the tiny method
'buildHtmlBody' (;-) and then use the following:

(Net.MailMessage newTextHTML)
charset: Net.MimeTypeDescriptor iso8859x1;
subject: 'Umlaut Email';
text: self buildHtmlBody;
yourself.


Carl Gundel schrieb:
> Thanks.  That does get rid of the error, but it also gets rid of all the
> formatting.  Now the message arrives as a single line of text.  :-/
>

Reply | Threaded
Open this post in threaded view
|

Re: [7.4.1]Problem sending email using SMTP

Roland Wagener
This way, you can format your email body in more complex ways. The
plainText version should only allow SPACE, CR and TAB for formatting
(OK, I mean the respective characters from the ASCII charSet). At least
that was my assumption!

Roland
--
Roland Wagener * Senior Consultant * [hidden email]
Tel: x49-231-9 75 99-26   Fax: x49-231-9 75 99-20
Georg Heeg eK Dortmund
Handelsregister: Amtsgericht Dortmund  A 12812


Carl Gundel schrieb:

> I think I see what you're saying, but why should this be necessary?
>
> Thanks,
>
> -Carl Gundel
> http://www.runbasic.com
>
> From: "Roland Wagener" <[hidden email]>
>
>
> OK, but you can extend your email by implementing the tiny method
> 'buildHtmlBody' (;-) and then use the following:
>
> (Net.MailMessage newTextHTML)
> charset: Net.MimeTypeDescriptor iso8859x1;
> subject: 'Umlaut Email';
> text: self buildHtmlBody;
> yourself.
>
>
> Carl Gundel schrieb:
>> Thanks.  That does get rid of the error, but it also gets rid of all
>> the formatting.  Now the message arrives as a single line of text.  :-/
>>
>
>

Reply | Threaded
Open this post in threaded view
|

RE: [7.4.1]Problem sending email using SMTP

Stew MacLean
I took a brute force approach for sending logs: (the VW copyright
character causes the same error)...

CharacterArray>>encodedAs: anEncoding

        "Trap out-of-encoding characters and replace them with ?'s."

        | stream |

        stream :=
                ((ByteArray new: self size) withEncoding: anEncoding)
                        writeStream.
        [stream nextPutAll: self] on: UnsupportedCharacterError
                do:
                        [: ex |
                        stream nextPut: $?.
                        ex resume].

        ^stream encodedContents


...
        message := Net.MailMessage newTextPlain.
        text := aText asString encodedAs: 'ascii'.
...

Cheers,

Stewart


>-----Original Message-----
>From: Roland Wagener [mailto:[hidden email]]
>Sent: 19 July 2007 7:25 p.m.
>To: Carl Gundel
>Cc: vwnc-list
>Subject: Re: [7.4.1]Problem sending email using SMTP
>
>This way, you can format your email body in more complex ways. The
>plainText version should only allow SPACE, CR and TAB for formatting
>(OK, I mean the respective characters from the ASCII charSet). At least
>that was my assumption!
>
>Roland
>--
>Roland Wagener * Senior Consultant * [hidden email]
>Tel: x49-231-9 75 99-26   Fax: x49-231-9 75 99-20
>Georg Heeg eK Dortmund
>Handelsregister: Amtsgericht Dortmund  A 12812
>
>
>Carl Gundel schrieb:
>> I think I see what you're saying, but why should this be necessary?
>>
>> Thanks,
>>
>> -Carl Gundel
>> http://www.runbasic.com
>>
>> From: "Roland Wagener" <[hidden email]>
>>
>>
>> OK, but you can extend your email by implementing the tiny method
>> 'buildHtmlBody' (;-) and then use the following:
>>
>> (Net.MailMessage newTextHTML)
>> charset: Net.MimeTypeDescriptor iso8859x1;
>> subject: 'Umlaut Email';
>> text: self buildHtmlBody;
>> yourself.
>>
>>
>> Carl Gundel schrieb:
>>> Thanks.  That does get rid of the error, but it also gets rid of all
>>> the formatting.  Now the message arrives as a single line of text.
:-/
>>>
>>
>>



Reply | Threaded
Open this post in threaded view
|

Re: [7.4.1]Problem sending email using SMTP

Carl Gundel
In reply to this post by Roland Wagener
Flexibility is great, but the most common cases should just work out of the
box.  I can't see any reason why I should need to be sending mail in HTML
format just to combine non US characters and line breaks.  This should be
fixed.

-Carl Gundel
http://www.runbasic.com

From: "Roland Wagener" <[hidden email]>

> This way, you can format your email body in more complex ways. The
> plainText version should only allow SPACE, CR and TAB for formatting (OK,
> I mean the respective characters from the ASCII charSet). At least that
> was my assumption!
>
> Carl Gundel schrieb:
>> I think I see what you're saying, but why should this be necessary?
>>
>> Thanks,
>>
>> -Carl Gundel
>> http://www.runbasic.com
>>
>> From: "Roland Wagener" <[hidden email]>
>>
>>
>> OK, but you can extend your email by implementing the tiny method
>> 'buildHtmlBody' (;-) and then use the following:
>>
>> (Net.MailMessage newTextHTML)
>> charset: Net.MimeTypeDescriptor iso8859x1;
>> subject: 'Umlaut Email';
>> text: self buildHtmlBody;
>> yourself.
>>
>>
>> Carl Gundel schrieb:
>>> Thanks.  That does get rid of the error, but it also gets rid of all the
>>> formatting.  Now the message arrives as a single line of text.  :-/


Reply | Threaded
Open this post in threaded view
|

RE: [7.4.1]Problem sending email using SMTP

Kogan, Tamara
I am wondering if this code will work for you.

        message := Net.MailMessage new
                from: '"xx"<[hidden email]>';
                to:  '"yy"<[hidden email]>';
                subject: 'document';
                yourself.
        part := MimeEntity newTextPlain.
        part
                charset: 'utf-8';
                contents: 'Božidar Šlapetko Cincom(tm)';
                addContentTransferEncoding: 'base64'.
        message addPart: part.
        stream := ((ByteArray new: 1024) withEncoding: #ISO8859_1) readWriteStream lineEndCRLF.
        message writeOn: stream.
        stream reset; contents

Tamara Kogan
Smalltalk development,
Cincom Systems

> -----Original Message-----
> From: Carl Gundel [mailto:[hidden email]]
> Sent: Thursday, July 19, 2007 8:47 AM
> To: vwnc-list
> Subject: Re: [7.4.1]Problem sending email using SMTP
>
> Flexibility is great, but the most common cases should just work out of
> the
> box.  I can't see any reason why I should need to be sending mail in HTML
> format just to combine non US characters and line breaks.  This should be
> fixed.
>
> -Carl Gundel
> http://www.runbasic.com
>
> From: "Roland Wagener" <[hidden email]>
> > This way, you can format your email body in more complex ways. The
> > plainText version should only allow SPACE, CR and TAB for formatting
> (OK,
> > I mean the respective characters from the ASCII charSet). At least that
> > was my assumption!
> >
> > Carl Gundel schrieb:
> >> I think I see what you're saying, but why should this be necessary?
> >>
> >> Thanks,
> >>
> >> -Carl Gundel
> >> http://www.runbasic.com
> >>
> >> From: "Roland Wagener" <[hidden email]>
> >>
> >>
> >> OK, but you can extend your email by implementing the tiny method
> >> 'buildHtmlBody' (;-) and then use the following:
> >>
> >> (Net.MailMessage newTextHTML)
> >> charset: Net.MimeTypeDescriptor iso8859x1;
> >> subject: 'Umlaut Email';
> >> text: self buildHtmlBody;
> >> yourself.
> >>
> >>
> >> Carl Gundel schrieb:
> >>> Thanks.  That does get rid of the error, but it also gets rid of all
> the
> >>> formatting.  Now the message arrives as a single line of text.  :-/
>