Re: [Mono-list] Cannot find assembly `nunit.framework.dll'

2006-06-07 Thread A Rafael D Teixeira
Hi Professor Boykin, comments inlined

On Wed, 2006-06-07 at 11:20 -0400, P. Oscar Boykin wrote:
> I am running Debian unstable with libnunit2.2.6-cil and mono 1.1.13.6.
> 
> I have nunit.framework.dll installed:
> 
> -rw-r--r-- 1 root root 29184 Apr 30
> 13:44 
> /usr/lib/mono/gac/nunit.framework/2.2.8.0__96d09a1eb7f44a77/nunit.framework.dll
>  
> 
> The GAC seems to know about it:
> 
> gacutil -l | grep nunit
> nunit.core, Version=2.2.8.0, Culture=neutral,
> PublicKeyToken=96d09a1eb7f44a77
> nunit.framework, Version=2.2.8.0, Culture=neutral,
> PublicKeyToken=96d09a1eb7f44a77
> nunit.util, Version=2.2.8.0, Culture=neutral,
> PublicKeyToken=96d09a1eb7f44a77
> 
> But when I try to compile a program using "-r: nunit.framework.dll" it
> does not work:
> 
> ===
> mcs -t:library *.cs -out:testout.dll -define:BRUNET_NUNIT -
> r:nunit.framework.dll
> error CS0006: Cannot find assembly `nunit.framework.dll'
> Log:
> 
> Compilation failed: 1 error(s), 0 warnings 
> ===
> If I by-pass the GAC, it works:
> 
> ===
> mcs -t:library *.cs -out:pob_test.dll -define:BRUNET_NUNIT -
> r:/usr/lib/mono/gac/nunit.framework/2.2.8.0__96d09a1eb7f44a77/nunit.framework.dll
> ConnectToMessage.cs (294,24): warning CS0219: The variable `ctm3a' is
> assigned but its value is never used
> ConnectionTable.cs(1121,26): warning CS0168: The variable `c' is
> declared but never used
> ConnectionTable.cs(1128,26): warning CS0168: The variable `c' is
> declared but never used 
> ConnectionTable.cs(1134,26): warning CS0168: The variable `c' is
> declared but never used
> Compilation succeeded - 4 warning(s)
> ===
> 
> Am I misunderstanding the role of the GAC?  

Surely yes. The GAC is a runtime-only repository for common managed
dlls.

> Shouldn't I be able to do -r: to reference assemblies there? 

No, you can't do that in .NET, and you can't do that (without that
hacked full GAC path). 

In VS.NET, for instance, when someone adds a "reference" to a library,
it has to navigate to an instance of its dll (not needed for the core
framework libs that IDE knows where to find), and the IDE copies the dll
to your project folder so that during compilation it can use that copy.
It boils down to an enforced policy to guarantee versioning, so that
side-by-side installation of multiple versions of the referenced library
is possible because they coexist peacefully.
> 
> Am I doing something incorrectly?

You need to have the original non-GACed dll somewhere you can point to
in the command line, or where the compiler automatically looks for it:
in the current dir or in the dir that contains the compiler and core
framework libraries.

Nunit libs, when correctly installed, are normally copied to where mono
core libs live and then GACed. (Our GAC implementation moves it to its
own directories and leave a symbolic link in the original place, except
on Windows that lacks symlinks, where I believe a copy is made instead
of a move).

If the Nunit package (I'm thinking about the one Mono packages) was
installed to a different prefix than Mono, the libs can't be
automatically found by the compiler, and a full path (not the GAC one)
must be given in the compiler command line or the libs need to be copied
to the directory where the compilation is taking place.

:)

> -- 
> P. Oscar Boykinhttp://boykin.acis.ufl.edu
> Assistant Professor, Department of Electrical and Computer
> Engineering 
> University of Florida 

Hope it helps,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://thespoke.net/blogs/monoman/default.aspx
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] RE: target:winexe in MonoDevelop WAS: where is System.Windows.Forms ?

2006-04-27 Thread A Rafael D Teixeira
On Thu, 2006-04-27 at 15:13 +0200, [EMAIL PROTECTED] wrote:
> Hi Robert,
> 
> >You have to supply the appropriate target:
> >
> >mcs -target:winexe ...
> Thanks for the hint. The question for me now is: How would I do this?
> I tried to ask Mr Google, but he has no answer for me.
> 
> Is it a porpertie in the preferences of MonoDevelop?
> 
> Thanks
> Rainer

Hi Rainer,

Click the right mouse button on the project node on the tree, and choose
"Options".

For each configuration in the Configurations sub-tree of the dialog that
appears, go to the Code Generation node and change the "Compile Target"
setting as you may need.

This is a per-project property as each project must produce a single
managed file, of one of the 4 types allowed. Projects that generate
libraries are then able to be referenced from other projects in the
solution.

Hope it helps,

:)


-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://thespoke.net/blogs/monoman/default.aspx
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] MySQL Connector/NET vs Mono

2005-09-08 Thread A Rafael D Teixeira
AFAIK, the p/invokes are there but there is logic to guarantee that they
are only called when the platform is Windows, so they don't cause any
adverse effect when run on Linux/MacOSX with Mono.

:)

 
On Thu, 2005-09-08 at 07:55 -0700, Joe Audette wrote:
> I have been using the MySQL Connector in mono for
> quite a while with no trouble at all in my project at
> http://www.mojoportal.com
> 
> I compile it on Windows and deploy it to the bin
> folder of my web on linux and it works fine for me. I
> don't think I am using the very latest version of the
> Connector though, I think I am only 1 version behind
> the current Connector release.
> 
> Hope it helps,
> 
> Joe
> 
> --- Brion Vibber <[EMAIL PROTECTED]> wrote:
> 
> > The documentation at
> > http://www.mono-project.com/MySQL strongly suggests
> > that MySQL's Connector/NET should be used in
> > preference to the ByteFX
> > driver that ships with Mono.
> > 
> > However the current release of MySQL Connector/NET
> > (1.0.5) appears to be
> > Windows-specific; it attempts to make native calls
> > into some ws2_32.dll
> > and fails to work on Mono on eg Linux or Mac OS X.
> > 
> > Do we know if this is just a packaging bug (MySQL
> > forgot to build a
> > portable-friendly binary?) or if MySQL is
> > specifically abandoning Mono
> > and cross-platform compatibility?
> > 
> > Should Mono's online documentation be updated to
> > reflect this?
> > 
> > -- brion vibber (brion @ pobox.com)
> > > ___
> > Mono-list maillist  -  Mono-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> > 
> 
> 
> joe_audette [at] yahoo dotcom
> http://www.joeaudette.com
> http://www.mojoportal.com
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://mail.terra.com.br/protected_email/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1126191763.243059.13628.niassa.terra.com.br,4816,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 07/09/2005 / Versão: 4.4.00/4576
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
> 

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Spam] [Mono-list] Compiling VB

2005-09-01 Thread A Rafael D Teixeira
Hi Paul,

inline

On Wed, 2005-08-31 at 01:08 +0100, Paul wrote:
> Hi,
> 
> I have some downloaded VB here which comes in two parts, the form and
> the code. How do I compile them? 
> 
> TTFN
> 
> Paul

Looks like old VB code instead of VB.NET, so mbas won't help you
(neither vbc). You need to compile and run it with VB6/VB6-runtime only
in windows. 

Another possibility is to use the VB to VB.NET converter in Visual
Studio.NET, and obtain new VB.NET sources and projects, but it normally
doesn't do a good job as the original language and framework doesn't
give good enough clues.
The worst case is if you have the original code compiling to many VB
libraries. In that case it will happily generate worthless ActiveX
wrappers for all public classes, and reference them (doubly-wrapping) as
COM+ objects in the client code.
Nevertheless, for trivial forms in a monolithic app the converter does
generate passable Windows Forms versions, but again beware of any custom
or third-party ActiveX controls embedded in the design that will be
wrapped for use in the managed form, making it surely non-portable.

Good Luck
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] The operation overflows at compile time in checked mode

2005-08-08 Thread A Rafael D Teixeira
Please fill a bug about it, for "Mono: Compilers"/"C#".

http://bugzilla.ximian.com/enter_bug.cgi?product=Mono%3A
+Compilers&component=C%23

:)

On Mon, 2005-08-08 at 10:10 +0800, red forks wrote:
> The Code is:
> 
>   const long lk = 1024;
>   const long lM = 1024 * lk;
>   const long lG = 1024 * lM;
>   const long lT = 1024 * lG;
> 
> I think 1024G is not out of range of long, don't know why mcs think
> its an error.
> The code is built ok in Microsoft .Net
> 
> 
> 
> __
> E-mail classificado pelo Identificador de Spam Inteligente.
> Para alterar a categoria classificada, visite o Terra Mail 
> 
> 
> __
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 05/08/2005 / Versão:
> 4.4.00/4551
> Proteja o seu e-mail Terra: http://mail.terra.com.br/ 
> 
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] ASP.NET precompilation

2005-07-28 Thread A Rafael D Teixeira
On Thu, 2005-07-28 at 09:41 +0100, Chris Aitken wrote:

> I imported an ASP.NET 1.1 web form into VWDE, and it would not build. I
> hadn't included 'partial' in the class definition. I understand the partial
> allows one to spread a class definition over a number of source files - but
> my class was in a single source file! Obviously partial is now in the C# 3rd
> edition, but is it necessary to declare a class as partial when it exists in
> a single file - or is this an MS beta issue?

Nope. It will build another source with the design-time set things
besides your source. And will compile both. Previously inheritance was
used now both sources are partial definitions of the same class.

> One thing I did like was the new class derivation model. The aspx page can
> define controls (labels, button etc), without the need to declare the
> protected members within the source file.

That's why the second "partial" source exists...

> 
> Chris

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] mono and cyrillic symbols

2005-07-14 Thread A Rafael D Teixeira
Probably your file is in utf-8 or any encoding other than
iso-8859-1/windows-1252 encoding, so you need to tell mcs the encoding
your sources are.

for utf-8 it is something like

mcs -codepage:utf8 mysource.cs ...

:)

On Thu, 2005-07-14 at 16:36 +0300, Slava Petrenko wrote:
> Hi all,
> 
> I've got simple programm:
> 
> using System;
> using System.IO;
> 
> public class Server
> {
> public static int Main (string [] args)
> {
> System.Console.Write( "КУКУКУ\n" );
> return 0;
> }
> }
> 
> 
> that code is supposed to output a string "КУКУКУ\n" to console, but it 
> outputs "ÐУÐУÐУ".
> 
> that's wrong with that stuff?
> 
> 
> Slava.
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://mail.terra.com.br/protected_email/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1121348309.345691.12473.cabue.terra.com.br,3250,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 13/07/2005 / Verso: 4.4.00 - 
> Dat 4534
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
> 

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Still problems with database access using ODBC

2005-07-11 Thread A Rafael D Teixeira
Daniel,

ODBC isn't the best way to connect databases with ADO.NET, period.

Although Suresh has been committing some patches recently on the
System.Data.Odbc namespace, I don't think it is thoroughly tested with
multiple database server types, as it is simply not feasible.

Unfortunately the only ADO.NET provider for Informix I've found  is a
commercial one from the fine people at OpenLink:
http://uda.openlinksw.com/ado.net/mt/dotnet-informix-mt/

IBM itself doesn't like .NET very much so they only tell how to use ODBC
to connect from ADO.NET to an Informix server. As they favor Java their
JDBC driver is in better shape as it is a pure-Java (Type 4) driver. So
it may be possible to use it through IKVM on Mono, but it is not in any
way easily integratable with ADO.NET's DataTables/DataSets.

:(

On Mon, 2005-07-11 at 13:28 +0200, [EMAIL PROTECTED] wrote:
> Hi Suresh!
> 
> thanx for the quick help. But I'm afraid it won't help. 
> I now compiled the Mono snapshot from 2005-07-08 from scratch and tested
> again.
> As a result I get no exceptions but also no results when accessing firebird 
> SQL. When using Informix (my production db) I now get the following
> exception:
> 
> Unhandled Exception: System.Data.Odbc.OdbcException:
> [unixODBC][Informix][Informix ODBC Driver]String data right truncation.
> in <0x00131> System.Data.Odbc.OdbcCommand:ExecSQL (System.String sql)
> in <0x00073> System.Data.Odbc.OdbcCommand:ExecuteNonQuery (Boolean
> freeHandle)
> in <0x00011> System.Data.Odbc.OdbcCommand:ExecuteReader (CommandBehavior
> behavior)
> in <0xc> System.Data.Odbc.OdbcCommand:ExecuteReader ()
> in (wrapper remoting-invoke-with-check)
> System.Data.Odbc.OdbcCommand:ExecuteReader ()
> in <0x002a6> MainClass:Main (System.String[] args)
> 
> Meanwhile I crosschecked with Python/ODBC from my SLES9 to ensure that the
> Informix ODBC driver is capable of SqlParameter at all.
> 
> Still nobody else with problems like this?
> 
> Best regards,
> 
> /daniel
> 
> > > Hi all!
> > > 
> > > Nearly 2 months ago I posted a bug (
> > > http://bugzilla.ximian.com/show_bug.cgi?id=74917 ) about using SQL
> > > parameters in ODBC queries.
> > > In short: using OdbcParameter with int-parameters works; with char and
> > > varchar-parameters it fails
> > 
> > i've just did a work-around fix. hope that helps you. I've been using 
> > WCHAR & WVARCHAR and it seems it is not fully supported from odbc 
> > provider. It is working with sqlserver odbc tds driver, which I tested
> > now.
> > 
> > suresh.
> > 
> 

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-Browser Session Mixing

2005-07-11 Thread A Rafael D Teixeira
Oops, I did open my mouth too soon.

Cookieless SessionState DOES work, but on further testing, session data
was still shared, as it seems that even as the url-mangling mechanism
did generate different url, both were still keyed to the same session
data. Probably that was intentional to make both mechanisms behave the
same.

But let we look at your real problem.

Thinking as the user for a moment, I do think that in general all pages
from any single "web application" I'm using need to share my session
information (login/preferences/etc.)

What you may need is more like "page-sequence" state preservation.
Aside from Hidden Fields you can preserve information in the ViewState
(that is client sent, but can be configured to do so encrypted), if you
are preserving content while postbacking in the same asp.net page.

In the server-side, the option is to double the indirection when
accessing the Session state. Think of saving a Hashtable of values in a
session variable named uniquely as you enter for the freshly in the page
for this session, this name should be preserved in ViewState for the
page.

Sorry for the confusion,

Googling MSDN/Mono is your power tool.

Fun,

On Mon, 2005-07-11 at 11:57 -0300, A Rafael D Teixeira wrote:
> Hi,
> 
> You can still keep session variables without the same browser conflict.
> Just configure session state to not use cookies. It will remain the
> same, but will mangle the url to keep the key there. It becomes
> something like:
> 
> http://localhost/WebApplication1/(uwvgovu0hljrmdqcl1aajf2f)/WebForm1.aspx
> 
> In practical terms all you need to do is to change your web.config,
> setting  cookieless to "true" in /configuration/system.web/sessionState.
> 
> Details about this entry of the configuration file:
> 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-
> us/cpgenref/html/gngrfsessionstatesection.asp
> 
> Cookieless Session-state works nicely with mono/xsp/mod_mono, so far as
> I tested.
> 
> Pitfall
> ---
> One of the problems in the MS implementation is reported at:
> 
> http://support.microsoft.com/?kbid=828330
> 
> This probably will also manifest in xsp/mod_mono in linux as even more
> things are case-sensitive, just ensure your URL are kept consistently
> case-wise.
> 
> Enjoy,
> 
> 
> On Mon, 2005-07-11 at 08:39 -0400, David P. Donahue wrote:
> > > So what do you do without sessions?  Bundle all required data inside
> > > each page, either in the URL (yuck) or as a set of hidden form
> > > variables:
> > > 
> > >   
> > > 
> > 
> > I came across that same idea back when I began developing websites with 
> > .NET, but it's not feasible for me from a security standpoint.  Many of 
> > these values I don't want the user to be able to change before posting 
> > back to the server, or even see in some cases.  For my needs, the 
> > information exchange for which I use Session variables must happen 
> > entirely server-side.
> > 
> > 
> > Regards,
> > David P. Donahue
> > [EMAIL PROTECTED]
> > http://www.cyber0ne.com
> > ___
> > Mono-list maillist  -  Mono-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> > 
> > E-mail classificado pelo Identificador de Spam Inteligente Terra.
> > Para alterar a categoria classificada, visite
> > http://mail.terra.com.br/protected_email/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1121085379.440266.12381.casama.terra.com.br,3862,Des15,Des15
> > 
> > Esta mensagem foi verificada pelo E-mail Protegido Terra.
> > Scan engine: McAfee VirusScan / Atualizado em 08/07/2005 / Versão: 4.4.00 - 
> > Dat 4531
> > Proteja o seu e-mail Terra: http://mail.terra.com.br/
> > 
> 
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://mail.terra.com.br/protected_email/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1121093830.0.17695.casama.terra.com.br,6207,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 08/07/2005 / Verso: 4.4.00 - 
> Dat 4531
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
> 

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-Browser Session Mixing

2005-07-11 Thread A Rafael D Teixeira
Hi,

You can still keep session variables without the same browser conflict.
Just configure session state to not use cookies. It will remain the
same, but will mangle the url to keep the key there. It becomes
something like:

http://localhost/WebApplication1/(uwvgovu0hljrmdqcl1aajf2f)/WebForm1.aspx

In practical terms all you need to do is to change your web.config,
setting  cookieless to "true" in /configuration/system.web/sessionState.

Details about this entry of the configuration file:

http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/cpgenref/html/gngrfsessionstatesection.asp

Cookieless Session-state works nicely with mono/xsp/mod_mono, so far as
I tested.

Pitfall
---
One of the problems in the MS implementation is reported at:

http://support.microsoft.com/?kbid=828330

This probably will also manifest in xsp/mod_mono in linux as even more
things are case-sensitive, just ensure your URL are kept consistently
case-wise.

Enjoy,


On Mon, 2005-07-11 at 08:39 -0400, David P. Donahue wrote:
> > So what do you do without sessions?  Bundle all required data inside
> > each page, either in the URL (yuck) or as a set of hidden form
> > variables:
> > 
> > 
> > 
> 
> I came across that same idea back when I began developing websites with 
> .NET, but it's not feasible for me from a security standpoint.  Many of 
> these values I don't want the user to be able to change before posting 
> back to the server, or even see in some cases.  For my needs, the 
> information exchange for which I use Session variables must happen 
> entirely server-side.
> 
> 
> Regards,
> David P. Donahue
> [EMAIL PROTECTED]
> http://www.cyber0ne.com
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://mail.terra.com.br/protected_email/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1121085379.440266.12381.casama.terra.com.br,3862,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 08/07/2005 / Versão: 4.4.00 - 
> Dat 4531
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
> 

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] How to assign user data to a widget

2005-07-04 Thread A Rafael D Teixeira
On Mon, 2005-07-04 at 21:15 +0700, [EMAIL PROTECTED] wrote:
> Hi,
> 
> I have question for GTK#
> 
> How to assign user data to a widget?
> Using widget.Userdata is seem impossible, because it not dot net style.
> 
> Any other way?

You can subclass the widget to add specific members...


-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] XSP log/console output

2005-07-04 Thread A Rafael D Teixeira
On Sat, 2005-07-02 at 11:46 +0200, Nils Kalchhauser wrote:
> Hi!
> 
> 
> I'm developing an ASP.NET application with mono xsp and cannot find any
> console output. I am on ubuntu/debian and use the mono-apache-server
> package (1.0-3). when I have an error in an aspx file then XSP displays
> something like:
> 
> Server error in '/epoBASE' application
> Cannot find '96069.dll'.
> Description: Error processing request.
> 
> Error Message: HTTP 404. Cannot find '96069.dll'.

Seems like the page compilation is failing but not for syntactical
errors. 

Some possibilities:

A long time ago mbas was taking to much time to compile things and would
timeout, are you using VB.NET as the page script language? 

Warning: In Mono I recommend to be explicit about the script language in
the @page directive as Mono defaults to a different language than MS (C#
for Mono/VB.NET for MS).

The user that is used by mod_mono/xsp has the rights to execute mono
compilers and generate the dlls in the configured temporary directory? 

The temporary directory is being cleaned during operation? I recommend
to configure it in the machine.config to some specific location not
automatically cleansed.

> I read in bugzilla (http://bugzilla.ximian.com/show_bug.cgi?id=63218)
> that the console output of XSP should give more information. but I
> cannot find any console output at all.

The only errors you will see in the console are the initialization
errors, page errors are sent back to the browser, but the level of
details is normally better than what is in your case. Also you can
enable asp.net tracing and monitor things in a separate browser window. 

For more information about tracing please google for trace.axd. The top
item that came for me is this quickstart that is already useful:
http://samples.gotdotnet.com/quickstart/aspplus/doc/tracelogapp.aspx

> I tried to use the xsp executable without apache, which generally works.
> but when I have an error in an aspx again I dont get any console output
> from XSP even though I started it from the console and never sent it to
> background.

As I said only initialization errors may appear in the console, and I
think only in XSP.

> can you configure xsp to write to a logfile?

Again: enable ASP.NET tracing

> thanks,
> Nils

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Compiling Mono for WinCE

2005-07-01 Thread A Rafael D Teixeira
On Fri, 2005-07-01 at 17:06 -0300, A Rafael D Teixeira wrote:
> Otherwise you would need to elect one
> of
> 
Sorry I left the sentence unfinished. What I was saying is that if you
want to compile the mono runtime to have JITTED eexcution on a pocket
device, first you need to elect which device and therefore which CPU and
develop the JITTING code for that CPU and We can help you a little bit
in doing that but I don't know if more people would like to help you
further.

ciao


-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Compiling Mono for WinCE

2005-07-01 Thread A Rafael D Teixeira
Hi Luca,

On Thu, 2005-06-30 at 18:20 +0200, Luca wrote:
> Il Mon, Jun 27, 2005 at 02:23:39PM +0300, Sergey Chaban ha scritto: 
> > > is it possibile to compile Mono for WinCE?
> > 
> > It was possible in the past (circa 2002-2003), but Mono has evolved greatly 
> > since then,
> > so I think some more work is necessary to build the latest version.
> > Also building some of the support libs (glib) for WinCE was quite tricky, 
> > thanks to
> > numerous WCE limitations.
> 
> Any pointer on the compilation? Mono requires cygwin but it seems that
> cygwin doesn't work with CE. I'm already stuck... :(
> 
> Luca

I don't think that mono (the runtime) can be easily compiled for WinCE
with it's current build system.

Also we currently don't have a JIT for any of the CPUs commonly used in
the pocket devices, so you would need to resurrect our IL interpreter
(mint), that I vaguely remember someone telling to being able to use in
the time range Sergey cited above. Otherwise you would need to elect one
of

What I hear some people really do is use some of Mono's managed
libraries in newer WinCE.NET devices that already have the .NET Compact
Framework runtime. 

:|

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Running vs2005 beta 2 compiled code on mono...

2005-07-01 Thread A Rafael D Teixeira
Hi Alex again,

> CODE:
> 
> int main()
> {
> return 0;
> }
> 
> OUTPUT:
> 
> % mono HelloWorld05b2.exe
> 
> ** ERROR **: file object.c: line 752 (mono_class_create_runtime_vtable):
> assertion failed: (fklass->byval_arg.type == MONO_TYPE_PTR)
> aborting...
> Abort

Sure it looks like our runtime is having trouble to load a class
definition. It probably is a bug or some assumption that doesn't hold
for 2.0, please file a bug at http://bugzilla.ximian.com/enter_bug.cgi?
product=Mono%3A%20Runtime starting the description with "[2.0] ..."

Thank you for pointing it out,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Running vs2005 beta 2 compiled code on mono...

2005-07-01 Thread A Rafael D Teixeira
Hi Alex see inline:

On Thu, 2005-06-30 at 23:29 -0500, Alex Mohr wrote:
> Hi Folks,
> 
> I'm new to CLR/CLI stuff and I'm trying some simple experiments.
> 
> I'm interested in C++/CLI in visual studio 2005 beta 2.  I was hoping to
> be able to compile stuff in Visual Studio using /clr:pure and be able to
> run it on other platforms using mono.  Unfortunately I've been running
> into some trouble.

It is expected to have some trouble currently, see below

> I have the simplest C++/CLI program (main takes no args and just returns
> 0) that I can compile and run in VS2005.  I then try to run the program
> on a mac where I have installed mono, but it fails with an obscure error
> (unfortunately I don't have it in front of me now).

A /clr:pure program uses only managed code, and that is good but it:

1) Expects a very different mscorlib 2.0. So at least you need to run
the mono 2.0-compatible preview version, and I'm not sure all the needed
implementations are in place.
2) It still has some dependency on a specific runtime library
Microsoft.VisualC.dll. That I'm quite sure we doesn't have much of it
implemented as needed for both profiles (1.X, 2.0).

This old post tells a bit more:
http://galactus.ximian.com/pipermail/mono-devel-list/2004-
August/007453.html

The only .NET language that I know doesn't have an specific runtime
library is C# (It only needs the three core .NET libraries).

> Is anybody doing this sort of thing?  If so, are there some obvious
> steps that I'm missing?  Any help is appreciated.


As for Microsoft.VisualC.dll:
---
No one has been actively working on it since 2003 (as told by svn log)

All the meaningful sources we have there are
 
Microsoft.VisualC/DebugInfoInPDBAttribute.cs
Microsoft.VisualC/DecoratedNameAttribute.cs
Microsoft.VisualC/IsCXXReferenceModifier.cs
Microsoft.VisualC/IsConstModifier.cs
Microsoft.VisualC/IsLongModifier.cs
Microsoft.VisualC/IsSignedModifier.cs
Microsoft.VisualC/IsVolatileModifier.cs
Microsoft.VisualC/MiscellaneousBitsAttribute.cs
Microsoft.VisualC/NeedsCopyConstructorModifier.cs
Microsoft.VisualC/NoSignSpecifiedModifier.cs

And that is surely for 1.X profiles

As for needed changes in mscorlib:
---

The class status page tells that currently mscorlib lacks some 1719
pieces in the 2.0 profile, so probably some of them are needed to be
able to run C++ programs.

Telling us your error message may help us implement what is missing or
must be changed for your program to work correctly.

> Thanks,
> 
> Alex

Fun,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] RE: Mono Installation Question

2005-07-01 Thread A Rafael D Teixeira
On Fri, 2005-07-01 at 13:35 +0930, Kent Boogaart wrote:
> Thanks for the suggestions guys. Unfortunately, I'm not any closer to
> getting this resolved. If I try updating the RPMs rather than installing I
> get:
>   # rpm -Uvh glibc-common-2.3.2-27.9.7vfs3.i386.rpm
>   error: failed dependencies
>   glibc < 2.3.2 conflicts with glibc-common-2.3.2-27.9.7vfs3
>   glibc-common = 2.2.4-26 is needed by glibc-2.2.4-26

You can pass both rpms (glibc and glibc-common) in the same rpm command
line and them both will upgrade at the same time, but you may have to
add yet other packages for everything to work...

Good luck Kent

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Re: XSP: Session loosed when something is changed in the application bin's folder

2005-06-15 Thread A Rafael D Teixeira
On Wed, 2005-06-15 at 18:45 +0200, Fabien Meghazi wrote:
> > Have a look at
> > 
> > man asp-state
> 
> Could you point me to another source of information about this ?
> I can't find anything usefull about that.

To have a picture of how session-state is preserved, first see:

ASP.NET Session State FAQ
By Peter A. Bromberg, Ph.D.
http://www.eggheadcafe.com/articles/20021016.asp 

What the article says about StateServer (implemented in .NET by
aspnet_state.exe) should apply for asp-state.exe that is our
implementation.

As you are having problems to read man pages in windows (you need cygwin
correctly configured/installed and 'make install' from xsp sources to
have it), I will tell you that "man asp-state" returns something like:

---
   asp-state is an out of process ASP.NET session state server.

   asp-state allows you to have session data saved out of process
and/or on a separate computer.

   To use the asp-state server just modify your web.config file to
use the state server:

   

   And run asp-state
---

asp-state.exe is built from sources on xsp/tools/asp_state/ and should
be available in your xsp installer for windows.

Hope it helps,


-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] reverse engineering

2005-06-14 Thread A Rafael D Teixeira
Hi Jonathan,

Sorry, some culture clash occurred, I think. 

In Brazil we don't consider what you named as "black box" reverse
engineering as reverse engineering at all, it is just part of the
requirements discovery phase of plain old forward engineering.

Only the "white box" variety is considered reverse engineering, and
surely that was my mindframe when saying that reverse engineering is
prohibited.

Sorry, for my ignorance.

:)

On Mon, 2005-06-13 at 19:31 -0400, Jonathan Pryor wrote:
> On Mon, 2005-06-13 at 09:47 -0300, A Rafael D Teixeira wrote:
> > It is illegal to reverse engineer .NET, in most countries anyway...
> 
> In what country is it illegal to reverse engineer *anything*?  
> Certainly not the U.S.A.
> 
> The only typical restrictions are 
>  1. That it be for compatibility
>  2. That it be "black box" reverse engineering.
> 
> Mono, Samba, Wine, and even the original Compaq BIOS (which sparked the
> PC Clone Wars) all meet these horribly onerous restrictions. :-)
> 
> Just to clarify, white box reverse engineering would include
> decompiling .NET IL code.  This is obviously bad, because it opens you
> up to copyright infringement (among other potential issues).
> 
> Black box reverse engineering would include writing unit tests
> against .NET to identify and clarify its behavior, and then implement
> Mono to conform to the unit tests.  Oddly, this is exactly what we do.
> 
> :-)
> 
> > Mono is open source, so you don't need to reverse engineer anything...
> 
> Certainly you don't need to reverse-engineer Mono...  Unless you need to
> implement something under an incompatible license...
> 
>  - Jon
> 
> 
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://mail.terra.com.br/protected_email/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1118705787.492560.18501.casama.terra.com.br,2539,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 13/06/2005 / Verso: 4.4.00 - 
> Dat 4512
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
> 

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Unhandled Exception: System.DllNotFoundException: libgobject-2.0-0.dll

2005-06-13 Thread A Rafael D Teixeira
Hi Enzo,

Answers Inline

On Sat, 2005-06-11 at 21:42 +0200, enzo wrote:
> I'm trying to use monodevelop 0.71 ( with mono 1.1 ) on fedora core 3
> when I run it I get the error Unhandled Exception: 
> System.DllNotFoundException: libgobject-2.0-0.dll
> Do you have some suggestion about this problem ?
> regards , Enzo
> 
> [EMAIL PROTECTED] ~]$  export MONO_PATH=/usr/lib:/usr/lib/mono/gtk-sharp
> 
> [EMAIL PROTECTED] ~]$ monodevelop
> 
> Unhandled Exception: System.DllNotFoundException: libgobject-2.0-0.dll
> in (wrapper managed-to-native) Gnome.Program:g_type_init ()
> in <0x000c5> Gnome.Program:.ctor (System.String app_id, System.String 
> app_version, ModuleInfo module, System.String[] argv, System.Object[] props)
> in <0x004c1> MonoDevelop.SharpDevelopMain:Main (System.String[] args)

Seems that you are missing the gnome-sharp.dll.config file that MUST be
installed in the same place that gnome-sharp.dll (normally in the GAC,
so you'd have some file like /usr/lib/mono/gac/gnome-
sharp/2.0.0.0__35e10195dab3c99f/gnome-sharp.dll.config). 

If the config file is lacking the runtime will look for a
libgobject-2.0-0.dll instead of libgobject-2.0-0.so as is needed in
linux.

It sure looks like you didn't install GTK# correctly...

HIH, :)

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] reverse engineering

2005-06-13 Thread A Rafael D Teixeira
Hi Kamelus,

It is illegal to reverse engineer .NET, in most countries anyway...

Mono is open source, so you don't need to reverse engineer anything...

So I don't understand your question...
:(

On Sat, 2005-06-11 at 13:18 -0700, kamel Derouiche wrote:
> Hi ALL ,,
> 
> is can speak about the reverse engineering in MONO as
> well as NET ??
> 
> Thank You
> 
> Kamelus 


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Reporting Engine

2005-06-10 Thread A Rafael D Teixeira
On Wed, 2005-05-25 at 08:12 -0400, Farzad Battiwalla wrote:
> Does anyone know of a good reporting engine for Mono ? - I'm
> looking for something similar to Jasper Reports for Java, but on Dot
> Net. I'd also like it to be cross-platform, however, running on Linux is
> more important.

You may be able to use Jasper Reports itself, by compiling it with IKVMc
into CLI assemblies (beware, it may get very very big) 

Never tried but it sure merits being experimented...

:)

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] ParseExact functionality

2005-06-10 Thread A Rafael D Teixeira
Please file a bugzilla case at 
http://bugzilla.ximian.com/enter_bug.cgi?product=Mono%3A%20Class%
20Libraries&component=CORLIB 

Thanks,

On Fri, 2005-06-10 at 07:58 -0400, Harry Holt wrote:
> I'm having a problem converting an ldap date string into a C# DateTime
> under mono.  The function I'm using is:
> 
> DateTime.ParseExact("20050707132527Z", "MMddHHmmss\\Z",
> System.Globalization.DateTimeFormatInfo.CurrentInfo);
> 
> Under mono, this throws an "Invalid Format" exception, but it works
> fine under Microsoft .NET.
> Same thing using System.Globalization.DateTimeFormatInfo.InvariantInfo

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Starting out using mono

2005-05-11 Thread A Rafael D Teixeira
Hi Jim see inline:

On Wed, 2005-05-11 at 01:01 -0400, jim lawrence wrote: 
> i tested out the sample hello.cs in the monodoc that compiled file and
> ran .  I found a example gtk.vb and tried to compile that as well. No
> good!  i get a error
> [EMAIL PROTECTED] ~]$ mbas hello.vb -r gtk-sharp
> MonoBASIC Compiler  0.96.1.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
> 
> THIS IS AN ALPHA SOFTWARE.
> 
> error BC0006: Can not find assembly `gtk-sharp'
> Log:
> 
> Compilation failed: 1 Error(s), 0 warnings

Well you need to tell mbas where the referenced assembly is like:

mbas hello.vb -r:/usr/lib/mono/gtk-sharp/gtk-sharp.dll

For your case where gtk-sharp is properly 'packaged' with a .pc file for
pkg-config, you can use:

mbas -pkg:gtk-sharp hello.vb

The pkg option looks for info on the .pc files and so it tells mbas the
correct path your libraries were installed and their names. On my system
the above command line means the same as:

mbas -r:/usr/lib/mono/gtk-sharp/glib-sharp.dll 
-r:/usr/lib/mono/gtk-sharp/pango-sharp.dll 
-r:/usr/lib/mono/gtk-sharp/atk-sharp.dll 
-r:/usr/lib/mono/gtk-sharp/gdk-sharp.dll 
-r:/usr/lib/mono/gtk-sharp/gtk-sharp.dll hello.vb

You can also use the MONO_PATH environment variable (use 'man mono' tro
see documentation), but that isn't as good as it seems at first:

export MONO_PATH=.:/usr/lib/mono/gtk-sharp
mbas -r:gtk-sharp hello.vb

:),
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
Simios Proud Member - http://www.simios.org/ 
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cairo tutorials

2005-04-19 Thread A Rafael D Teixeira
Just to be 100% correct. MWF doesn't use Cairo directly, it calls
libgdiplus that indeed calls Cairo, but libgdiplus is native C code not
managed C#/MonoBASIC/Boo/Nemerle/etc. code.

HIH,

On Tue, 2005-04-19 at 01:02 -0300, Everaldo Canuto wrote:
> Hi Alex,
> 
> Look at MWF (Managed Windows Forms) it uses Cairo for graphics, you
> found it on Mono sources "mcs/class/Managed.Windows.Forms.
> 
> Everaldo.
> 
> 
> Em Seg, 2005-04-18 às 23:55 -0400, Alex Roman escreveu:
> > Hello people,
> > 
> > 
> > I decided to experiment with mono and Cairo but I noticed that there
> > are NO tutorials whatsoever. I do have the documentation for it, but
> > it's just an API reference. It doesn't contain any examples.
> > 
> > Does anyone have a link to some examples or can provide me with some
> > examples? I would greatly appreciate it.
> > 
> > Sincerely,
> > Alex Roman.


-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] ADO.NET in Mono & Active Directory

2005-04-11 Thread A Rafael D Teixeira
Hi Dennis, see comments inline:

On Mon, 2005-04-11 at 11:15 +0200, Denis Schnepf wrote:
> Hello,
> 
> I'm currently working on a project aimed at managing Active Directory 
> users from a linux server.

:(

> Active Directory servers can be accessed using ADO (apparently, with the 
> OLE DB Provider), so my question is : has anyone tried to use ADO.NET 
> with Active Directory and does it work?

This can probably be done in Windows, but with MS.NET in Windows,
because:

1) We don't have OLE DB in Linux (Mono nevertheless implements the OLEDB
provider but using gda that is a quite different infrastructure).
2) Active Directory uses a proprietary and under-documented protocol, so
AFAIK nobody in Mono is currently trying to is taking a dependency on
Samba to try to figure out how to work with it, and write an specific
provider for gda or better an specific managed provider for ADO.NET.

But hope is not lost:

Active Directory is known to inter-operate with other systems via LDAP,
so if this inter-operation encompass the administration chores (what I
guess most of it doesn't), you can use the LDAP libraries from Mono to
try your hand. 

I wish you good luck,
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.mono-project.com/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://www.simios.org/blog/monoman

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: RE: [Mono-list] Cannot find Assembly ASP

2005-04-08 Thread A Rafael D Teixeira
On Fri, 2005-04-08 at 08:55 +0200, Gilles FAVIER wrote:
> Seb,
> 
> You made it!! It works, it compiles with the exact command lien you gave me, 
> it is true 'ill have to study that point between assemblies and namespaces...
> 
> IT would be to great if it worked... i have the compilation succeeded but 
> when i open my webpage : 
> http://localhost/mydir/Default.aspx, once i click on OK to make my query i 
> get the following error : 
> (i might have to make another post for this error)
> 
> System.DllNotFoundException: oci
> in <0x00053> (wrapper managed-to-native) OciNativeCalls:OCIEnvCreate 
> (intptr&,System.Data.OracleClient.Oci.OciEnvironmentMode,intptr,intptr,intptr,intptr,int,intptr)
> in <0x00020> System.Data.OracleClient.Oci.OciCalls:OCIEnvCreate 
> (intptr&,System.Data.OracleClient.Oci.OciEnvironmentMode,intptr,intptr,intptr,intptr,int,intptr)
> in <0x0005d> System.Data.OracleClient.Oci.OciEnvironmentHandle:.ctor 
> (System.Data.OracleClient.Oci.OciEnvironmentMode)
> in <0x0003c> System.Data.OracleClient.Oci.OciGlue:CreateConnection 
> (System.Data.OracleClient.OracleConnectionInfo)
> in <0x0002b> System.Data.OracleClient.OracleConnection:Open ()
> in <0x0004f> (wrapper remoting-invoke-with-check) 
> System.Data.OracleClient.OracleConnection:Open ()
> in <0x00094> WebTest._Default:BTGO_Click (object,System.EventArgs)
> in <0x00069> (wrapper delegate-invoke) 
> System.MulticastDelegate:invoke_void_object_EventArgs 
> (object,System.EventArgs)
> in <0x00081> System.Web.UI.WebControls.Button:OnClick (System.EventArgs)
> in <0x00058> 
> System.Web.UI.WebControls.Button:System.Web.UI.IPostBackEventHandler.RaisePostBackEvent
>  (string)
> in <0x00016> System.Web.UI.Page:RaisePostBackEvent 
> (System.Web.UI.IPostBackEventHandler,string)
> in <0x0003e> System.Web.UI.Page:RaisePostBackEvents ()
> in <0x002c3> System.Web.UI.Page:InternalProcessRequest ()
> in <0x000c2> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)
> in <0x002eb> ExecuteHandlerState:Execute ()
> in <0x00084> StateMachine:ExecuteState 
> (System.Web.HttpApplication/IStateHandler,bool&)
> 
> 
> 
> Anyway thanks a lot guys i saved a lot of time and realize where i am missing 
> some knowledge!

Well you need to install the Oracle Client for Linux, to be able to use
this ADO.NET provider, as it just calls into the proprietary library.
Also, it may already be installed but not in the correct place or with
the wrong name (probably a versioning problem).

Beware of API/ABI changes in the Oracle furnished libraries that may
render the provider unusable.

If possible you should use another database that has a fully managed
provider like PostgreSQL, MySQL or even MS SQL Server,  because those
are normally better maintained and are immune to such API/ABI/dependency
problems. Only protocol changes do represent a possibility of problems
for these, beyond the inescapable bugs.

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] magic quotes (like PHP)

2005-04-08 Thread A Rafael D Teixeira
On Thu, 2005-04-07 at 12:06 -0400, James Grant wrote:
> Hi there, 

Hi James,

>  I'm running into an issue with an application that has been ported over from 
> windows to linux/mono.  On windows, you could enter apostrophe's in input 
> boxes which are then stored in the database without any problems, but on mono 
> it seems that the apostrophe's all need to be manually escaped on every 
> query.

You are mixing things: that is surely note a windows x mono issue.
Quotes in general aren't changed in any form by input boxes, or string
handling. What may possibly mess with them is the ADO.NET provider when
writing the string to the database, as it may have to escape the quotes
as needed, and the particular one you are using may not be doing that
correctly. Or you may be fooling it by hand-constructing SQL commands or
setting incorrect parameter definitions.

First answer these:

To what database are you connecting? What ADO.NET provider are you
using, in Windows with .NET and elsewhere with Mono? Are you using
correctly parameterized queries?

Answering that we can find the real culprit for mishandling the
quotation marks.

> I know PHP has an option for "magic quotes"
>   http://ca.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime
> and was wondering if mono had a similar configuration option?  


No need for such a hack...


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] g_spawn_command_line_async

2005-03-22 Thread A Rafael D Teixeira
Please use the managed (portable) classes to do that:

System.Diagnostics.Process

or

System.Diagnostics.ProcessStartInfo

See monodoc or msdn for documentation.

:)

On Mon, 2005-03-21 at 22:39 +, Phillip Neumann wrote:
> Hello.
> 
> 
> Im trying to start a new proces in the background with:
> 
> g_spawn_command_line_async("command", IntPtr.Zero);
> 
> 
> it works fine on this unix mashine, but im trying the same on windows 
> and it has no effect...
> i have this:
> 
> 
> [DllImport("libglib-2.0-0.dll")]
> static extern bool g_spawn_command_line_async (string command, 
> IntPtr err);
> public void RealPlayerStart(){
> if (((int) System.Environment.OSVersion.Platform) >= 4){
> //UNIX
> g_spawn_command_line_async ("mpg123 
> http://sofsis.cl:8000/128.mp3";, IntPtr.Zero);   
> }
> else{ //Windows
> string s = "\"%ProgramFiles%\\Windows Media 
> Player\\wmplayer.exe\" http://sofsis.cl:8000/128.mp3";;
> Console.WriteLine("win32> "+s);
> g_spawn_command_line_async (s, IntPtr.Zero);   
> }
> }
> 
> 
> on windows i get this output:
> 
> win32>  %ProgramFiles%\Windows Media Player\wmplayer.exe" 
> http://sofsis.cl:8000/128.mp3
> 
> 
> witch looks fine, thinking that when i execute that on the msdos prompt 
> it works.. i.e. open the mediaplayer
> 
> 
> 
> 
> 
> whats the matter?
> 
> is this just not implemented on windows glib?
> 
> 
> 
> PD: im using mono 1.1.4 + gtk# installer
> 
> 
> 
> 
> thanks in advance!
> 
> 
> 
> 
> 
> 
> 
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://mail.terra.com.br/protected_email/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,459340.479403.25774.malavi.terra.com.br,4878,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 21/03/2005 / Versão: 4.4.00 - 
> Dat 4451
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
> 

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] GAC permissions

2005-03-22 Thread A Rafael D Teixeira
Hi Nik,

First, you should only add things to the gac as root, never as a normal
user. We even tought of an additional user-gac, but I think the idea was
dropped.

Second, everything in my gac is owned by user root and group root. And
the permissions are 

drwxr-xr-x 

for directories /usr/lib/mono, /usr/lib/mono/gac, and for each assembly-
related directory inside /usr/lib/mono/gac and their version-pl.

Taking for example Npgsql.dll instaled in my gac we have a directory 
/usr/lib/mono/gac/Npgsql/1.0.5000.0__5d8b90d52f46fda7/

containing

-rwxr-xr-x  1 root root 181760 Mar 21 15:46 Npgsql.dll
-rw-r--r--  1 root root 106152 Mar 21 15:46 Npgsql.dll.mdb

Assemblies in the GAC are shared content so they must be readable by
everyone. The execute permissions on dlls are just a reminder because
they need to be loaded and executed by mono. 

In case you don't know: the execute bits in permissions for directories
are used to mark them as "listable" (browseable), so if you take them
out the affect user/group won't be able to find/open the files, even if
the files' permissions allow.

HIH,

On Tue, 2005-03-22 at 22:54 +1100, Nik Derewianka wrote: 
> Hi,
> 
> New to linux (suse 9.2) so please bear with me:
> 
> Using mono 1.1.4 all the files in my GAC have owner/group of root.  In 
> my code where i use the Npgsql connector, my code runs fine when 
> executed under root but under a normal user it bombs out badly:
> 
> ** (postgres.exe:9267): WARNING **: Could not find assembly Npgsql, 
> references from /home/nik/postgres.exe (assemblyref_index=1)
>  Major/Minor: 1,0
>  Build:   5000,0
>  Token:   5d8b90d52f46fda7
> System error: No such file or directory
> 
> 
> ** (postgres.exe:9267): WARNING **: Missing method .ctor in assembly 
> /home/nik/postgres.exe typeref index 2
> 
> Unhandled Exception: System.NullReferenceException: Object reference not 
> set to an instance of an object
> 
> 
> Likewise, when using the gacutil to install npgsql from a normal user i 
> get errors and it mentions permissions.
> 
> So what user/group should i be setting the files in the gac to ??  If i 
> change the group to 'users' with read perms then it complains about 
> /etc/mono/machine.config
> 
> It just doesnt feel right that i need to be opening up all the perms on 
> things - but maybe this is how linux does things... if so is there any 
> recommended set of permissions  (or have i royally botched something up 
> with the install ?).
> 
> Any help appreciated,
> Nik
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://mail.terra.com.br/protected_email/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,492933.424241.11838.cabue.terra.com.br,4034,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 21/03/2005 / Versão: 4.4.00 - 
> Dat 4451
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
> 

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] About to Compile MCS

2005-03-21 Thread A Rafael D Teixeira
Hi Guilherme, see answer inline:

On Sat, 2005-03-19 at 22:33 -0300, Guilherme Martins wrote:
> I have downloaded the jay binary version from an article:
> http://www.codeproject.com/csharp/codedomparser.asp
> 
> An I run jay to generate my cs-parser.cs, that "worked" fine!
> 
> But the generated file have it's syntax wrong, to illustrate the file 
> begins with a case statement :-(...

It seems you are not using the correct template for jay. If you took the
time to read our makefile you would have seen how jay is called and that
we pass it a C#-specific template file. The template is in the jay
directory parallel with the mcs (compiler) directory.

> Some one know how to solve it?

from our makefile:

jay -ctv < skeleton.cs cs-parser.jay > cs-parser.cs

As it seems that you aren't getting our sources right skeleton.cs is
attached.

> Note: I'm using Windows and I just want to compile MCS with VS.NET.

Bad choice, but if you really want now you may be able, just don't
forget to define these two symbols in the project configurations:
NET_1_1 ONLY_1_1.


-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.softwarelivre.org/
English Blog: http://monoblog.blogspot.com/
#	jay skeleton

#	character in column 1 determines outcome...
#		# is a comment
#		. is copied
#		t is copied as //t if -t is set
#	other lines are interpreted to call jay procedures

.// created by jay 0.7 (c) 1998 [EMAIL PROTECTED]
.
 prolog		## %{ ... %} prior to the first %%

.
.  /** error output stream.
.  It should be changeable.
.*/
.  public System.IO.TextWriter ErrorOutput = System.Console.Out;
.
.  /** simplified error message.
.  @see yyerror
.*/
.  public void yyerror (string message) {
.yyerror(message, null);
.  }
.
.  /** (syntax) error message.
.  Can be overwritten to control message format.
.  @param message text to be displayed.
.  @param expected vector of acceptable tokens, if available.
.*/
.  public void yyerror (string message, string[] expected) {
.if ((yacc_verbose_flag > 0) && (expected != null) && (expected.Length  > 0)) {
.  ErrorOutput.Write (message+", expecting");
.  for (int n = 0; n < expected.Length; ++ n)
.ErrorOutput.Write (" "+expected[n]);
.ErrorOutput.WriteLine ();
.} else
.  ErrorOutput.WriteLine (message);
.  }
.
.  /** debugging support, requires the package jay.yydebug.
.  Set to null to suppress debugging messages.
.*/
t  internal yydebug.yyDebug debug;
.
 debug			## tables for debugging support
.
.  /** index-checked interface to yyNames[].
.  @param token single character or %token value.
.  @return token name or [illegal] or [unknown].
.*/
t  public static string yyname (int token) {
tif ((token < 0) || (token > yyNames.Length)) return "[illegal]";
tstring name;
tif ((name = yyNames[token]) != null) return name;
treturn "[unknown]";
t  }
.
.  /** computes list of expected tokens on error by tracing the tables.
.  @param state for which to compute the list.
.  @return list of token names.
.*/
.  protected string[] yyExpecting (int state) {
.int token, n, len = 0;
.bool[] ok = new bool[yyNames.Length];
.
.if ((n = yySindex[state]) != 0)
.  for (token = n < 0 ? -n : 0;
.   (token < yyNames.Length) && (n+token < yyTable.Length); ++ token)
.if (yyCheck[n+token] == token && !ok[token] && yyNames[token] != null) {
.  ++ len;
.  ok[token] = true;
.}
.if ((n = yyRindex[state]) != 0)
.  for (token = n < 0 ? -n : 0;
.   (token < yyNames.Length) && (n+token < yyTable.Length); ++ token)
.if (yyCheck[n+token] == token && !ok[token] && yyNames[token] != null) {
.  ++ len;
.  ok[token] = true;
.}
.
.string [] result = new string[len];
.for (n = token = 0; n < len;  ++ token)
.  if (ok[token]) result[n++] = yyNames[token];
.return result;
.  }
.
.  /** the generated parser, with debugging messages.
.  Maintains a state and a value stack, currently with fixed maximum size.
.  @param yyLex scanner.
.  @param yydebug debug message writer implementing yyDebug, or null.
.  @return result of the last reduction, if any.
.  @throws yyException on irrecoverable parse error.
.*/
.  internal Object yyparse (yyParser.yyInput yyLex, Object yyd)
. {
tthis.debug = (yydebug.yyDebug)yyd;
.return yyparse(yyLex);
.  }
.
.  /** initial size and increment of the state/value stack [default 256].
.  This is not final so that it can be overwritten outside of invocations
.  of yyparse().
.*/
.  protected int yyMax;
.
.  /** executed at the beginning of a reduce action.
.  Used as $$ = yyDefault($1), prior to the user-specified action, if any.
.  Can be overwritten to provide deep copy, etc.
.  @param first value for $1, or null.
.  @return first.
.*/
.  p

Re: [Mono-list] Mono licence

2005-03-21 Thread A Rafael D Teixeira
On Sun, 2005-03-20 at 07:33, Paul wrote:

Just to get it straight. Have you read the first direct response from
Miguel?

You are confusing things. 

Licenses are for distribution of some creation, and it is upon the
(whole chain of) creators the choices for how to do so: they are
automatically entitled.

Patent is some limited-time exclusivity granted for the use/exploration
of some innovative artifact. The creator must prove it was the first
think of it, and apply for the grant.

In USA, were corporations heartlessly rule, they extended the reach of
patents to software, and even simple generic ideas.

The whole heart of the issue is that someone may patent things he/she
created that someone else independently created before, during or even
after the patent was applied/granted. This multiplicity of similar, or
even functionally identical, creations can't be prevented, and more, in
the field of software development it is highly common, as everybody
strives for the best possible designs and solutions, and borrow from the
same base of knowledge. 

That is why software patents is such a bad idea. A single patent may
take a small but fundamental piece of good design out of reach of the
whole industry/community preventing everybody from achieving good
performance or having a clean design, or even from being able to comply
with standards.

Well, but in practicality what we are saying is: the parts of mono we
have chosen to license as GPL, we can rightly do so as we are the
authors of it. I don't have any patents of my own directly affecting it,
and if I have, obviously I would grant royalty-free access to it, to
make it compatible with what GPL says, and I think Novell and other core
developers of Mono are also in the same situation.

What we can't do is be sure that no one has been granted any patent that
would affect mono, or do anything about it preventively. Period.

We are as sure as possible of our "cleanroomness", and prefer to deal
with possible patent cases as they effectively appear. That is sensible
even for a big company as Novell, as all this patent crap costs a lot of
money and time...

So please Paul don't mix things again,

Have fun,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] some mono thoughts

2005-03-14 Thread A Rafael D Teixeira
On Sat, 2005-03-12 at 16:13, Michael E. Isbell wrote:
> So, about 20-30 HP programmers are currently employed full time 
> developing Mono, which explains why they've almost achieved 2.0. Also, 
> they don't have to develop Visual Studio.

I think you misnamed things. Who pays tens of developers to forward Mono
is Novell. So unless HP has bought Novell, or has all of its people
working disguised in Mono you probably has to correct your statement.

Fun, :S

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Writing to Linux Logs

2005-03-10 Thread A Rafael D Teixeira
Reference the Mono.Posix assembly, and use:

using Mono.Unix;

void Syscall.openlog (IntPtr ident, SyslogOptions option, SyslogFacility
defaultFacility)
void Syscall.syslog (SyslogFacility facility, SyslogLevel level, string
message)
void Syscall.syslog (SyslogLevel level, string message)
void Syscall.closelog ()
int Syscall.setlogmask (SyslogLevel mask)

HIH,

On Wed, 2005-03-09 at 00:55, Shane G. Brodie wrote:
> I have not yet been able to locate a namespace which provides facilities
> for writing to the Linux system logs such as would be accomplished using
> the syslogd daemon. 
> 
> Is there a native Mono way to do this, or is there another way to do
> this (IE:  Can you link in the C/C++ functions to do so???  If so, is
> there any documentation anywhere on how this is handled?)
> 
> The following include and prototypes seem to be the C way to do what I
> want to do, but I've not been able to find any examples of doing this
> from Mono 
> 
> #include 
> void openlog( char *ident, int option, int facility)
> void syslog ( int priority, char *format, ...)
> void closelog( void )
> 
> 
> 
> Regards
> 
> Shane Brodie
> 
> Newbie Linux Developer
> Veteran Windows Developer
> 
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://mail.terra.com.br/protected_email/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1110340605.797650.28225.casama.terra.com.br,3516,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 08/03/2005 / Versão: 4.4.00 - 
> Dat 4442
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Matrix of Objects

2005-03-04 Thread A Rafael D Teixeira
Another way is for Celda to be an struct. Arrays of value-types like int
or your structs are preinitialized. objects like String and other
classes are reference types and must be created as Jonathan pointed out.

public struct Celda
{
public int Valor ;
public Celda(int V) {
Valor = V;   
}
public override string ToString(){
return "("+Valor+")";
}   
}

Now your original class Terreno should work as it was...

HIH,

On Thu, 2005-03-03 at 09:07, Jonathan Pryor wrote:
> On Wed, 2005-03-02 at 22:30 +, Phillip Neumann wrote:
> > Hello...
> > 
> > I wonder how to work with arrays of objects.
> 
> 
> 
> > when executing i get:
> > System.NullReferenceException: Object reference not set to an instance 
> > of an object
> > 
> > how shall i create my matrix?
> 
> Your example is equivalent to this:
> 
>   string[] array = new string[10];
>   array[0].Length;// throws NullReferenceException
> 
> The above will also generate a NullReferenceException.  The reason is
> because the array is separate from the objects it contains; you created
> an array, but never put anything in it.
> 
> The correct approach would be this:
> 
>   // create array
>   string[] array = new string[10];
> 
>   // populate
>   for (int i = 0; i < array.Length; ++i)
>   array[i] = "some string" + i.ToString();
> 
>   // access array
>   int total_length = 0;
>   for (int i = 0; i < array.Length; ++i)
>   total_length += array[i].Length;
> 
> Or for your matrix code in the Terreno constructor:
> 
>   // create matrix
>   _Matrix = new Celda[px,py];
> 
>   // populate matrix
>   for (int i = 0; i < px; ++i)
>   for (int j = 0; j < py; ++j)
>   _Matrix[i, j] = new Celda ();
> 
>  - Jon
> 
> 
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://www.terra.com.br/centralunificada/emailprotegido/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1109851947.488687.3159.cabue.terra.com.br,3962,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 02/03/2005 / Versão: 4.4.00 - 
> Dat 4438
> Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Serializing a Graph ..

2005-02-22 Thread A Rafael D Teixeira
To have it work make nodes and arcs be kept on arraylists 
and inside them use references as indexes (integers). Them serialize
those two arraylists, or a wrapper class containing both. 

public class ArcsAndNodes {

  public Arraylist Nodes;
  public Arraylist Arcs;

  private void Init() {
if (Nodes == null) Nodes = new Arraylist();
if (Arcs == null) Arcs = new Arraylist();
  }

  private static ArcsAndNodes singleton;

  public static ArcsAndNodes AN {
get { 
  if (singleton == null) 
singleton = new ArcsAndNodes(); 
  singleton.Init();
  return singleton;
}
set {
  singleton = value;
}
}

public class Arc {
  public int Weight;
  public int StartNode;
  public int EndNode;

  public Arc(){}

  [XmlIgnore]
  public Node StartAt { get { return (Node)AN.Nodes[StartNode]; } }
  [XmlIgnore]
  public Node EndAt { get { return (Node)AN.Nodes[EndNode]; } }

  public Arc(int n1, int n2) {
StartNode = n1;
EndNode = n2;
StartAt.OutGoingArcs.Add(AN.Arcs.Count);
AN.Arcs.Add(this);
  }
}

and so on...

That is the kind of mapping the xmlserializer would have to 'magically'
discover to be able to serialize your modeled classes...


On Mon, 2005-02-21 at 00:56, David Waite wrote:
> the normal serialization is a bag of unique objects with references
> between them; formatting with Xml implies a parent/child relationship.
> The xml serializer as it exists does not make allowances to directly
> create or use ID/IDREF relationships, which is what you really need
> for your cyclic data structure.
> 
> -David Waite
> 
> On Mon, 21 Feb 2005 00:05:00 +, Phillip Neumann <[EMAIL PROTECTED]> wrote:
> > 
> > 
> > Ive just made the same with  BinaryFormatetr, instead of XmlSerialize
> > 
> > Why does it work? Why does XmlSerilize not work?
> > 
> > 
> > Phillip Neumann wrote:
> > 
> > > Hello all...
> > >
> > > Im doing some work with Graph, so create some clases:
> > >
> > > Node
> > > Arc
> > > Graph.
> > >
> > > (A Graph is a list of Nodes)
> > >
> > > I like the idea about been able to save/load a graph to/from disk.
> > > Im trying to XmlSerialize my graph.
> > >
> > > I have define my graph so, that this cannot be made, becouse:
> > > 1.- Node = { X, Y, ListOfOutgoingArcs }
> > > 2.- Arc= { StartNode, StopNode, Weight}
> > >
> > > This definition is circular
> > >
> > > What do u think is the best to modify, for let the graph been saved to
> > > disk?
> > >
> > >
> > > When i run this, i get this:
> > > 
> > > System.InvalidOperationException: A cirtular reference was detected
> > > while serializing an object of type Node
> > > 
> > >
> > >
> > > thanks in advance,
> > >
> > >
> > >
> > >
> > >using System;
> > >using System.Xml;
> > >using System.Xml.Serialization;
> > >using System.Collections;
> > >
> > >[Serializable, XmlInclude(typeof(Arc))]
> > >public class Node{
> > >
> > >   public ArrayList OutGoingArcs = new ArrayList();
> > >   public int X;
> > >   public int Y;
> > >   public Node(){}
> > >   public Node(int x,int y){
> > >   X=x;
> > >   Y=y;
> > >
> > >   }
> > >
> > >}
> > >
> > >public class Arc{
> > >   public int Weight;
> > >   public Node StartAt;
> > >   public Node EndAt;
> > >   public Arc(){}
> > >   public Arc(Node n1, Node n2){
> > >   StartAt=n1;
> > >   EndAt = n2;
> > >   n1.OutGoingArcs.Add(this);
> > >   }
> > >
> > >}
> > >
> > >[Serializable, XmlInclude(typeof(Node))]
> > >public class Graf{
> > >   public ArrayList Nodes;
> > >
> > >   public Graf (){
> > >   Nodes = new ArrayList();
> > >   }
> > >
> > >   public void Add(Node n){
> > >   Nodes.Add(n);
> > >   }
> > >}
> > >
> > >public class M{
> > >
> > >   public static void Main(){
> > >
> > >   Graf g = new Graf();
> > >
> > >   Node n1 = new Node(1,1);
> > >   Node n2 = new Node(2,2);
> > >
> > >   Arc a1=new Arc(n1,n2);
> > >
> > >
> > >   g.Add(n1);
> > >   g.Add(n2);
> > >
> > >   XmlSerializer seria = new XmlSerializer(typeof(Graf));
> > >   seria.Serialize(Console.Out,g);
> > >
> > >
> > >   }
> > >
> > >
> > >}
> > >
> > >
> > 
> > --
> > 
> > _
> > Phillip Neumann
> > [EMAIL PROTECTED]
> > www.sofsis.cl
> > 
> > 
> >
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://www.terra.com.br/centralunificada/emailprotegido/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1108958430.71341.7577.mongu.terra.com.br,6403,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
>

Re: [Mono-list] GdiPlus NullReferenceException

2005-02-18 Thread A Rafael D Teixeira
libgdiplus simply iniatilizes the needed fields and then mallocs enough
memory for the buffer and returns. Probably malloc is failling to return
the buffer, because it probably isn't thread-safe, and no guarding is
being done on it from what I could check in the sources bitmap.cs
(System.Drawing) and bitmap.c (libgdiplus).

Please post a bug at our bugzilla, for someone better acquainted to go
after it.
(http://bugzilla.ximian.com/enter_bug.cgi?product=Mono%3A+Class%20Libraries)

HIH,


On Wed, 2005-02-16 at 05:40, Yury Serdyuk wrote:
> Hi !
> 
> NullReferenceException is thrown when trying to launch GDI application which 
> uses a lot of threads :
> 
> 
> using System;
> using System.Threading;
> using System.Drawing;
> 
> public class TestGDIPlus  {
>  public static void Main( string[] args ) {
>   int nThreads = int.Parse( args [0] );
>   
>   for ( int i = 0; i < nThreads; i++ ) {
>Thread t = new Thread( new ThreadStart( TestGDIPlus.Run ) );
>t.Start();
>   }
>  }
> 
>  public static void Run() {
>   Bitmap bmp = new Bitmap ( 1000, 1000, 
>   System.Drawing.Imaging.PixelFormat.Format32bppArgb );
>  }
> }
> 
> We run it as
> 
> 
> mono /path/to/TestGDIPlus.exe 8
> 
> 
> Actual Results:
> It throws this exception for each thread
> 
> Unhandled Exception: System.NullReferenceException: Object reference not 
> set to an instance of an object
> in (unmanaged) (wrapper managed-to-native) 
> System.Drawing.GDIPlus:GdipCreateBitmapFromScan0 
> (int,int,int,System.Drawing.Imaging.PixelFormat,intptr,intptr&)
> in <0x4> (wrapper managed-to-native) 
> System.Drawing.GDIPlus:GdipCreateBitmapFromScan0 
> (int,int,int,System.Drawing.Imaging.PixelFormat,intptr,intptr&)
> in <0x00058> System.Drawing.Bitmap:.ctor 
> (int,int,System.Drawing.Imaging.PixelFormat)
> in <0x0006f> (wrapper remoting-invoke-with-check) 
> System.Drawing.Bitmap:.ctor (int,int,System.Drawing.Imaging.PixelFormat)
> in <0x00036> TestGDIPlus:Run ()
> in <0x0005f> (wrapper delegate-invoke) 
> System.MulticastDelegate:invoke_void ()
> 
> or this one
> [EMAIL PROTECTED] tmp]$ mono TestGDIPlus.exe 8
> 
> Unhandled Exception: System.NullReferenceException: Object reference not set 
> to an instance of an object
> in (unmanaged) System.Drawing.Bitmap:.ctor 
> (int,int,System.Drawing.Imaging.PixelFormat)
> 
> This failure is occured only occasionally,
> so one needs to try run program multiply ones,
> as 
> 
> > [EMAIL PROTECTED] tmp]$ mono TestGDIPlus.exe 8 [EMAIL PROTECTED] tmp]$ 
> > mono TestGDIPlus.exe 8 [EMAIL PROTECTED] tmp]$ mono TestGDIPlus.exe 8 
> > [EMAIL PROTECTED] tmp]$ mono TestGDIPlus.exe 8 [EMAIL PROTECTED] tmp]$ 
> > mono TestGDIPlus.exe 8 Unhandled Exception: 
> > System.NullReferenceException: Object reference not set to an instance 
> > of an object in (unmanaged) System.Drawing.Bitmap:.ctor 
> > (int,int,System.Drawing.Imaging.PixelFormat) [EMAIL PROTECTED] tmp]$
> 
> 
> We have tested under Mono 1.0.5 ( libgdiplus-1.0.5 ) and
> Mono 1.1.3 ( libgdiplus-1.1.3 ) with the same result.
> We have used two diffrent glib-2.0 libraries -
> 
> 2.2.1 and  2.4.7 .
> 
> Please, help.
> 
> Thanks.
> 
> Yury Serdyuk.
> 
> 
> 
> 
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://www.terra.com.br/centralunificada/emailprotegido/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1108545090.367220.10824.lusaca.terra.com.br,5322,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 09/02/2005 / Verso: 4.4.00 - 
> Dat 4427
> Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] different behavior between .NET and Mono

2005-02-16 Thread A Rafael D Teixeira
AFAIK, our ADO.NET provider for SQLServer (it is part of Mono) only can
connect with SQL password, as the other protocol is a closed one that
ties with ActiveDirectory and/or NT Domain Controllers. 

Configure your database server to accept SQL connections, otherwise we
can't connect to it.

HIH,

On Wed, 2005-02-16 at 17:18, Michael George wrote:
> I am completely new to Mono.  I'm trying to help someone migrate from a
> Microsoft/IIS/.NET system to a Linux/Apache/Mono system.
> 
> We have both a Microsoft 2003 Server system and a SuSE Linux system, so we
> can run the app in .NET while we (try to) incrementally migrate.  First
> step is to plop the same code from .NET into Mono while still connecting
> to the MS-SQL server on teh .NET system.
> 
> Should be simple enough, I though, just move the code, change the
> connection string and "voila!", but no such luck.
> 
> What I am running into and what I'm hoping for advice about, is that
> watching the MS-SQL server logging output, it appears that the .NET client
> initiates communications differently than the Mono client.
> 
> Differences:
> .NET is using RPC, Mono is using SQL.
> The first query issued by .NET appears to be a connection to the database,
> as expected.  The first query issued by Mono is some strange call to a
> stored procedure that I cannot find anywhere in the system.
> 
> I thought maybe I need ADO.NET installed (not in the mono RPMs), but as I
> understand, ADO is a db abstraction layer.  The authors of the app we want
> to migrade just used SqlClient wherever.
> 
> Anyone have any advice for me?
> 
> -Michael George
>  Ideal Solution, LLC
> 
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://www.terra.com.br/centralunificada/emailprotegido/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1108581524.597052.25240.chipata.terra.com.br,4641,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 16/02/2005 / Versão: 4.4.00 - 
> Dat 4428
> Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Hello, Mono!

2005-02-15 Thread A Rafael D Teixeira
Well the 'mono' you typed at prompt is just the runtime (the program
that will execute your programs)

you need to compile your C# code first using mcs:

mcs -target:exe HelloMono.cs

then you will have a HelloMono.exe that is your C# source compiled to
the standard (multiplataform) format.

Then you can execute it with:

mono HelloMono.exe

Hope it helps, Have fun

On Tue, 2005-02-15 at 15:15, Hernán Nicolás Taboada wrote:
> ___
> namespace HelloMono
> {
> /// 
> /// This is intended to be a funny presentation to the Mono-list
> /// ... i know is probably not that... funny, heh... anyway :p
> /// 
>class Hi
>{
>   static void Main (string[] args)
>   {
>   System.Console.WriteLine ("Hello, Mono!");
>   System.Console.ReadLine;
>   } // end main
>} // end class
> } // end namespace
> ___
> 
> Hello everybody! My name is Hernán and I'm totally new to both the
> Mono Project and the programming world. I'm starting to do my first
> steps reading books like "C# for the  absolute beginner" and so on,
> wich are very helpful for me because they explain the very basics of
> everything :D, really suitable for a totally rookie like me. In the
> other hand, I have a little of experience with Linux, I've installed a
> couple of distros, but I'm far to be a "linux literate", or a "serious
> enthusiast" yet. So well, I'm just trying to follow the exercises
> proposed in those books, so, I've installed Mono vía the YOU facility
> (it stands for YaST Online Update, and also YaST stands for Yet
> another Setup Tool, aw, I'm starting to love acronyms!), then if I try
> to run from a bash console:
> 
> miSuse:/usr/bin # mono
> 
> a lot of interesting compilation options appears but... I don't what
> to do with them :(. Also I've installed the monodevelop IDE but I
> can't figure out how to execute it. I'm using SUSE 9.1 on a laptop. To
> end, sorry if my english skills aren't the best, my native language is
> spanish but i try to do my best :) Well, hope to read from you soon!
> 
> Sincerely,
> Hernán.
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://www.terra.com.br/centralunificada/emailprotegido/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1108487805.390051.23662.chipata.terra.com.br,4813,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 09/02/2005 / Versão: 4.4.00 - 
> Dat 4427
> Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] C#/Mono Serial port communication

2005-02-14 Thread A Rafael D Teixeira
Hi George, see inline:

On Wed, 2004-11-24 at 21:13, George Birbilis wrote:
> > No, I'm not trying this on Windows.
> 
> then why does the error trace say:
> 
> >>> Unhandled Exception: System.IO.IOException: Win32 IO returned 
> >>> ERROR_SEEK.
> >>> Path: /dev/rfcomm0
> 
> should it say "Win32 IO" or is it a "bug" too?

Mono returns the same Exceptions as .NET for I/O, and has a I/O Layer
that mimics the behaviour of Win 32 I/O, hence the very similar message.

HIH,

> 
> -
> George Birbilis ([EMAIL PROTECTED])
> http://www.kagi.com/birbilis
> -- 

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] C# editor

2005-02-11 Thread A Rafael D Teixeira
Actually I use plain-old gedit, most of time. Together with monodoc or
firefox pointing to documentation pages, is a good enough setup. When
starting whole new (sub)projects I tend to use MonoDevelop, but it is
not stable enough (I'm still not using the 0.5.99 new release, that may
improve things).

As for why VS.NET, SharpDevelop, and Monodevelop, and all other IDEs
would ask you to have a project to enable auto-completion is because how
can them magically discover what assemblies will you reference when
compiling your source file aside from asking from you? Just not to ask
everytime you open a source file, that information is persisted in the
project file...

See: you'll have no alternatives here!!!

You could ask why doesn't autocompletion assume you would you be linking
(er, referencing) every assembly the editor can find in your machine?
Basically for performance reasons and to avoid version collisions.

The important concept here is that the source files can't tell by
themselves what libraries will be referenced when they are going to be
compiled, nor if any other source file will be compiled alongside them.

That kind of information is either in the makefiles (normally in a har
to extract form) or in the project file for the specific IDE you may be
using.

Hope it clarifies things,

On Fri, 2005-02-11 at 12:52, Hubert FONGARNAND wrote:
> I can't believe that all novell developpers use only VIM  or emacs to develop 
> a such big project like mono... They certainly use an editor...
> I'm giving a try with eclipse
> 
> Le Vendredi 11 Février 2005 15:30, Aleksandar Dezelin a écrit :
> > I've never heared about autocompletion of C# source files under Linux
> > except in MonoDevelop. SharpDevelop which is GPL-ed has that feature
> > but you will have to work under Windows. It has to build it's
> > autocompletition database so I guess that you also have to open a
> > project in it. Just install Mono for Windows if you want to give it a
> > try.
> >
> > Cheers,
> > Aleksandar Dezelin
> >
> >
> > On Fri, 11 Feb 2005 15:12:01 +0100, Hubert FONGARNAND
> >
> > <[EMAIL PROTECTED]> wrote:
> > > Hello
> > > I'd like to edit some files in the mono (mcs) source code (System.web in
> > > fact). But it's very hard without an editor with exciting feature such as
> > > autocompletion...
> > > I've tried with monodevelop but, if you want to have autocompletion, you
> > > must open a projet... Is it possible to open the mcs source inside a
> > > project in monodevelop? or does it exist an 'adapted to C#' editor?
> > > Sincerely
> > >
> > > (excuse me for my poor english)
> > > --
> > > Hubert FONGARNAND
> > > Ficucial IT
> > > ___
> > > Ce message et les éventuels documents joints peuvent contenir des
> > > informations confidentielles. Au cas où il ne vous serait pas destiné,
> > > nous vous remercions de bien vouloir le supprimer et en aviser
> > > immédiatement l'expéditeur. Toute utilisation de ce message non conforme
> > > à sa destination, toute diffusion ou publication, totale ou partielle et
> > > quel qu'en soit le moyen est formellement interdite. Les communications
> > > sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas
> > > assurée et la société émettrice ne peut être tenue pour responsable de
> > > son contenu. ___
> > > Mono-list maillist  -  Mono-list@lists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/mono-list
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, ASP.NET et Javascript push

2005-02-03 Thread A Rafael D Teixeira
Oh, I forgot to say that even if your server's internet configuration
would allow thousands of live connections being kept, you will have a
much lower limit set by the number of concurrent worker threads
(defaults for some hundreds and is further limited by memory) to service
your ASP.NET requests...

On Thu, 2005-02-03 at 19:57, A Rafael D Teixeira wrote:
> On Thu, 2005-02-03 at 19:14, Alain Perry wrote:
> > On Thu, 3 Feb 2005 12:51:47 -0800 (PST), Joe Audette
> > <[EMAIL PROTECTED]> wrote:
> > > I don't think you should and probably can't keep a connection alive in a 
> > > web
> > > page. 
> > > The web is a stateless environment you request a page, you  get a page,
> > > you're done. 
> > 
> > It indeed is. But the method described (push) enables it to be. It is
> > still necessary to send dummy text to keep the connection alive from
> > time to time, much like a noop in FTP. But it is possible. An example
> > of this is the software that I was using until it became non-free to
> > do what my software will do. It was called webmessenger, was written
> > in PHP and was using javascript push. I belive you can still try the
> > non-free (as in GPL) version for free (as in gratis) at jabbix.com.
> >   
> > > I would suggest you can make additional requests as needed inside an 
> > > IFrame
> > > so the outer page is not refreshed but the page in the IFrame can carry 
> > > on a
> > > dialog back and forth with the server using multiple requests. 
> > 
> > This is called polling, and is not an efficient method either. I do
> > prefer the push method a lot.
> 
> Push is a scalability killer. As ASP.NET and JSP are geared towards
> scalability, they don't match well your requirement.
> 
> ASP.NET is built upon extensive use of the postback method, what means
> that your previous connection will normally get dropped every time the
> user click or even type something in the page. 
> 
> Polling is much better supported in ASP.NET/JSP. 
> 
> If you really really want to cripple your web server (it is even worse
> for a server farm, as PUSH connections, will make load balancing
> unattainable), I suggest you to develop an asp.net handler (.ASHX) that
> is free of the postback paradigm, but I would put it's returns on a
> hidden IFRAME anyway, so that you don't have to lose the RAD features of
> the .ASPX pages when designing them.
> 
> > 
> > Thanks anyway,
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, ASP.NET et Javascript push

2005-02-03 Thread A Rafael D Teixeira
On Thu, 2005-02-03 at 19:14, Alain Perry wrote:
> On Thu, 3 Feb 2005 12:51:47 -0800 (PST), Joe Audette
> <[EMAIL PROTECTED]> wrote:
> > I don't think you should and probably can't keep a connection alive in a web
> > page. 
> > The web is a stateless environment you request a page, you  get a page,
> > you're done. 
> 
> It indeed is. But the method described (push) enables it to be. It is
> still necessary to send dummy text to keep the connection alive from
> time to time, much like a noop in FTP. But it is possible. An example
> of this is the software that I was using until it became non-free to
> do what my software will do. It was called webmessenger, was written
> in PHP and was using javascript push. I belive you can still try the
> non-free (as in GPL) version for free (as in gratis) at jabbix.com.
>   
> > I would suggest you can make additional requests as needed inside an IFrame
> > so the outer page is not refreshed but the page in the IFrame can carry on a
> > dialog back and forth with the server using multiple requests. 
> 
> This is called polling, and is not an efficient method either. I do
> prefer the push method a lot.

Push is a scalability killer. As ASP.NET and JSP are geared towards
scalability, they don't match well your requirement.

ASP.NET is built upon extensive use of the postback method, what means
that your previous connection will normally get dropped every time the
user click or even type something in the page. 

Polling is much better supported in ASP.NET/JSP. 

If you really really want to cripple your web server (it is even worse
for a server farm, as PUSH connections, will make load balancing
unattainable), I suggest you to develop an asp.net handler (.ASHX) that
is free of the postback paradigm, but I would put it's returns on a
hidden IFRAME anyway, so that you don't have to lose the RAD features of
the .ASPX pages when designing them.

> 
> Thanks anyway,
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono framework on Windows

2005-01-30 Thread A Rafael D Teixeira
This is a known issue, because .Net only allows marshalling strings to
dlls either as utf-16 unicode or 'windows' ANSI, and GTK dlls wrapped by
GTK# are expecting utf-8 strings. Lots of code to change in GTK# (in the
API generator and in the custom wrappings) to make it work correctly
with .NET, awaiting for volunteers...

These issues are better discussed in the gtk-sharp list.

Fun,

On Sun, 2005-01-30 at 14:09, felipe maya wrote:
> Hello 
> 
> >> I have Windows 2000 Server with Mono and GTK# installed. The only
> way 
> >> I've found to get GTK# executables to launch is by manually typing
> "mono 
> >> [filename]" in the Mono console. Is there a way to link it up and
> make 
> >> it as simple as double-clicking the file in explorer? 
> 
> >Use Paco's Windows installer, that will install Gtk# into the .NET
> GAC. 
> 
> I found that GTK# applications executed with Microsoft .NET that has
> encoding UTF8 for acute like "\u00f3", don't produce any acute.
> Example: Aplicaci\u00f3n >> Aplicacin. (Should be Aplicacin) 
> 
> The Paco's installer is based in Microsoft .NET framework and then
> this only work for people that don't need any special characters in a
> label text. 
> 
> WITH MONO DONT HAS ANY PROBLEM. 
> 
> THANKS
> __
> Consigue tu correo GRATIS en Manizales.com,
> dale vida a tus mensajes con más de 300 motivos grficos.
> Busca el portal de tu ciudad en http://66.216.122.105
> ___ Mono-list maillist -
> Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list 
> 
> 
> __
>  E-mail classificado pelo Identificador de Spam Inteligente.
> Para alterar a categoria classificada, visite a Central do Assinante
> 
> 
> __
>  Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 27/01/2005 / Versão:
> 4.4.00 - Dat 4423
> Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Apache ASP.NET module for Fedora Core 3

2005-01-30 Thread A Rafael D Teixeira
AFAIK, we are just not packaging for FC3, the FC2 packages should just
work, but unless you know how to trick yum, you need to install them by
downloading and installing by hand with rpm.

Hope it helps,

On Sun, 2005-01-30 at 02:27, Neil Zanella wrote:
> Hello,
> 
> I would like to know how come the mono ASP.NET apache mod_mono is
> module is not available for Fedora Core 3. Did something major change on
> Fedora Core 3 compared to Fedora Core 2 that introduced some
> incompatibilities? Should I be downgrading to Fedora Core 2 to
> get it to work. That would be somewhat impractical since I am
> working on some stuff which requires some FC3 features.
> 
> Any feedback and suggestions welcome,
> 
> Thanks once again to all developers for developing mono,
> 
> Best Regards,
> 
> Neil Zanella
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://www.terra.com.br/centralunificada/emailprotegido/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1107059331.234618.2042.mueru.terra.com.br,3708,Des15,Des15
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 27/01/2005 / Verso: 4.4.00 - 
> Dat 4423
> Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono libraries

2004-12-16 Thread A Rafael D Teixeira
On Wed, 2004-12-15 at 12:29, Martin Hansen wrote:
> Hi All
> 
> I downloaded mcs-1.0.4, and it compiled fine.
> 
> But I cannot figure out how to convince mcs/mono to use the libraries that I 
> compiled.
> I knoe that the is a switch for mcs -L or -lib: but they will not stop mcs to 
> search in standard libs too. As I tried:
> mcs -lib:/home/notexistingdir Main.cs
> And it compiled.
> 
> I also tried 
> mcs -nostdlib -lib:~/monotest/lib Main.cs
> but that would not compile
> 
> First time I compilled there where just a set of links in ~/monotest/lib 
> pointing to the ones in /usr/lib. Then I set the 
> LIBRARY_INSTALL_DIR=~/monotest/lib and ran make now I got the asemblies in 
> there.
> 
> Am I wrong in doing this?

The -lib: command line option just adds paths to search for referenced
libs, but doesn't tell mcs which libs you want to use.

For that you have to reference them using -r:. 

While doing so it's better to fully qualify the reference so that you
will get the correct version of it, instead of relying on -lib:,
specially if you some of your libs have the same filename as some other
living in some directory from the MONO_PATH list or installed in the
GAC.

Example:

mcs -nostdlib -r:/monotest/lib/myownlib1.dll -r:/monotest/lib/System.dll Main.cs

Also, using -nostdlib means you'll have to reference some version of
System.dll and System.Xml.dll by hand if you need some thing inside them
(and most of time you need).

Hope it clarifies things a little more.

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] how can i start with clicking?

2004-12-06 Thread A Rafael D Teixeira
Hi,

On Mon, 2004-12-06 at 09:57, caner Sahan wrote:
> Hi;
> 
> When we write a program with mono,we are using console to start for
> .exe  .But i don't want to start my .exe file from console.How can i
> solve this problem?Is it possible? "click and start"?windows or linux
> not matter?

In Linux:

The best approach to deal with it in Linux is to create shell script
wrappers like those that exist for mcs/mbas/etc. in mono. These are
clickable to run.

Another way is to use binfmt kernel support to map .exe files to be
executed with mono (will render wine useless, unless someone has coded a
smarter selector that see if it is a managed exe or not and calls wine
or mono as needed).

In Windows:

With .NET runtime, they are fully clickable, but should be compiled as
winexe not to open a console window. 

If you have only mono installed in windows, you need to do .bat
wrappers, as we don't implement a native mscoree.dll or something
similar to start mono automatically for managed exes.

> 
> Regards 
> 
> Caner ÞAHAN
> 
> www.csharpnedir.com (One of the best .NET webside in Turkey about
> Mono)

Hope it helps,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] mdb problem on Linux

2004-11-17 Thread A Rafael D Teixeira
Do you have libgda, and mdb-tools (http://mdbtools.sourceforge.net/)
installed? 

Our OLEDB ADO.NET implementation links to libgda and uses its configured
providers.

Also see the FAQ to know the limitations of mdbtools (
http://mdbtools.sourceforge.net/faq.html), being the most important that
it gives readonly access to mdb files.

It is well advised to migrate your data to some *real* database, like
PostgreSQL, instead of keeping it in a undocumented and limited file
format.

Good luck,

On Wed, 2004-11-17 at 06:31, mdb teszt wrote:
> Hi, 
> 
> I'm trying to get an OleDbConnection to my mdb database file. 
> I get an error message when I try use DataReader: 
> 
> Stack Trace: System.InvalidOperationException: State != Open 
> in <0x0008f> System.Data.OleDb.OleDbCommand:ExecuteReader 
> (System.Data.CommandBehavior) 
> in <0x00054> (wrapper remoting-invoke-with-check) 
> System.Data.OleDb.OleDbCommand:ExecuteReader 
> (System.Data.CommandBehavior) 
> in <0x00016> System.Data.OleDb.OleDbCommand:ExecuteReader () 
> in <0x00050> (wrapper remoting-invoke-with-check) 
> System.Data.OleDb.OleDbCommand:ExecuteReader () 
> in <0x000ad> ASP.monomdb_aspx:btnLekerdezes_Click 
> (object,System.EventArgs) 
> in <0x00069> (wrapper delegate-invoke) 
> System.MulticastDelegate:invoke_void_object_EventArgs 
> (object,System.EventArgs) 
> in <0x0009e> System.Web.UI.WebControls.Button:OnClick 
> (System.EventArgs) 
> in <0x00058> 
> System.Web.UI.WebControls.Button:System.Web.UI.IPostBackEventHa
> ndler.RaisePostBackEvent (string) 
> in <0x00016> System.Web.UI.Page:RaisePostBackEvent 
> (System.Web.UI.IPostBackEventHandler,string) 
> in <0x0003e> System.Web.UI.Page:RaisePostBackEvents () 
> in <0x002c3> System.Web.UI.Page:InternalProcessRequest () 
> in <0x000c2> System.Web.UI.Page:ProcessRequest 
> (System.Web.HttpContext) 
> in <0x002eb> ExecuteHandlerState:Execute () 
> in <0x00084> StateMachine:ExecuteState 
> (System.Web.HttpApplication/IStateHandler,bool&)
> 
> 
> What do I doing wrong? What is the right connect string?
> 
> Thanks!
> 
> werd
> 
> 
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: VirusScan / Atualizado em 10/11/2004 / Versăo: 1.5.2
> Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://www.terra.com.br/centralunificada/emailprotegido/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1100680338.995854.9781.corinto.terra.com.br
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Re: question about Npgsql and WebServices

2004-11-15 Thread A Rafael D Teixeira
Looks like you are forgetting to put a @Assembly directive in your
.asmx. Like:

<%@ Assembly Name="Npgsql" %>

See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfassemblydirectivesyntax.asp

And remember 

Namespaces != Assemblies 

The 'using namespace' part only facilitates your coding, because you
don't have to fully qualify all referenced symbols from another
namespace.

-r:assembly (or in ASP.NET the @Assembly directive) tells the compiler
to make the public definitions available in the assembly available to
use in your code (in fully-qualified-form).

Hope it clarifies a bit,


On Fri, 2004-11-12 at 13:36, Aleksandar Radulovic wrote:
> Hi,
> 
> I have fixed this by manually compiling the assembly WebService.. What
> I am still looking into is how to make XSP compile my WebService on
> the fly..
> 
> alex.
> 
> On Fri, 12 Nov 2004 14:24:14 +, Aleksandar Radulovic
> <[EMAIL PROTECTED]> wrote:
> > Hi to all!
> > 
> > I am developing a WebService under Mono to deliver some data from the
> > PostgreSQL database. The problem is how to reference the Npgsql
> > library with the WebService.
> > 
> > In the WebService code i simply added "using Npgsql", considering that
> > the assembly is in the GAC and there are no references for System.*
> > stuff, i expected it to work fine.
> > 
> > Nevertheless, the Compilation error I get is the following:
> > ---
> > Compilation Error
> > Description: Error compiling a resource required to service this
> > request. Review your source file and modify it to fix this error.
> > 
> > Error message: C:\DOCUME~1\alex\LOCALS~1\Temp\38751.cs(14,0) : error
> > CS0246: The namespace `Npgsql' can not be found (missing assembly
> > reference?) (0,0) : error failed: 1 error(s), 0 warnings
> > 
> > File name: C:\DOCUME~1\alex\LOCALS~1\Temp\38751.cs
> > 
> > Line 1: No assembly returned after compilation!?
> > ---
> > 
> > How could I reference this assembly to the compiler?
> > 
> > The development environment is Mono 1.0.4 (XSP 1.0.4) for Windows -
> > same thing happens under Debian.
> > 
> > I have searched the documentation and the lists and didn't find any
> > mention of this. My lack of knowledge of WebServices under Mono is
> > probably the cause of this problem and I would appreciate a lot if
> > someone could shed some light into this for me..
> > 
> > Thank you very much for your help.
> > 
> > alex.
> > --
> > Pozdrav / Regards
> > Aleksandar
> > 
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] Language Clarification

2004-10-12 Thread A Rafael D Teixeira
Hi David,

There is two things you should know that affect your case:

1) as mentioned, Microsoft.VisualBasic is referenced for basically ANY
VB.NET solution, because without it you would not be able to use
language features like VB Modules or late-binding (Option Strict Off),
also useful things like Mid(), IsNumeric(), all reside in that
assemblies, whose implementation is halfway in Mono (we cover 100% of
the API, but throw many NotImplementedExceptions currently). 


Generally speaking C# is the only .NET language whose the whole runtime
support it needs is just what the .NET base class library offers. VB.NET
needs Microsoft.VisualBasic.dll, JScript.NET needs
Microsoft.JScript.dll, VisualC.NET needs Microsoft.VisualC.dll, Boo
needs Boo.dll, Nemerle needs Nemerle.dll, and so on.


2) ASP.NET pages are compiled on the fly (codebehind is compiled and
copied by VS.NET, but pages are left to be compiled by the ASP.NET
infrastructure). This demands that *CodeProvider/*CodeCompiler families
of classes, one pair for each supported language, be available. Well our
VBCodeProvider implementation is not currently as much tested as our
CSCodeProvider. Also VBCodeCompiler delegates to mbas (our VB.NET
Compiler) the hard work of compiling and our compiler is at alpha stage,
and currently is so slow that it times out inside the ASP.NET
infrastructure. 

Just as a comment: Delegation to the command line compilers is the
approach taken by Microsoft and Mono, for each *CodeCompiler class
implementation currently distributed. A process is spawn to compile the
temporary source-file created with the *CodeProvider, and it's output is
captured and parsed to expose found errors in the ASP.NET way.

I hope this bring some light, on why we still recommend to currently use
only C# ASP.NET pages with Mono/mod_mono/xsp.

If all your code can be placed in code-behind dlls, that you compile
with vbc on windows (by using VS.NET), you may try run then on Mono, but
our Microsoft.VisualBasic.dll implementation may not be complete enough
for you to have a smooth ride.

Regards,

On Tue, 2004-10-12 at 14:54, David P. Donahue wrote:
> Likely.  I recall that coming up before in my quest.  When you say "by
> default" are you implying that there's a way to use other libraries
> instead?
> 
> 
> Regards,
> David P. Donahue
> [EMAIL PROTECTED]
> 
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf Of Dan Maltes
> > Sent: Tuesday, October 12, 2004 12:18 PM
> > To: 'David P. Donahue'; [EMAIL PROTECTED]
> > Subject: RE: [Mono-list] Language Clarification
> > 
> > 
> > Is your Grid sample referencing anything in 
> > Microsoft.VisualBasic.dll?  I
> > believe VS.NET references this library by default when 
> > compiling VB.NET
> > projects.
> > 
> > -Dan 
> > 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of David 
> > P. Donahue
> > Sent: Tuesday, October 12, 2004 11:21 AM
> > To: [EMAIL PROTECTED]
> > Subject: [Mono-list] Language Clarification
> > 
> > I realize that Mono focuses its development on C# as a whole, but I'm
> > wondering something about other languages in general.  I'm no 
> > expert on the
> > core of .NET, but I was under the impression that one of its 
> > features is
> > that code from any .NET language, when compiled, becomes a 
> > single common
> > language for any .NET interpreter (such as Mono) to use.
> > That is, if I write something in VB and compile it in Visual 
> > Studio, the end
> > result is no different (not critically different, anyway) from the end
> > result that would be achieved had I used C# or any other .NET 
> > language.  Is
> > this the case?
> > 
> > If so, then I'm unclear on a problem that I've been having 
> > (and have been
> > receiving very help assistance on, thanks to this mailing 
> > list) in trying to
> > get an ASP .NET web application written in VB to work on Mono.
> > 
> > I was told of a work-around to get my first test page to 
> > work, which was to
> > set the page language to C# even though my code-behind was all in VB.
> > This worked... for that small test page (which consisted of a 
> > button which,
> > when pressed, changed a property on a label).  My next test 
> > was to use a
> > DataGrid and grab a table from a database.  This page is slightly more
> > complex as a test, since it has more functions in the 
> > code-behind and has
> > some VB code in the design of the .aspx file itself.
> > The aforementioned work-around doesn't seem to extend this 
> > far, as setting
> > my page language to C# now results in a vague "object 
> > reference not set to
> > an instance of an object" error (with no obvious mention of 
> > the object in
> > question).  And, of course, setting it back to VB results in 
> > a "thread was
> > being aborted" error that caused the need for the aforementioned
> > work-around.
> > 
> > If my originally mentioned impression of how .NET works is

Re: [Mono-list] directory path separator

2004-09-17 Thread A Rafael D Teixeira
On Thu, 2004-09-16 at 11:02, Malcolm Parsons wrote: 
> On Thu, 16 Sep 2004 07:50:56 -0600, Kevin White <[EMAIL PROTECTED]> wrote:
> 
> > I'd like my code to be portable between windows and linux using .Net
> > and mono.I take one of the "special" folders from
> > Environment.GetFolder(), and append some directory structure to that
> > to do some work.  How do I know what folder separator to use?
> 
> System.IO.Path.DirectorySeparatorChar

Better yet use the Path class static Combine method to compose paths
from parts. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiopathclasscombinetopic.asp


-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] GAC problem

2004-07-15 Thread A Rafael D Teixeira
Hi Jasper,

On Thu, 2004-07-15 at 12:07, jasper van putten wrote:
> I have installed mono with red-carpet, which created the gac directory
> under /usr/lib/mono. And I built monodoc from cvs ,which created a gac
> directory under /usr/local/lib/mono.

Before building monodoc from sources configure to the right prefix:

./autogen.sh --prefix=/usr
make
make install

It will be installed in the same prefix as the red-carpet packages

Hope it helps,
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono: Post 1.0 plans and development update.

2004-07-15 Thread A Rafael D Teixeira
On Thu, 2004-07-15 at 03:04, Igor Georgiev wrote:
> Most importanat feature for ASP.NET  in my opinion is
> 2.0's Client Callback Feature.

Yes, finally they implemented that useful feature, something I already
implemented 4 years ago in my XML/XSLT web framework written in ASP/VB6.

For those not knowing what Client Callback means see:

http://www.dotnetjunkies.com/Tutorial/E80EC96F-1C32-4855-85AE-9E30EECF13D7.dcik

Well we can do it, and as I've done back them we can get it without
needing XMLHTTP: we can just use a hidden IFRAME a secondary form and
some inter-frame javascripting, not very pretty, but effective and able
to run in any modern browser.

Im my previous framework, besides on-demand expanding tree-views I've
built paged-combo-boxes and on-the-fly lookup-filled controls (the user
filled a key value in one input box, and a server-lookup brought
dependent values). 

So we can do a lot better in that area...

Any volunteers? Currently I can help only with advice/guidance, because
I'm very busy with mbas.

Cheers,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Embedding mono

2004-06-22 Thread A Rafael D Teixeira
Inline
On Fri, 2004-06-18 at 23:34, Jonathan Pryor wrote:
> On Fri, 2004-06-18 at 16:08, Joe Ante wrote:
> > > It should be possible to load assemblies on demand.
> > Ok so how exactly does this work?
> > 
> > Say I have two .cs files. One calls a function in the other .cs file.
> > Obviously just compiling the two .cs files seperately in two different
> > .dll's gives me a compile error for the .cs file that tries to use the other
> > .cs file.
> 
> Circular dependencies are notoriously complicated in a statically typed
> environment.  The simple answer would be to put both .cs files into the
> same assembly, but this isn't apparently what you want to do.
> 
> Paolo could answer this better, but I would imagine that assemblies are
> demand-paged from disk -- only the parts of the assembly that you
> actually use are loaded, so I don't see any reason to not put everything
> into the same assembly.

Yes, as calling the compiler has always a measurable initializing cost,
I would go further and suggest to compile all the scripts as single
source, every time. The question here is how big will your scripts be?
See below

> > So is there some kind of import/include mechanism?
> 
> I'm not sure what you mean by import/include, but I imagine it's related
> to your questions below, so hopefully my answers below will help.

Yes, it's called a reference to an external assembly, but you can mess
with it, it is internal to the compiler mechanism.

> > The problem I am trying to solve is:
> > 
> > We have a game creation tool which includes a text editor to change scripts
> > (At the moment using python). Python has a import function, which is
> > necessary if you want to use a class that is defined in another script file.
> > We intercepted the import function and returned it the correct python script
> > and built a dependency tree. When the user saves a pythonscript we recompile
> > all pythonscripts that import the script the user has changed.
> > It is very important for us that saving/recompiling is immediate (less than
> > half a second).

If your scripts total some thousands of lines it is possible to
recompile them fast (but particularly the startup time for any compiler
may be more than half a second even on fast machines.

The important thing is: recompiling things means no instances can be
kept running around, everything will have to be restarted afterwards. Is
that true for your engine? Jon seems to believe it is not, from what you
can read below, but that is not a safe thing to do.

> > So whats the best way to do that?
> 
> It sounds like you want a highly dynamic environment, in which existing
> code can be changed at runtime, with older code silently invoking newer
> code.
> 
> I don't believe it's possible, or at least easily possible, to do this
> in C#.  This sounds more like something System.Reflection.Emit and a
> custom compiler would be useful for.  That way, you could ensure fast
> compile time, and you could come up with a custom way for pre-existing
> code to invoke newer code without requiring recompilation (interfaces
> might be good for this).

> I would suggest looking into IronPython, which is a Python
> implementation for .NET.  This may be an easier migration path for you,
> assuming you can actually get your hands on it (it's currently a
> "unreleased research prototype", but the author might be willing to
> help; I have no idea...).

As Rodrigo has pointed out in another email, now there is his new
language: Boo a statically-typed Python-lookalike. It's a very
interesting language and the compiler is a configurable pipeline, where
you can plug your own pieces to augment or personalize it. More:
probably it could be kept loaded as a library instead of as an
executable to help you with the initialization time. That is also
possible but not easily done with mcs/mbas code.

Hope it helps,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Embedding mono

2004-06-22 Thread A Rafael D Teixeira
inline:
On Fri, 2004-06-18 at 08:40, Jonathan Pryor wrote:
> On Fri, 2004-06-18 at 05:08, Joe Ante wrote:
> > Our script files are currently not stored as individiual text files instead
> > they are serialized in one big file. Is it possible to pass mono a c string
> > for compiling instead of a file?

Yes, see below

> It's mcs which does the compiling, and mcs reads from files.  So No, you
> can't store the scripts as a C-string within your program.

Sorry Jon, I tend to disagree, when looking at it as what we have as
exposed functionality. See below

> If the user can add their own scripts, you could store them as strings
> within a large file, but you'd have to write them to a temp file for mcs
> to compile.  You could then dynamically load the new assemblies at
> runtime.

Just to make it less frightening. We already have classes/methods to do
just that (compile a source passed as a string) for C#/VB.NET, the same
ones ASP.NET uses: CSCodeCompiler and VBCodeCompiler. It currently does
make all the same hard work of saving to a temp file, exec'ing the
compiler and parsing the results, but it's already done, so who needs
just can use it.

Just clarifying things a bit, 

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Logic/Reason to ASPX caching ?????

2004-06-17 Thread A Rafael D Teixeira
Inline,

On Tue, 2004-06-15 at 13:21, ted leslie wrote:
> Anyone know what the story is on the caching of ASPX files,
> what i mean is,
> 
> I change code in a ASPX file and re-run the page, and I may/or may not 
> get the change,
You always get the changes when changing the page, directives-driven
caching is limited to the output and dependent on the source page, and
can be made dependent on other conditions

> I can reset the mono service, and it will allways refresh, but you don't 
> always have to do this.

You never should have to reset the service, just "touch" a dependency,
like Web.Config, then XSP will restart the ASP.NET application affected
(and no other).

>  From a hosting-company point of view, it would be important not to have 
> to restart server to get a ASPX page to refresh,
> anyone know what the scoop is here?

As I said the only chance caching would make a page not to refresh is if
you explicitly (by code) cache a page or parts of it without any
dependencies and without a timeout. That is just bad application design
not something inherent to ASP.NET caching, so bill your client the time
your team will need to debug the client app and correct it's caching
policies.

> -tl

Hope it Helps,
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono Library Paths on OS X

2004-06-15 Thread A Rafael D Teixeira
Additionaly, if you are asking about Managed Libraries (Assemblies),
there is a MONO_PATH environment variable to add directories that will
be searched. Also if your assemblies are digitally signed they can be
installed in the GAC (Global Assembly Cache) where they can be used from
ANY managed program/library.

On Tue, 2004-06-15 at 03:52, Benoit wrote:
> > In which path should mono libraries reside on OS X, or is there a 
> > environment variable for this?
> > Elfred Pagán
> 
>   In beta 1 all was installed in /opt/local and this is what I add to my 
> zsh shell in order dor mono to work :
> 
> - -
> PATH=$PATH:/opt/local/bin
> PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/local/lib/pkgconfig
> MANPATH=$MANPATH:/opt/local/man
> 
> export PATH
> export MANPATH
> export PKG_CONFIG_PATH
> - -
> 
>   In beta who have the choice between an install in /opt/local and 
> another one in the standard framework path of Mac OS X (I haven't test 
> this one so I can't say anything more on it).

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] REQUEST

2004-06-07 Thread A Rafael D Teixeira
On Wed, 2004-06-02 at 14:42, Alessandro wrote:
> I'm trying to start a simple windows .net form compiled with C# and also with mcs.exe
> the result i the same:
> On windows platform with .net framework all works fine and I see my form (a simple 
> form without
> controls)
> Wine is the last ver and works fine, I 've installed all cairo etc and winelib
> N.B: Console applications on mono work fine

First, Win Forms are just a preview currently in Mono, because they
aren't complete and rock-stable. But let's look at your problem.

> 
> On mono this is the result :
> 
> bash-2.05b# mono -v Form1.exe 
> Method (wrapper runtime-invoke) System.OutOfMemoryException:.ctor (object,intptr
> ,intptr) emitted at 0x40928000 to 0x4092809a [Form1.exe]
...
> Method (wrapper runtime-invoke) System.StackOverflowException:.ctor (object,intp
> tr,intptr) emitted at 0x40928258 to 0x409282f2 [Form1.exe]
...
> Method (wrapper runtime-invoke) WindowsApplication2.Form1:Main (object,intptr,in
> tptr) emitted at 0x40928460 to 0x409284e0 [Form1.exe]
...
> Method WindowsApplication2.Form1:Main () emitted at 0x409284e8 to 0x40928516 [Fo
> rm1.exe]
...

Well looks like you are consuming all your memory/stack-space, because
you are calling Main recursively in the Form constructor.

DON'T DO THAT!!! Main is automatically called by the runtime, and it
normally calls the constructor for the main form, not the reverse. You
are just making it into infinite recursion... What truly can't be
infinite because at some point you consume too much resources (memory in
your case) and the program aborts.

Also it helps to read your code and the stack trace, to find what and
where the error is so probably you could figure out yourself what was
wrong.

Hope it helps,
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Difference between mono and mint ?

2004-06-07 Thread A Rafael D Teixeira
On Mon, 2004-06-07 at 06:12, HannibAl Bundie wrote:
> Hi,
> 
> I'm sorry, but I don't understand the difference between the runtimes mono 
> and mint. The web page about the Mono runtime on www.go-mono.com doesn't 
> satisfy me.

Mono is a JIT runtime, what means that as needed it gets the bytecode
for a method and compiles on first use to machine language for the
processor the runtime was compiled and must be running on.

Mint is a interpreter, what means that it just gets the bytecode and
iterates over it executing routines for the appropriate opcode found.

Mono gives you the best performance, but must support your hardware
architecture. Mint is more portable as it is expressed in C and does
things in the most architecture-independent way possible, but as
performance is normally very important it is just used as porting helper
while the archicteture isn't mapped inside Mono (the runtime).

Hope it helps,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono & Microsoft SQL Server 2000 Reporting Services

2004-05-27 Thread A Rafael D Teixeira
On Wed, 2004-05-19 at 21:04, Andrew Atkinson wrote:
> Hi,
> 
> We have some web based reports written with Microsoft SQL Server 2000
> Reporting Services (see
> http://www.microsoft.com/sql/reporting/default.asp) that we would like to
> deliver from a Linux/Apache web server running Mono rather than
> delivering from Windows/IIS.  We are totaly new to Mono and do not know
> if this is possible or not.
> 
> Has someone already been able to do this successfully yet?
It might be technically possible, but I think there are ties to COM+
that can't be dealt with Mono/Linux. But BEWARE, see below...
> 
> It appears that alot of the MS SQL Reporting Services aspx pages use the
> following namespace:
>Namespace="Microsoft.ReportingServices.*"
> Will these classes run under mono simply by coping over the relevant .dll
> files from Windows 

BEWARE: read the MS licenses. Recently they have added a clause that
expressly forbids you to run the libraries/programs in another operating
system  (I saw that in the WSE2 final release license). So you can't
copy Microsoft dlls (even the "freely-redistributable" runtime ones) to
Linux/etc.. and execute them with Mono/PNET/ROTOR...

> or is there another smarter way of accessing/running
> these reports from Linux/Apache?

Not that I know of. Microsoft is entering the Crystal Reports/Info
market with a quite capable offering, but they are obviously binding it
to their platform. I dreamed of implementing a competing beast but I
have no time for it know and in the foreseable future. Maybe you should
first research the, I think PHP-based, free-software offerings, instead
of committing yourselves to this new MS beautiful trap..

> 
> Many thanks,
> Andrew
> -- 
>   Andrew Atkinson
>   [EMAIL PROTECTED]
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Re: [mono-vb] Simple example Compiling dificulties

2004-05-27 Thread A Rafael D Teixeira
Sorry for answering late, well

On Sat, 2004-05-22 at 23:01, Mauricio Henriquez wrote:
> Hi:
>  
> I try to compile a simple VB .NET example with "mono-BETA1" on
> Windows, but the following message appear:
>  
>  
> C:\Archivos de programa\Mono-0.91\lib\mono\1.0>mbas
> C:\monovb_pr1\gtk.vb -r gtk-sharp
>  
> Unhandled Exception: System.IO.FileLoadException: Strong name
> validation failed
> for assembly 'Mono.GetOptions'.
> File name: "Mono.GetOptions"

You are trying to run with .NET instead of Mono, so the problem is that
the needed library Mono.GetOptions is installed to Mono GAC not .NET's.

Try using mbas.bat, or you'll have to install Mono libraries in the .NET
GAC with their Gacutil.

Hope it makes sense to you,

MONO-LIST: This denotes an assumption with our installer for windows,
that if you are installing Mono, you will use it if not exclusively, but
in a separated setup (setting environment variables, using the .BAT
wrappers and so on) from .NET's. I myself get upset lots of times trying
to run the executables and seeing the same type of error as Mauricio,
because it automatically got executed by .NET instead of Mono.

THE QUESTION:
Should our windows installer put the Mono-exclusive stack in .NET's GAC
also, to be able to run mono apps flawlessly with .NET framework? 

Regards,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Fwd: Re: [Mono-list] Component services]

2004-05-26 Thread A Rafael D Teixeira
Oops, forgot to copy the list...

-Forwarded Message-
> From: A Rafael D Teixeira <[EMAIL PROTECTED]>
> To: KiOrKY <[EMAIL PROTECTED]>
> Subject: Re: [Mono-list] Component services
> Date: Wed, 26 May 2004 11:59:41 -0300
> 
> On Wed, 2004-05-26 at 11:36, KiOrKY wrote:
> > Yeah, 
> > so i want just to test for example a "mutli base" operation:
> >i soustract X from base A and add these X to base B.
> > BTW i want to assure integrity of this operation.
> 
> Well, we support ADO.NET Transactions, but as we currently don't have a
> DTC (Distributed Transaction Coordinator), distributed transactions
> aren't supported. Care to implement a DTC for Mono?
> 
> > 
> >This is simple under .net and as you say component servives using COM+ MTS
> > 
> > Is that possible?
> > regards
> > 
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Component services

2004-05-26 Thread A Rafael D Teixeira
On Wed, 2004-05-26 at 10:09, KiOrKY wrote:
> Hi
> I ask myself about:
> How do the component services work in mono?
> where can we give the parameters?
> Regards

Hi Kiorky,

IMPORTANT: It would help a lot if you could write COMPLETE questions.
Deciphering your intentions is hard.

Answers:
Component Services are provided by COM+ in windows, and tie with .NET
with the help of the classes in System.EnterpriseServices namespace. We
don't have such a beast as a COM+ infraestructure in Linux, so Mono does
implement very little of what is in the System.EnterpriseServices
namespace. Try alternative approaches to develop your applications (COM+
is also being abandoned in favor of Longhorn's Indigo, even by
Microsoft).

What parameters are you refering to? Most things in .NET around
Component Services is just dealt by tagging classes with specific
Attributes, so that the com-wrappers that System.EnterpriseServices put
in place expose the correct COM face to the COM+ container. Don't even
try that with Mono, we won't implement COM Wrappers, period.

Hope it clarifies a bit,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Execution result of VB Runtime tests on Mono

2004-05-25 Thread A Rafael D Teixeira
On Tue, 2004-05-25 at 02:20, B Anirban wrote:
> Hi All,
> I have executed the VB Runtime tests developed by MainSoft on Mono.
> 
> The results are published in following link
> http://codeblogs.ximian.com/blogs/banirban/archives/VBTests/log_linux.html/exec_log_linux.html

Nice, saved it into text and with some grepping we have

[rafael]$ grep "OK" mainsoft-testsuite-results | wc -l
475
[rafael]$ grep "Failed" mainsoft-testsuite-results | wc -l
264

So we have something like 64 % OK, that is a good number. But surely the
other 36% just tell us we aren't ready for prime time, yet. 

The best thing is that now we have some metric to measure our progress
to Mono 1.2. By then we better score 100% in this test-suite as well in
our compiler test and also in our Nunit tests for MS.VB.dll, that
probably must grow a lot during that time.

Thanks Anirban,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Could not find attribute 'TraceExtension' while attempting to open ConverterService.asmx

2004-05-17 Thread A Rafael D Teixeira
On Sun, 2004-05-16 at 09:47, Bartlomiej Zass wrote:
> Hi!
> 
> I have a problem with opening TestService.asmx demo from the xsp 0.13.
> Mono throws exceptions about the attribute "TraceExtension" (error msg
> attached below). Other demo applications work all right.
> Can anybody help me fixing this problem?


> Compilation Error
> Description: Error compiling a resource required to service this
> request. Review your source file and modify it to fix this error.
> 
> 

See the answer given some time ago: 
http://lists.ximian.com/archives/public/mono-list/2004-January/017712.html


> Thanks in advance!
> 
> Best regards,
> Bartek Zass
> 

Hope it helps,
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Command line processing tool in C#

2004-05-04 Thread A Rafael D Teixeira
Inline,

Context of this thread: Now talking about Mono.GetOptions

On Sun, 2004-05-02 at 14:27, Thomas R. Corbin wrote:
> On Thursday April 08, 2004 11:33 am, A Rafael D Teixeira wrote:
> > Inline...
> 
>   This stuff is really excellent, and I am really enjoying using it.
> 
>   I'm wondering, however, if there's a way to specify a default value for an 
> option, for display in the --help output?

Currently you set the value with an initializer and write about it on
the description. 


...
[Option("The maximum {number} of times to retry the connection [default = 4]", 'r', 
"retries")]
public int retries = 4;
...


But if you want it open a wishlist-type case in bugzilla for it, please.
After Mono 1.0, probably I'll find some time to work on it. Something
like


...
[Option("The maximum {number} of times to retry the connection [default = @default]", 
'r', "retries")]
public int retries = 5;
...


The expected result would be a line in help like

 -r --retries:number  The maximum number of times to retry the connection [default = 5]

Suggestions welcome!!!

Best regards,
 
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] When trying to 'make install' gtk-sharp, gacutil says 'ERROR: assembly has no valid public key token'

2004-05-03 Thread A Rafael D Teixeira
All current cvs, I saw the make happening and verified the existence of
gtk-sharp.pub, and used monosn to verify that the assembly is signed:

[EMAIL PROTECTED] gtk]$ monosn -t gtk-sharp.dll
Public key token is 1a737b83db822579

But

[EMAIL PROTECTED] gtk]# make install
Making install in .
make[1]: Entering directory `/home/rafael/projetos/gtk-sharp/gtk'
make[2]: Entering directory `/home/rafael/projetos/gtk-sharp/gtk'
make[2]: Nothing to be done for `install-exec-am'.
echo "/usr/bin/gacutil /i gtk-sharp.dll /f /root
/opt/cli/gtk-sharp/0.18/lib";  \
/usr/bin/gacutil /i gtk-sharp.dll /f /root /opt/cli/gtk-sharp/0.18/lib
|| exit 1;
/usr/bin/gacutil /i gtk-sharp.dll /f /root /opt/cli/gtk-sharp/0.18/lib
ERROR: assembly has no valid public key token
make[2]: *** [install-data-local] Error 1
make[2]: Leaving directory `/home/rafael/projetos/gtk-sharp/gtk'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/rafael/projetos/gtk-sharp/gtk'
make: *** [install-recursive] Error 1

Any clues?

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] 'configure: error: No gacutil tool found' in monodoc tree

2004-05-03 Thread A Rafael D Teixeira
recently added gacutil wrapper wasn't on my path (moving to a new
prefix). Sorry for the noise.

On Mon, 2004-05-03 at 09:48, A Rafael D Teixeira wrote:
> Also, gacutil is needed by autogen.sh in monodoc, but it can't be found.
> 
> [EMAIL PROTECTED] monodoc]$ ./autogen.sh --prefix=/opt/cli/monodoc
> checking build system type... i686-pc-linux-gnu
> checking host system type... i686-pc-linux-gnu
> checking target system type... i686-pc-linux-gnu
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking whether to enable maintainer-specific portions of Makefiles...
> no
> checking for a BSD-compatible install... /usr/bin/install -c
> checking for gacutil... no
> configure: error: No gacutil tool found
> 
> 
> On Mon, 2004-05-03 at 07:00, A Rafael D Teixeira wrote:
> > Hi Jackson, I think this one is for you. 
> > 
> > You may have to adjust something in the build files to kill gacutil.exe
> > on uninstall. I could not find where exactly or I would submit a patch.
> > 
> > Regards,
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] 'configure: error: No gacutil tool found' in monodoc tree

2004-05-03 Thread A Rafael D Teixeira
Also, gacutil is needed by autogen.sh in monodoc, but it can't be found.

[EMAIL PROTECTED] monodoc]$ ./autogen.sh --prefix=/opt/cli/monodoc
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles...
no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gacutil... no
configure: error: No gacutil tool found


On Mon, 2004-05-03 at 07:00, A Rafael D Teixeira wrote:
> Hi Jackson, I think this one is for you. 
> 
> You may have to adjust something in the build files to kill gacutil.exe
> on uninstall. I could not find where exactly or I would submit a patch.
> 
> Regards,
-- 
A Rafael D Teixeira <[EMAIL PROTECTED]>
WEBforAll Teleinformática S/C Ltda.

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Build error when compiling mcs tree - latest cvs

2004-05-03 Thread A Rafael D Teixeira
in the 'make PROFILE=net_2_0 all-profile' part
...
make[4]: Entering directory
`/home/rafael/projetos/mcs/class/I18N/Common'
touch ../../../build/deps/net_2_0_I18N.dll.stamp
MONO_PATH="../../../class/lib/net_2_0:$MONO_PATH" mono 
../../../gmcs/gmcs.exe /r:mscorlib.dll  -d:NET_1_1 -d:NET_2_0 -2 -g
/noconfig  /target:library /out:../../../class/lib/net_2_0/I18N.dll
@I18N.dll.sources
Mono C# Compiler 0.25.99.0 for Generics
error CS2001: Source file '-2' could not be opened
Compilation failed: 1 error(s), 0 warnings
make[4]: *** [../../../class/lib/net_2_0/I18N.dll] Error 1
make[4]: Leaving directory `/home/rafael/projetos/mcs/class/I18N/Common'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/rafael/projetos/mcs/class/I18N'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/rafael/projetos/mcs/class'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rafael/projetos/mcs'
make: *** [all] Error 2

Regards,
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Gacutil.exe stay in $PREFIX/bin after make uninstall in mono tree

2004-05-03 Thread A Rafael D Teixeira
Hi Jackson, I think this one is for you. 

You may have to adjust something in the build files to kill gacutil.exe
on uninstall. I could not find where exactly or I would submit a patch.

Regards,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Trying to run XSP

2004-04-30 Thread A Rafael D Teixeira
On Fri, 2004-04-30 at 10:52, [EMAIL PROTECTED] wrote:
> Hello-
> 
> I configured XSP with ./configure --prefix=/usr/local/xsp, ran make and
> make install, and everything appeared to run smoothly. However, when I run
> any of the executables in my bin folder in /usr/local/xsp/bin, it says
> ./xsp.exe - Cannot execute binary file.

Have you first installed Mono? And are you running with mono runtime?

You have to issue commands like:

mono xsp.exe ...

to run .net exes in linux.

> I am running RH 9 on a Celeron 2.0 ghz. Thanks.

Hope it helps,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] heads up

2004-04-27 Thread A Rafael D Teixeira
Update on my previous email: as root make install was able to make
Npgsql with old resources and then back as user monoresgen was running
again. Seems like monoresgen was depending on something besides corlib
that was outdated in the prefix.


Sorry for the noise,

Thanks,

On Tue, 2004-04-27 at 03:45, Jackson Harper wrote:
> Hello,
> 
>   I have just committed some changes to our build system. We now build
> libraries for each profile into their own directory class/lib/$(PROFILE)
> so that we can build all the profiles libraries at once without them
> overwriting each other. Since this is such a large change there may be
> issuesplease reply to the list with anything you notice.
> 
> Thanks,
> Jackson
> 
> 
> 
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: VirusScan / Atualizado em 26/04/2004 / Versão: 1.5.2
> Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://www.terra.com.br/centralunificada/emailprotegido/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1083048667.57864.24597.turvo.terra.com.br
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] heads up

2004-04-27 Thread A Rafael D Teixeira
I updated from cvs everything and built mono and then mcs but it stops
when building Npgsql, because when monoresgen is run it says:

[EMAIL PROTECTED] monoresgen]$ monoresgen
Corlib not in sync with this runtime: expected corlib version 17, found
5.
Download a newer corlib or a newer runtime at
http://www.go-mono.com/daily.

Well no other step of the build process showed that message, specially
for such an old corlib version. I scanned my disk and killed or updated 
all mscorlibs/corlibs/monoresgen/SWF outdated and the message continues
to happen. 

I tried to compile a new version of monoresgen with debugging writelines
to no avail, it the loading of the assembly that triggers the message.

Locally I moved npgsql to be the last one in the build chain because it
seems to be the only one using monoresgen, but that way I can't do a
make install for mcs.

Any help is welcome,

Thanks,


On Tue, 2004-04-27 at 03:45, Jackson Harper wrote:
> Hello,
> 
>   I have just committed some changes to our build system. We now build
> libraries for each profile into their own directory class/lib/$(PROFILE)
> so that we can build all the profiles libraries at once without them
> overwriting each other. Since this is such a large change there may be
> issuesplease reply to the list with anything you notice.
> 
> Thanks,
> Jackson

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] How to use a modified class of mono

2004-04-22 Thread A Rafael D Teixeira
Probably you'll have to substitute it also on /usr/local/lib, (RPMs
install to /usr/lib, compiling from cvs install/uses in /usr/local/lib).

Hope it helps,

On Tue, 2004-04-20 at 08:26, HannibAl Bundie wrote:
> Hi,
> 
> I have modified the mono class RegistryKey.cs and I would like to use it.
> So I've run the Makefile in the mcs/class/corlib directory wich compils 
> corlib.dll
> Then I've replaced the /usr/lib/corlib.dll (my mono lib directory) by 
> mcs/class/lib/corlib.dll.
> 
> I though that it would be enough to succeed in use my own RegistryKey.cs but 
> it was just an illusion.
> 
> So, if someone could hepl me I would be very grateful.
> 
> Thanks
> 
> ps : sorry for this newbie question and for my english

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Running an assembly in Windows

2004-04-22 Thread A Rafael D Teixeira
Answers inlined:

On Wed, 2004-04-21 at 19:56, Jared Blake wrote:
> I have a project that I built with MonoDevelop and then compiled using
>  
> mcs -r:gtk-sharp,glade-sharp Main.cs -resource:gui.glade
>  
> The assembly runs perfectly on Linux but when I bring it over to my
> Windows XP box that has .NET on it, I get a System.IO.FileNotFound
> exception. 

Well you've have to install GTK# first, as you are using it in your
program. In CLI programming (Mono, .NET, etc..) as in Java, libraries
can't be statically linked to your application, so if you use any that
is not part of the basic class libraries you have to distribute it with
your application or require that it be installed for global use first.

> I tried putting the gtk-sharp.dll and glade-sharp.dll into my .NET
> framework but I still get the error. 

It's not enough! The GTK# installer puts the assemblies in the GAC so
that all applications can use it, also it installs the GTK for Windows
DLLs (remember GTK# is a managed wrapper for GTK).

> Is it possible to compile a program with mono and bring it over to a
> Windows machine that has .NET installed on it and run the assembly
> without doing anything special?

As long as you don't use libraries not distributed with .NET or that you
distribute all your dependencies with your programs. You just mixed
things, by using non-.NET libraries in your application. For example if
you do a console app that only uses the System.* libraries it should
work in both platforms equally well, except for things like the
respectives filesystems's case-sensitiveness and hierarchies
differences, that you can code carefully to avoid having trouble with.

>  
> Thanks,
> Jared Blake
> [EMAIL PROTECTED]
> Software Engineer

You're welcome Jared,

Good Developments,
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Command line processing tool in C#

2004-04-08 Thread A Rafael D Teixeira
Inline...

On Wed, 2004-04-07 at 21:59, Jonathan Pryor wrote:
> Below...
> 
> On Wed, 2004-04-07 at 15:15, Thomas R. Corbin wrote:
> > I've been using this tool in python:
> > 
> > http://www.python.org/doc/2.3/lib/module-optparse.html
> > 
> > And wondered if there was a similar tool in C# or for mono.
> 
> There's a better one (in my obviously biased opinion): Mono.GetOptions.

Thanks for the compliment Jonathan...

> See the attached file for an example.  It's unique in the option-parsing
> world (AFAIK) in that it uses attributes to specify the help text,
> short, and long flags that are interpreted.

And I'm going to GETTEXTify it for descriptions WHEN I have some time...

> 
> The one thing I can't figure out is how to specify "verbosity levels",
> where "-v -v -v" would be a valid set of command line arguments...

Well Jon your wish is my command, just updated cvs with a patch...

Now you can do something like:


...

[Option(-1, "Display verbose messages, use multiple times to increase
level", 'v')]
public bool verbosity {
set {
HowVerbose++;
Console.WriteLine("Verbosity {0}", HowVerbose); 
}
}

...


then running it for debugging it shows:


mono myverboseprogram.exe --verbosegetoptions -v -v -v
 set to [true]
Verbosity 1
 set to [true]
Verbosity 2
 set to [true]
Verbosity 3


Just yank that WriteLine and put a ceiling on it if you want (in most
uses we can just use the maximum value allowed when overflow occurs)

It will only allow it for boolean properties or boolean-accepting
methods, as a boolean field only can set with the pair of admissible
values and can't process the assignment.

> 
>  - Jon
> 

Enjoy, people,
 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] Question on core test support in Mono

2004-03-29 Thread A Rafael D Teixeira
Hi David, long time no see,

Have you checked our code coverage tool, Monocov? You simply have to
execute your programs asking mono (the runtime) to use a specific
profiler and then you use monocov to make it into a useful report.

It's in module monocov on the cvs.

Excerpt from the README


2. USAGE

 
2.1 COVERAGE DATA COLLECTION

 
To produce coverage info for an .NET program, compile it with the -g
switch to generate debug information. After this, run the program as
follows:
 
$ ./mono --profile:monocov prog.exe
 
This will produce a coverage data file called prog.exe.cov. You can run
the
analyser program as follows:
 
$ ./mono monocov.exe prog.exe.cov
 
This will display the class hierarchy of the program with the
corresponding
coverage information.
 
It is also possible to filter the list of classes which need coverage
data
generated. Filters are string which are applied agains the fully
qualified
names of classes, e.g. [assemblyname]classname. You can specify filters
directly on the command line:
 
$ ./mono --profile:monocov:-Security,-[System.Xml] prog.exe
 
There are two types of filters: include filters, whose name begins with
'+',
and exclude filters, whose name begins with '-'. Include filters are
checked
before exclude filters.
 
For example:
 
$ ./mono --profile:monocov:+[corlib],-Hashtable prog.exe
 
This will collect coverage info for all classes in corlib, except the
ones
whose name contains 'Hashtable'.
 
2.2 ANALYSIS

 
  The collected coverage data can be browsed using the monocov.exe
program.
This program will read the data file produced by the profiler module,
and
display its contents in a hierarchical fashion.
  It is also possible to export the contents of a data file into XML,
which
can be viewed in an XSL capable browser like mozilla.
To export the data as XML, run monocov like this:
monocov.exe --export-xml= 
   
The generated XML files use a default stylesheet which is a bit ugly. It
would
be good if somebody could contribute a better one :)


Hope it helps,

On Mon, 2004-03-29 at 10:41, David P. Bowler wrote:
> Just thought I'd re-ask and elaborate a bit...
> 
> I am not talking about Nunit type tools, those are great for understanding
> the success/failure of tests... I am talking about innate profiling to
> easily understand that all functions within a project have been covered by a
> test. The term in question is "Code-Coverage" and it is simply a way of
> knowing during the running of a test-suite that all of the code has been
> excercised. It has nothing to do with the success or failure of the tests
> calling the code. 
> 
> In test-driven development, writing test cases is easy. Knowing that you
> have written enough test cases is not. All too often portions of the code
> are missed or some conditions are not met, so entire sub-sections are never
> excercised.
> 
> So, having elaborated what I meant, can anyone tell me if there is any such
> support existing or planned for Mono? 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of David P. Bowler
> Sent: Friday, March 26, 2004 10:27 AM
> To: [EMAIL PROTECTED]
> Subject: [Mono-list] Question on core test support in Mono
> 
> 
> 
> Hello...
> 
> I just read an article in MSDN magazine about writing profiler DLLs for
> dotNet that you can tailor to your individual apps to ensure that your test
> programs cover 100% of your code. The profilers simply filter out calls to
> the CLR based upon some criteria built in and they write out listings of all
> functions or even blocks of code that have been hit when running a test
> program.
> 
> Unfortunately for dotNet in this instance, this is something that must be
> written and on a per application basis if you are into hard-core test-driven
> development and want to PROVE that your tests give you 100% code-coverage.
> 
> So, what I am wondering is if Mono currently has this or if there is any
> intent to put supportiong functionality like this in at the CLR level that
> can optionally be turned on to help test-driven code-coverage oriented
> development? 
> 
> Cheers,
> David
> 
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: VirusScan / Atualizado em 29/03/2004 / Verso: 1.5.2
> Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-

Re: [Mono-list] Java and C#

2004-03-19 Thread A Rafael D Teixeira
On Thu, 2004-03-18 at 22:35, Jonathan Pryor wrote:
> I suspect that there is no way to add attributes in Java.  Microsoft's
> Visual J# permits the use of Attributes (IIRC), but it's through their
> Visual J++ syntax -- through a specially formed JavaDoc comment. 
> Something like (from memory):
> 
>   /**
>* @attribute-name (args...)
>*/
>   public void myMethod () {/* ... */}
> 
> Of course, that's compiler specific, and no standard Java compiler will
> support that.  So when it comes to attributes, you're probably up the
> creek.
> 
>  - Jon

Maybe when ikvm supports Java 'Tiger' 1.5, that has attributes added to
the language (well sort-of, because it resembles the Visual J# way...).

My two cents,
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] PropertyInfo bug?

2004-03-18 Thread A Rafael D Teixeira
HI Kris,

Well if you have a confirmed bug please report it at bugzilla.

Anyway, I wouldn't use a try-fail-backtrack-try_diferently process to
approach this coding problem. 

I would use the method FindMembers:

Button b = new Button ("I am a button");
MemberInfo[] arrayMemberInfo = b.GetType().FindMembers(MemberTypes.Method | 
MemberTypes.Property,
BindingFlags.Public | BindingFlags.Instance,
Type.FilterName,
"ModifyBg");
if (arrayMemberInfo == null || arrayMemberInfo.Length == 0)
// throw some error here, about not having the appropriate member
if (arrayMemberInfo.Length > 1)
// throw some error here, about having overloads 
// or look for the one with appropriate parameters
if (arrayMemberInfo[0] is PropertyInfo) {
PropertyInfo pInfo = arrayMemberInfo[0] as PropertyInfo;
System.Object[] args= new System.Object[2];
args[0] = StateType.Normal;
args[1] = new Gdk.Color(255,0,0);
pInfo.SetValue(b, args, null);
} else {
// do as a method here
}

Hope it helps,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

On Wed, 2004-03-17 at 19:43, Kris Luyten wrote:
> Hi,
> 
> I am implementing a library that relies heavily on reflection (a User
> Interface Markup Language renderer). It dynamically sets properties of
> widgets. Since the library does not know whether it is dealing with a
> method or a property it tries to load the specified string (e.g.
> "ModifyBg") as a property first, and when this fails it tries to load it
> as a method.
> 
> Since a couple of weeks, the following code hangs, instead of throwing
> an exception or just failing:
> 
>   Button b = new Button ("I am a button");
>   PropertyInfo pInfo = b.GetType().GetProperty("ModifyBg");
>   System.Object[] args= new System.Object[2];
>   args[0] = StateType.Normal;
>   args[1] = new Gdk.Color(255,0,0);
>   pInfo.SetValue(b, args, null);
> 
> The second line of the code succeeds, although ModifyBg is a method
> afaik. Still, the program hangs on the last line. If someone wants to
> test the full example, it is available here:
> http://research.edm.luc.ac.be/~kris/projects/uiml.net/examples/test16.cs
> 
> I am not sure whether this behavior is caused by a bug in mono or gtk#,
> or a mistake I made.
> 
> my specs:
> Debian Sid
> Mono JIT compiler version 0.30.99.20040307
> Mono C# compiler version 0.30.99.51827
> Gtk# from CVS, two weeks old
> 
> 
> Regards,
> Kris

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] RE: Running C# on Linux Server

2004-02-26 Thread A Rafael D Teixeira
Hi Sreenivas,

First of all, I think it's better to post such questions to a list where all 
people interested in Mono can help you not only me. I cc'ed this to the Mono 
main List ([EMAIL PROTECTED]). Give them a chance to help you next time, 
please.

From: "Sreenivas  kaushik" <[EMAIL PROTECTED]>

I have used datagrid in C# application (GUI) on Windows and i tried to run 
the same application on Mono but i got the error saying that "Datagrid 
library not found".
Checking our status-page for Windows Forms at 
http://www.go-mono.org/class-status-System.Windows.Forms.html , I saw that 
DataGrid is at most  62% implemented. Also the whole System.Windows.Forms 
implementation is unstable just now so I would recommend not to use it  
before it matures.

I have installed GTK# also and i have System.Windows.Forms library but 
still iam unable to run. Is there any library so that i can run my 
application.
GTK# isn't needed to run System.Windows.Forms apps, but many other packages 
are (like Cairo). But again Mono's implementation of System.Windows.Forms 
isn't completed yet.

And one more thing, is there any possibility of using the third party 
controls like VSFlexGrid in Mono Environment.
For the general question the answer is: IF (BIG if, indeed) the third party 
controls are 100% Managed Code, and don't use System.Windows.Forms in an 
undocumented/non-portable way they possibly can run with Mono in Linux, but 
check if the license permits it (to run them outside of Windows & .NET).

Specifically for VSFlexGrid Pro you are out-of-luck as it is just an ActiveX 
control not a .NET Control. Mono won't support old-technology controls like 
that, because it costs too much in development (think we would have to 
duplicate lots of terrible COM/ActiveX support/interop code) and adds lots 
of potential bugs well-known in the COM world, as memory-leaks caused by 
circular references or unpaired calls into the reference-counting mechanism. 
You may have a better chance with Janus GridEX for .NET or Xceed Grid for 
.NET.

Good developments,

Rafael "Monoman" Teixeira
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
MonoBrasil Founding Member - Membro Fundador do MonoBrasil 
http://monobrasil.softwarelivre.org
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] will MONO support .NET applets ?

2004-02-25 Thread A Rafael D Teixeira
On Mon, 2004-02-23 at 08:35, Goodman, Gareth wrote:
> Hi
>  
> I've been experimenting with .NET applets using c#, deployed on XP.
> I've been keeping
> an eye on MONO's progress to date as it looks like the answer to many
> problems, and
> I would like to know if (for example) a MONO-enabled Linux machine
> will be capable of
> running .NET applets inside a browser on that machine. 

Not currently, because such feature have high demands on the security
area: Specially it needs to have a full implementation of CAS (Code
Acess Security) working, and we are just starting to implement it
(Sebastien correct me if needed please).

Nobody should give .NET Applets all the powers of a local application,
or it would be a feast for worms and trojan-horses writers. 

When you factor in all the limitations you have to impose in such
applets because of security concerns, their usefullness for some
enticing scenarios become nearly zero.

> please say yes :)

Sorry, not yet...

Also someone have to build a plugin for the browsers to recognize the
mime-type plus specific headers in the exes, and them make a container
for managed content. This plugin would start/embed mono.

Also .NET Applets are normally WinForms-based so as our WinForms
implementation is also incomplete, probably even if the other cited
pieces were in place you couldn't have it working.

Some things just take more time to implement and mature. Care to help us
into making it possible earlier than later...
 
> Regards,
>  
> Gareth Goodman
> English Heritage UK

Best regards,

-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] C# Hexadecimal Escape Char Anomalies???

2004-02-23 Thread A Rafael D Teixeira
Matthew Franz wrote:

I realize this is a C# issue but can one create "binary strings"
in C# using
string="\xff\x00\x00\xff" used by C/Python?

Why do my 0xff's get translated to 0x3f's???

Well, you are forgetting that C# strings are Unicode (UTF-16 encoded)
and when output to any stream it will be converted to that stream's
encoding. In the case of the console the output encoding is governed by
the LANG environment variable. See:

[EMAIL PROTECTED] export LANG=en_US
[EMAIL PROTECTED] mono bobo.exe | od -h
000 
002
[EMAIL PROTECTED] export LANG=en_US.UTF-8
[EMAIL PROTECTED] mono bobo.exe | od -h
000 bfc3 bfc3
004

where the source is:

[EMAIL PROTECTED] cat bobo.cs
using System;
 
class SimpleTest
{
public static void Main (String[]args)
{
String bobo = "\xFF\xFF";
System.Console.Write (bobo);
}
}

Note: When outputting to a stream you are creating, you can choose what
encoding the stream will use, so you have better control of the
situation than with the console.

Hope it helps,
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Wonderful commentary (with historical notes)

2004-02-16 Thread A Rafael D Teixeira
I experienced some of it myself so I'm quite pleased to forward this link:
 
http://www.linuxworld.com/story/43687_f.htm




"Never forget to THINK, better still if you then ACT accordingly..."



"Nunca se esqueça de PENSAR, melhor ainda se então você AGIR de acordo..."




Regards,
Saludos,
Cordiais cumprimentos,
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] System.Collections intricacies

2004-01-30 Thread A Rafael D Teixeira
Well, the getItem/setITem pair IS the indexer.
C# Indexer creation and usage syntax is just a shorthand form., like what we 
have for properties.

I recommend you to read the common language runtime spec, to understand what 
the different compilers must do when transforming such constructs.

Best regards,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/


From: "Andrew P. Wilson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: [Mono-list] System.Collections intricacies
Date: Thu, 29 Jan 2004 14:36:35 -0500
Hello everyone:



I was hoping someone would be able to help me out with some details about
indexers and collections and how they are used in mono.


I was trying to implement some functionality to the ArrayList class in
System.Collections through the use of the ArrayLists indexers.


I had thought that if you wrote the code snippet the ArrayList's indexer
function would be invoked 100 times because of the second for loop:


/// begin

ArrayList myAL;

myAL = new ArrayList();



for(int i=0; i<100; i++)

myAL.Add(i); //(add a bunch of numbers to the array list)



int sum = 0;

for(int i=0; i<100; i++)

sum = sum + (int)myAL[i];

/// end





However, I am finding that the indexer is not called at all and from
disassembling the executable, the following instructions are occurring 
where
I would have thought the indexer would have been called:

.

.

IL_0099:  callvirt instance object class
[mscorlib]'System.Collections.ArrayList'::'get_Item'(int32)
IL_009e:  unbox [mscorlib]System.Int32

.

.



Normally, this wouldn't be a problem for me.  However, I cannot find this
"get_Item" function anywhere in the mcs or mono source code.  There is also
a corresponding "set_Item" function that is called as well, but again, I
cannot find it in the source code.


Is there a situation where the ArrayList Indexer will be called?  And do 
the
get_Item and set_Item functions exist somewhere in the source code?



Basically, all I want to be able to do is monitor accesses to an ArrayList
through some predefined interface, whether the indexer or these get_Item 
and
set_Item functions.  Any information about any of these things would be 
much
appreciated.



Thank you for your time,



Andrew P. Wilson

Electrical and Computer Engineering Department

University of Toronto



_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] Problems mono gtk-sharp

2004-01-26 Thread A Rafael D Teixeira
Well, you didn't send your source files, but from the message seems like you 
forgot to put some 'using' clauses in your program...

using Gtk;
using GtkSharp;
Hope it helps,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/


From: "Mauricio Rojas" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
Subject: [Mono-list] Problems mono  gtk-sharp
Date: Mon, 26 Jan 2004 13:45:29 -0300 (CLST)
Hello,

mcs  /home/mrojas/mono/src/HelloWorld.cs -r gtk-sharp
/home/mrojas/mono/src/HelloWorld.cs(17) error CS0246: Cannot find type
`Window'
/home/mrojas/mono/src/HelloWorld.cs(14) error CS0161: Not all code paths
return a value
/home/mrojas/mono/src/HelloWorld.cs(26) error CS0103: The name
`Application.Quit' could not be found in `GtkSamples.HelloWorld'
Compilation failed: 3 error(s), 0 warnings
Unhandled Exception: System.NullReferenceException: A null value was found
where an object instance was required
Help me!

bye



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] Problems mono gtk-sharp

2004-01-26 Thread A Rafael D Teixeira
Well, you didn't send your source files, but from the message seems like you 
forgot to put some 'using' clauses in your program...

using Gtk;
using GtkSharp;
Hope it helps,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/


From: "Mauricio Rojas" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
Subject: [Mono-list] Problems mono  gtk-sharp
Date: Mon, 26 Jan 2004 13:45:29 -0300 (CLST)
Hello,

mcs  /home/mrojas/mono/src/HelloWorld.cs -r gtk-sharp
/home/mrojas/mono/src/HelloWorld.cs(17) error CS0246: Cannot find type
`Window'
/home/mrojas/mono/src/HelloWorld.cs(14) error CS0161: Not all code paths
return a value
/home/mrojas/mono/src/HelloWorld.cs(26) error CS0103: The name
`Application.Quit' could not be found in `GtkSamples.HelloWorld'
Compilation failed: 3 error(s), 0 warnings
Unhandled Exception: System.NullReferenceException: A null value was found
where an object instance was required
Help me!

bye



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] Mono 0.30 preview

2004-01-24 Thread A Rafael D Teixeira
From: "Daniel Morgan" <[EMAIL PROTECTED]>

When doing make test on Windows, I get:

make: *** No rule to make target
`Test\Microsoft.VisualBasic\CollectionTest.cs',
 needed by `../../build/deps/Microsoft.VisualBasic_test.dll.stamp'.  Stop.
Sorry, moved some things around but forgot one commit, things are already 
right in CVS since yesterday, and tested (this part) in Windows.

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Could not find file "..\..\bytefx.snk"

2004-01-22 Thread A Rafael D Teixeira
The problem is that file contains a certificate (basically a pair of crypto 
keys) that is tied to ByteFX.
It can't be publicized or someone can impersonate as being ByteFX.

So, in Mono we should just compile without it.

I can't remember the one-line change that corrects it, but someone posted it 
in response to the original question.

Best regards,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/


From: Pablo Fischer <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: RE: [Mono-list] (no subject)
Date: Thu, 15 Jan 2004 14:17:19 -0600
A think I do not understand is.. why not add that file?, that is the
reason why I didn't released the .29 version for Debian.
Pablo
El mié, 14-01-2004 a las 07:46, A Rafael D Teixeira escribió:
> It comes down to:
>
>   Could not find file "..\..\bytefx.snk"
>
> This file was forgotten when the packaging occured, if I recall 
correctly,
> get it from anon-cvs instead.
>
> Hope it helps,
>
> Rafael Teixeira
> Brazilian Polymath
> Mono Hacker since 16 Jul 2001
> MonoBrasil Founding Member - Membro Fundador do MonoBrasil
> English Blog: http://monoblog.blogspot.com/
> Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
>
> _
> MSN Messenger: instale grátis e converse com seus amigos.
> http://messenger.msn.com.br
>
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
>

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] Some Crucial Not Implemented VB Items

2004-01-21 Thread A Rafael D Teixeira
From: "JD Conley" <[EMAIL PROTECTED]>

There are a few items in VB that are not implemented that, IMHO, would
make it much more useable.  I'm not sure if anyone is really working on
VB now-a-days, but I would really like to see it improved.  VB is the
most widely used language in the corporate world and a good, free,
implementation would go a long way.  Anyway, here's the items that are
immediately important for me, but unfortunately I don't have the
knowledge to dive into the VB class libraries or compiler and implement
them.
1) Synclock Blocks - System.Threading.Monitor.Enter/Exit is implemented,
but not the "Synclock Object"/"End Synclock" block.  I use this all the
time and the extra 3 lines of code required to use the Monitor class
really clutters things up.
Seems to be an easy thing, but never looked at that feature. Please file a 
bugzilla for this item, with some testing code, typical of your usage.

2) IsNothing() Method - The Is keyword is imlpemented so you can do
"Object Is Nothing" but not this more readable version.
I've implemented in a pair of minutes. Already landed on cvs. But for now 
you have to fully qualify it's use, like :

 If Information.IsNothing(Expression) Then
...
 End If
3) Preserve Keyword - It's a pain to have to make temporary copies of
arrays when you need to change the bounds.
The problem is finding the proper division of labor, between code to be 
generated where the redim preserve occurs and what a helper class/method 
should do. Besides I'll have to delve in what code compiled with vbc does in 
that case so that  it can work inside our runtime with our version of the 
class library. Please, again add a bugzilla case, for us to track the 
implementation of this feature.

Note: Performance-wise "ReDim Preserve" is a bad thing, because it DOES COPY 
all your array content into a new one. Avoid it  for large arrays, or those 
that repeatedly change size.

I'm really impressed with the runtime and class libraries as a whole, I
just wish VB.NET support was at the same level as C#.  I've got a lot of
large applications written in VB.NET that I'd like to run on Mono, but
it's just not feasible to port them to C# or work around everything
that's not implemented.
I must tell you that other issues presently have higher priority, like 
tweeking the name-resolving logic to expose "VB modules" members as global 
(unqualified) names (so that can use IsNothing() unqualified). Also 
currently most of code-generation works C#-ish (just like if "option strict 
on" is always set) because we resolve all names at compile-time (no 
late-bounding).

Anyway, if you can't feel like delving inside our code,  just experimenting 
with it and reporting issues (via bugzilla)  will help us a lot.

Thank you for the interest!!!

Best regards,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Wrong information in page http://www.go-mono.org/testing.html

2004-01-21 Thread A Rafael D Teixeira
The paragraph that appears as:

"The directory that will contain your new file depends on the 
assembly/namespace of the class for which you are creating the tests. Under 
mcs/class there is a directory for each assembly. In each assembly there is 
a Test directory, e.g. mcs/class/corlib/Test. In the Test directory there 
are sub-directories for each namespace in the assembly, e.g. 
mcs/class/corlib/Test/Sytem. Put your new test file in the appropriate 
sub-directory under Test for the class you are testing. Once all of that is 
done, you can do a 'make test' from the top mcs directory. Your test class 
will be automagically included in the build and the tests will be run along 
with all the others."

Is incorrect or imprecise, because I needed to manually edit 
Microsoft.VisualBasic_test.dll.sources to add my new test file in the 
build...

Am I missing some unwritten setp, or truly one needs to manually edit the 
sources file?

Thanks for any help and corrections to the page,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] Component vs. Class

2004-01-20 Thread A Rafael D Teixeira
From: Enver ALTIN <[EMAIL PROTECTED]>

Hi,

On Thu, 2004-01-15 at 21:59, A Rafael D Teixeira wrote:
> Well, mainly, any subclass of Component can be easily (for example, just 
by
> dragging and dropping in the Visual Studio.NET Form Designers) inserted 
in a
> container (like a Form, a Control, or any other Component), and 
manipulated
> by the editing environment (like having properties exposed for editing 
in
> the Properties Window).  All of this is currently of  little use for 
Linux
> developers using Mono as we are still creating the equivalent tools.

Well, this is exactly how things worked back in '92 when Delphi 1.0 has
been launched by Borland. Many of the class hierarchy stuff was inspired
from the layout of VCL (Visual Component Library); I'm surprised that
even the class/property/event naming conventions are Delphi/C++Builder
alike, funny :)
Well, that's because Microsoft HIRED the same team to create C# and 
VisualStudio.NET: Anders Hejlsberg and some dozens of other key Borland 
employees MIGRATED to MS half-a-decade ago...

Anyway it's great to know that Mono staff is working on an
IDE-alike-tool which hopefully will bring .NET/RAD to Linux.
Yes!!! The MonoDevelop team is hard at work!!!

Enver ALTIN (a.k.a. skyblue)	- Software developer, generic solvent
Have Fun,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] Component vs. Class

2004-01-15 Thread A Rafael D Teixeira
Well, mainly, any subclass of Component can be easily (for example, just by 
dragging and dropping in the Visual Studio.NET Form Designers) inserted in a 
container (like a Form, a Control, or any other Component), and manipulated 
by the editing environment (like having properties exposed for editing in 
the Properties Window).  All of this is currently of  little use for Linux 
developers using Mono as we are still creating the equivalent tools.

Functionality already in the Component superclass, facilitate orchestrating 
some functions like serialization/deserialization/disposal/etc.. over a 
whole tree of containers of containers of ... components.

Another piece of information: Component is also a superclass for class 
Control, because although not all Components need to be Visual Widgets, all 
Visual Controls have to be Components.

Let's see some examples of commonly used classes that are Components but 
aren't Controls : ADO.Net Datasets, DataAdapters and Connections derive from 
Component and they can be dragged to a form so that DataBinding can be all 
set up, just by setting properties.

In some of my previous designs, I've architected the front-controllers to my 
business objects as Components to make for easier integration in the UI 
Layer, but only when effective reuse paid for the extra effort.

If you want to go deeper: Component-Oriented Analisys, Design and 
Programming, is nowadays a field of study slowly coming to mainstream use 
(book: UML Components - John Cheesman & John Daniels, also: UML 2.0 Spec).  
But it goes beyond what class Component offers because if one needs to have 
real flexibility about plugging/unplugging or swapping parts of his 
solutions, one need to work around Interfaces (contracts) instead of 
inheritance.  When a design revolves around factories and interfaces, we 
probably are looking at a Component-Based solution.

Hope it helps,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] (no subject)

2004-01-14 Thread A Rafael D Teixeira
It comes down to:

 Could not find file "..\..\bytefx.snk"

This file was forgotten when the packaging occured, if I recall correctly, 
get it from anon-cvs instead.

Hope it helps,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] about installing Mono

2004-01-11 Thread A Rafael D Teixeira

From: vishwa ranjan <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [Mono-list] about installing Mono
Date: Sat, 10 Jan 2004 10:33:26 + (GMT)
Friendz,
I'm actually a novice in this field. When I
downloaded the source-code of mcs-0.29 and tried to
make it on my system then it gave the warning that a
C# compiler ia required. Then I download the monolite
package and did exactly what was told in the manual.
But again it gave the same warning. Tell me how to
install mono on my system???
Thanx in advance.
Vishwa
It sounds like you are in Windows. The default build in Windows, uses csc 
the MS C# compiler: either install .NET Runtime or SDK, or change the 
profile for the build to use the mcs you installed via monolite.

If you aren't in Windows, may be you unpacked monolite at a location that is 
not the correct one. Also you doesn't cite having downloaded the mono-0.29 
sources which are in most cases also needed.

Best regards,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] Error CS0246: Cannot find type 'MyClass'

2004-01-09 Thread A Rafael D Teixeira
Well you forgot to make your library class public, but csc gives a better 
message than mcs, just see:

Rafael ~/tmp
$ cat MyLib.cs
using System;
namespace MyLib {

public class MyClass {

  public String GetString() {
 return "SomeString";
  }
} // MyClass

} // MyLib

Rafael ~/tmp
$ mcs /t:library MyLib.cs
Compilation succeeded
Rafael ~/tmp
$ mcs /r:MyLib.dll TestMyLib.cs
Compilation succeeded
Good coding,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] RE: Help MONO-MCS

2004-01-07 Thread A Rafael D Teixeira
From: Sanira M <[EMAIL PROTECTED]>

Hello Sir
Please spare your minutes in reading and replying this mail
Iam a student from India.I tried downloading the mono source code and tried 
to compile the compiler.csproj that resides in the mcs folder.
I got an error saying "Unable to open cs-parser.cs"

How should i generate the cs-parser.cs from cs-parser.jay?

Please reply.'Coz i need the compiler.

Awaiting your reply
Sanira
That csproj there is outdated, because most people in mono don't use VS.NET. 
You have to use the makefile instead, that will call jay to generate 
mb-parser.cs from mb-parser.jay and them compile the compiler using csc (in 
windows). For that you'll need cygwin, because jay will have to be compiled 
with gcc, before it can be used and cygwin's make deals better with our 
makefiles than microsoft's one.

If all of that doesn't make sense for you, you could simply download a 
precompiled mcs (get the latest monolite file from http://go-mono.com/daily/ 
and extract mcs.exe) or the windows installer 
(http://www.go-mono.com/archive/mono-0.29-win32-1.exe)

Also in the future post such questions to the mono list 
([EMAIL PROTECTED]), because there more people can help you.

Best regards,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Is mono-cvs.ximian.com currently behind a firewall?

2004-01-07 Thread A Rafael D Teixeira
[EMAIL PROTECTED] debugger]$ ssh mono-cvs.ximian.com -l rafael
ssh: connect to host mono-cvs.ximian.com port 22: No route to host
[EMAIL PROTECTED] debugger]$ ping -R mono-cvs.ximian.com
PING mono-cvs.ximian.com (130.57.169.27) 56(124) bytes of data.
From 12.127.106.33 icmp_seq=15 Packet filtered
From 12.127.106.33 icmp_seq=21 Packet filtered
Is this also a after-effect of the office relocation? When should it 
stabilize?

Regards,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] mbas now deals with the date primitive type, including literals

2003-12-06 Thread A Rafael D Teixeira
Commited to cvs changes that makes sintax like

		Dim dateLiteral As Date = #10/23/2003#

compile and execute correctly with mbas.

Enjoy,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] RE: [Mono-devel-list] Compiling

2003-12-06 Thread A Rafael D Teixeira
Caro Pedro, and people out there in each list!!!

Well, to stop that...

Unhandled Exception: System.NullReferenceException: A null value was
found where an object instance was required
in (unmanaged) /usr/lib/libmono.so.0 [0x40080c61]
in (unmanaged) /usr/lib/libmono.so.0 [0x4008b2bc]
in (unmanaged) /usr/lib/libmono.so.0 [0x4008b330]
in (unmanaged) /usr/lib/libmono.so.0 [0x4008c120]
in (unmanaged)
/usr/lib/libmono.so.0(mono_reflection_create_runtime_class+0x179)
...recurrent showstopper, the following sequence...

cd mono
cvs -z3 update -Pd
./autogen.sh --prefix=/usr/local
make
make install
cd ../mcs
cvs -z3 update -Pd
make
make install
...did the trick.

Hope it helps,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/
_
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


  1   2   >