Re: [Mono-list] (Generics) type parameters and pointers
On Sun, 2004-07-25 at 13:51 +, Alan Jenkins wrote: > I know type parameters cannot be pointers - ArrayList is not permitted - > but I haven't been able to a definitive statement regarding whether pointers > to the type of a parameter is permitted, e.g. > > struct Pointer { > T* value; > } > > Currently, gmcs will complain that it can't find the type "T*", but I would > have thought it would be relatively easy to allow, given that the following > is allowed. > > struct Array { > T[] value; > } Hello, according to the spec (25.2), you can only take a pointer of an unmanaged type, not a managed one. csc says > $ csc /unsafe C.cs > Microsoft (R) Visual C# .NET Compiler version 8.00.40607.16 > for Microsoft (R) Windows (R) .NET Framework version 2.0.40607 > Copyright (C) Microsoft Corporation 2001-2003. All rights reserved. > > C.cs(3,5): error CS0208: Cannot take the address of, get the size of, or declare a > pointer to a managed type ('T') > C.cs(1,23): (Location of symbol related to previous error) I'll fix gmcs to report the same error. Martin ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] freemonohost.org...any interest/help?
Hi Michael! First, sorry for my bad english, I'm spanish user, and I'm not customary to write long letters. Your propousal is very interesting, and I would like to help in what I can if the time allows me. I'm newbie in C# and ASP.NET developement, but I have more experience developing with HTML and PHP... If you could, I'll do a a Web page of the server using Typo3 (http://www.typo3.com or http://www.typo3.org), a best CMS in PHP (in my opinion, of course). I have more experience with this CMS, and I made more extensions and plugins for it. If I can help in another thing, please, tell me. Best Regards. El jue, 29-07-2004 a las 01:52 -0400, Michael Rizzer escribió: > Hi all, > > I am considering buying a dedicated box to start up as a sort of charity > freemonohost.org (just registered the domain a few minutes ago); I'd be > willing to pay for it in the next week or two if there is some > interest/help... > > I think this is really needed to help the mono community; and could be > great help for a lot of things; but I'm currently a bit overworked to > put in the effort necessary to make it work/happen... > > I'm hoping that there are some people on this list with some free time > that could adminster the server... > > I'm looking initially to get a dedicated box at ev1servers.net or > 1and1.com and have some others do most of the work on it while I will > pay the dedicated hosting fees...might even be able to get a discount > from them if we plug their hosting business(es) on the front page.. > > Eventually If it works out I'd like to get 3 dedicated boxes...1 for the > current release of mono...1 for the current build of the upcoming > mono...and one windows/ms box for people to test stuff that isn't > working right on the other boxes...but paying for all three is still not > in the cards for another month or two.probablybut my business > has been increasing a lot and I'd eventually love to get all three; for > my own selfish reasons as well as helping out the mono effort... > > The only thing I really want in return is some free pr for my business > which is at http://smi2le.biz/ ; could help my rep as well ;)... > > But I'm hoping that volunteers could take care of most of the tasks with > it; and I'd give them basically unlimited access to the boxes in return > for the help..maybe some free products of the stuff I sell if it turns > out to be a lot of work and the volunteers actually want the stuff I > sell; but I can't really afford to pay anyone; as I've only got 1 > part time helper with my business right now..we might be able to work > something where better access costs a few $$ a month and that money > could be given to the server administers...but that might be hard to > work logistically and might not be worth the effort; while free for > everyone could be easy and good enough as long as sitespam bots don't > start opening accounts.. > > I think freemonohost.org might be a cheezy name and perhaps someone > could think of something a bit more clever...I was thinking > miicazasuicaza.com heh.. but that is probably a bit cheezy/strange > too... anyone?? > > I only subscribed to the digest version of this list; but will be > checking the replies out; I am hoping that I can reply to people > quickly; but there is a good chance if you write me you won't get a > long/decent reply for a few days (I'm perpetually backed up on email > lately it seems)you can also call me at - 856-652-9118 if you'd like > to do it and we can set things up so those who are interested and have > the skills can set things up > > Anyway wanted to get this out there and see who is interested and see if > it could happen.I don't think there is anyone doing such a thing > right now; and I'd be happy to > > Mike > http://smi2le.biz/ > ___ > Mono-list maillist - [EMAIL PROTECTED] > http://lists.ximian.com/mailman/listinfo/mono-list > -- Este correo está firmado DIGITALMENTE. Si quieres saber más: http://www.bgta.net/gpg.0.html [^BgTA^] Network .-. .- .-.. / .-. --- -- . .-. --- / --. .- .-. -.-. .- signature.asc Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente
Re: [Mono-list] how to receive console event signal in mono?
[oops, forgot to cc this to the list] Sam Jost wrote: >I'd like to know how I would receive a console event signal in a console >program written in mono (running on linux) > >On windows I would use interop and kernel32 "SetConsoleCtrlHandler" function >to capture a ctrl+break, but somehow I don't except this to work with linux. > >How would one capture signals with a mono console program in linux? > Mono.Posix has wrappers for the POSIX signal-handling functions (in particular, Mono.Posix.Syscall.signal() is the method you need, i believe). I don't think there are any docs available for them (at least, there's nothing on Mono.Posix in my local copy of Monodoc), but afaict, they're just straight p/invoke wrappers around the native functions, so just check the relevant man pages (man 2 signal and man 7 signal). (actually... looking at the source, there's a Signals enum, which is marked with a [Map] attribute, which the comments say needs to be run through a c helper function to map the enum values to the correct underlying value used by the system, BUT, Syscall.signal() takes a raw int for the signum... so i have no idea if it will work portably at the moment...) -- Mike Roome ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] casting reference arguments
I've found another case where the compiler should give a different error (at the moment it crashes). public class Test { public static void Main () { byte b = 8; int i = 256; Increment (ref b); System.Console.WriteLine ("8 + 1 = {0}", b); Increment (ref i); System.Console.WriteLine ("256 + 1 = {0}", i); } public static void Increment (ref int arg) { arg += 1; } public static void Increment (ref byte arg) { // reference cast - not allowed Increment (ref (int) arg); } } Who needs specifications to test against when you have a twisted mind? Seriouslly though, the above code could be legal - mcs might be expected to create a temporary variable of type int, assign the byte value to it, call the other Increment overload with it, and then assign its value back to the byte argument - so a check against the microsoft compiler is necessary. Alan ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] WebMin Problem Connecting to Apache
I installed Apache 2 Httpd server under /usr directly. I am able to get to it with console/command line operations, but WebMin is giving me the following error when I try accessing the server through the interface. *ERROR* The Apache server executable /usr/local/apache2/bin does not exist. If you have Apache installed, adjust the module configuration to use the correct path. *** My Apache installation is in the /usr/local/apache2 directory. Everything is there, I have checked, double checked and triple checked. /usr/local/apache2/bin co/usr/local/apache2ntains the httpd, apachectl, etc. I can't figure out what is wrong. I have tried configuring WebMin to point to the above locations. I am also loggin into WebMin as root. I know I can use the console to do everything, but it's nice to have WebMin to go to when I need it. Any help you can provide would be greatly appreciated. Thanks! ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] mod_mono sharing application session data
I've searched google and found almost no information on this, so I figured I'd ask here. Has anyone had any luck of sharing HttpSession data between applications (basically directories) ? The site I'm beginning to build requires 1 login for multiple modules and I'd really rather not have a flat file structure for such a huge application. Any ideas? ~ Matthew ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] mod_mono sharing application session data
Aren't HttpSessions "keyed" to the Session IDs they set? In any event, web applications traditionally operate in a disconnected state because this is how web servers operate. One HTTP request has nothing to do with another. You need to consider very carefully the idea of trying to make a web app that goes against this. If you really need a very tightly tied together system then the web isn't a good platform. Or are you asking more of a single sign on question? What is in the HttpSession that you need to share? Tom Larsen On Thu, 29 Jul 2004, Matthew Metnetsky wrote: > I've searched google and found almost no information on this, so I > figured I'd ask here. > > Has anyone had any luck of sharing HttpSession data between applications > (basically directories) ? The site I'm beginning to build requires 1 > login for multiple modules and I'd really rather not have a flat file > structure for such a huge application. > > Any ideas? > > ~ Matthew > > ___ > 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
Re: [Mono-list] mod_mono sharing application session data
Hi, One secure solution would be doing custom digest authentication in an IHttpModule which is then valid for the various applications. The authentication module could then be shared by all applications and maybe rather than a flat file you could use a DB or LDAP for the back end. ;-) In addition, you could fall back to BASIC authentication if the digest is not supported (though I think all modern browsers support it nowadays). I did something like this a while back and though it was not for multiple apps, I think if you used the same 'realm' (see the spec.) for all your applications then it should work. There are a number of sample on how to do this in .NET out there. Here is one: http://www.eggheadcafe.com/articles/20040317.asp Regards, --chris On Thu, 29 Jul 2004, Matthew Metnetsky wrote: > I've searched google and found almost no information on this, so I > figured I'd ask here. > > Has anyone had any luck of sharing HttpSession data between applications > (basically directories) ? The site I'm beginning to build requires 1 > login for multiple modules and I'd really rather not have a flat file > structure for such a huge application. > > Any ideas? > > ~ Matthew > > ___ > 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
[Mono-list] MySql on mono
Hi all, i'm a newbie in mono and i'm from brazil, so my english is very bad :) i try make a mysql connection with mono like i see in monodoc, but when i will run the application this erros are reported: Unhandled Exception: ByteFX.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts in <0x00158> ByteFX.Data.MySqlClient.Driver:Open (ByteFX.Data. MySqlClient.MySqlConnectionString) in <0x0003c> ByteFX.Data.MySqlClient.MySqlInternalConnection:Open () in <0x000ef> ByteFX.Data.MySqlClient.MySqlPool:CreateNewPooledConnection () in <0x00214> ByteFX.Data.MySqlClient.MySqlPool:GetPooledConnection () in <0x00052> ByteFX.Data.MySqlClient.MySqlPool:GetConnection () in <0x00112> ByteFX.Data.MySqlClient.MySqlPoolManager:GetConnection (ByteFX.Data.MySqlClient.MySqlConnectionString) in <0x0007c> ByteFX.Data.MySqlClient.MySqlConnection:Open () But, i can connect to mysql database with others applications like php and mysql control center. I don't know what's happen. can anybody help me ? the source code of my app is attached // created on 28/7/2004 at 13:57 using System; using System.Data; using ByteFX.Data.MySqlClient; public class Test { public static void Main(string[] args) { string connectionString = "Server=localhost;" + "Database=cientifico;" + "User ID=root;"; MySqlConnection dbcon; dbcon = new MySqlConnection(connectionString); dbcon.Open(); IDbCommand dbcmd = dbcon.CreateCommand(); // requires a table to be created named employee // with columns firstname and lastname // such as, //CREATE TABLE employee ( // firstname varchar(32), // lastname varchar(32)); string sql = "select nom_doenca from doencas"; dbcmd.CommandText = sql; IDataReader reader = dbcmd.ExecuteReader(); while(reader.Read()) { string FirstName = (string) reader["nom_doenca"]; Console.WriteLine("Name: " + FirstName); } // clean up reader.Close(); reader = null; dbcmd.Dispose(); dbcmd = null; dbcon.Close(); dbcon = null; } }
Re: [Mono-list] mod_mono sharing application session data
Hello, On Thu, 2004-07-29 at 11:59, Tom Larsen wrote: > Aren't HttpSessions "keyed" to the Session IDs they set? In any event, > web applications traditionally operate in a disconnected state because > this is how web servers operate. One HTTP request has nothing to do with > another. You need to consider very carefully the idea of trying to make a > web app that goes against this. If you really need a very tightly tied > together system then the web isn't a good platform. > > Or are you asking more of a single sign on question? What is in the > HttpSession that you need to share? > > Tom Larsen > > On Thu, 29 Jul 2004, Matthew Metnetsky wrote: > > > I've searched google and found almost no information on this, so I > > figured I'd ask here. > > > > Has anyone had any luck of sharing HttpSession data between applications > > (basically directories) ? The site I'm beginning to build requires 1 > > login for multiple modules and I'd really rather not have a flat file > > structure for such a huge application. > > > > Any ideas? > > > > ~ Matthew > > As it seems, every directory is assigned a cookie-session id used to tie Session to an application/directory. The problem is that if I travel from one directory to another and check session its missing, because HttpSession seems to be directory/application specific. This is very annoying. Suppose you have an application (as I will soon) where you have a Core module that supplies users, roles, etc and a login. From there you would travel to other modules which would of course need to know that your logged in (a cookie works - FormsAuthentication class). But suppose I set your Member object into Session within the Core module, the Foo module could not access it. So in fact I would have to check your cookie and retrieve again the Member object associated to that cookie from the database. Thus, an unecessary call to the database, and two instances of the same object sitting in session. Its a data integrity nightmare! Any ideas, suggestions solutions? ~ Matthew P.S. Sadly, this must be a web application. ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
RE: [Mono-list] mod_mono sharing application session data
> This is very annoying. Suppose you have an application (as I will soon) > where you have a Core module that supplies users, roles, etc and a > login. From there you would travel to other modules which would of > course need to know that your logged in (a cookie works - > FormsAuthentication class). But suppose I set your Member object into > Session within the Core module, the Foo module could not access it. So > in fact I would have to check your cookie and retrieve again the Member > object associated to that cookie from the database. Thus, an unecessary > call to the database, and two instances of the same object sitting in > session. Its a data integrity nightmare! In defense of your idea, it sounds very reasonable. Having a site made up of several subdirectories doesn't mean it's a bad program to use the web as a platform. Certainly sessions should span directories when it's the same web app. IIS certainly treats it that way. I unfortunately can't help though, as I have not done any work with sessions on Mono yet. I have done it extensively in IIS however, and eventually would like to try porting it to Mono. smime.p7s Description: S/MIME cryptographic signature
[Mono-list] running mono problem
Hi all, I'm using mono at work without problems, now I'm installing it on my laptop to work at home. I download a lot of rpm mono depends on, one of the is libgtkhtml3, well... all mono rpms got installed well but now I run monodoc and I get an error: Unhandled Exception: System.DllNotFoundException: gtkhtml-3.0 The exception is right, there is not such dll in my system, but the most curious thing is that in my job's PC, where mono run well and monodoc too, there is not gtkhtml-3.0 or similar... ??? I'll appretiate any hel in respect best regards and thanks fot the time -- Israel Fdez Cabrera Usuario Linux: 270292 Ciudad La Habana, Cuba. Segurmatica. [EMAIL PROTECTED] ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] MySql on mono
Sorry, when i click in reply button they send only for you. in odbcinst.conf [ODBC] Trace = No TraceFile = /tmp/sql.log ForceTrace = No Pooling = No [MySQL] Description = MySQL driver Driver = /usr/lib/odbc/libmyodbc.so Setup = /usr/lib/odbc/libodbcmyS.so CPTimeout = CPReuse = FileUsage = 2 in odbc.ini [cientifico] Description = MySQL Driver = MySQL Server = localhost Database= cientifico Port= 3306 Socket = Option = Stmt= when i run isql cientifico, they show all tables Em Qui, 2004-07-29 às 18:35 +, lamyae Benabdeljalil escreveu: > Arx Henrique wrote: > > >Ok, i install unixodbc and libmyodbc, and setup my dsn, but when i run > >my application show the same error. > > > >the User ID args on MySqlConnection is mysql's user or the name of my > >unixodbc conf ? > > > >Em Qui, 2004-07-29 às 17:32 +, lamyae Benabdeljalil escreveu: > > > > > > > >>It is ok, me too i am working on debian unstable platform. so you need > >>to install the odbc driver (libmyodbc...), and unixodbc. > >> > >> > >> > what did you write in odbc.conf and odbcinst.conf? ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
RE: [Mono-list] mod_mono sharing application session data
On Thu, 2004-07-29 at 13:14, Andrew Arnott wrote: > > This is very annoying. Suppose you have an application (as I will soon) > > where you have a Core module that supplies users, roles, etc and a > > login. From there you would travel to other modules which would of > > course need to know that your logged in (a cookie works - > > FormsAuthentication class). But suppose I set your Member object into > > Session within the Core module, the Foo module could not access it. So > > in fact I would have to check your cookie and retrieve again the Member > > object associated to that cookie from the database. Thus, an unecessary > > call to the database, and two instances of the same object sitting in > > session. Its a data integrity nightmare! > > In defense of your idea, it sounds very reasonable. Having a site made up of > several subdirectories doesn't mean it's a bad program to use the web as a > platform. Certainly sessions should span directories when it's the same web > app. IIS certainly treats it that way. > > I unfortunately can't help though, as I have not done any work with sessions > on Mono yet. I have done it extensively in IIS however, and eventually would > like to try porting it to Mono. I believe I've solved my annoying problem. It seems that the following structure of directories will share session information. / - application login /core /foo /bar But I was doing the following, which definitely did NOT work. /public - application login /core /foo /bar This does make sense - but the lack of documentation about any of this is extremely annoying. No where is this stated that I could find. But having thought about it, and related it to the way Web.config files load it makes perfect sense. Any ways, BLAH. Thanks. ~ Matthew ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Mono with MySQL; Glade and Menubar
Two questions if I may: 1. I have set up a simple application using MonoDevelop (Mono 1.0, most recent versions of everything according to Red Carpet) to access data in a local MySQL database. When compiled in MonoDevelop I get messages about not finding the necessary assemblies for accessing mysql, however in a command line interface specifying the libraries with -r params the programme compiles and runs just fine. Am I missing some kind of directive in MonoDevelop that would allow it to find System.Data and ByteFX.Data? 2. In another application I have a simple glade window with one button working fine, however if I add a menubar to the window I get a lot of warnings about "Unknown property stock_item in class GtkImageMenuItem" followed by other errors. Does this mean that some elements in the GTK+ bag of goodies are currently supported, and others not, or am I missing another specification? Thanks. ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] casting reference arguments
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > so a check against the microsoft compiler is necessary. Building this code on Microsoft compiler report this error : Main.cs(28,19): error CS1510: A ref or out argument must be an lvalue -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBCWCGLcKrfGI7n3QRAsGDAJ4iv4lsz/2YiwW+U3MhucHGNmD3ZQCcDuza mCkahE0qJiXdYZIaQaKiah0= =jNJc -END PGP SIGNATURE- ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] [ANN] Mono: A Developer's Notebook now available
I'm pleased to announce the availability of the book "Mono: A Developer's Notebook", written by Edd Dumbill and Niel Bornstein and published by O'Reilly. http://www.oreilly.com/catalog/monoadn/ The book's already in some stores and should ship soon from online bookstores (despite what Amazon says about the release date!) We cover installing Mono 1.0 (for Linux, Mac and Windows), getting started with C# and .NET APIs, Gtk#, XML, ASP.NET & web services, IKVM, autoconf/automake and more. I'd like to thank the members of the Mono community for helping us as we wrote the book. We're really proud to have published the first book covering Mono 1.0. -- Edd Dumbill ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Any interest in a new open source project?
I have a project I call Safari Cell, for now, that takes a relational SQL database and turns it into a DataSet with DataTables for every table, complete with DataRelations, UniqueConstraints, ForeignKeyConstraints and a few other handy things. All the Data… objects are hidden, however, behind classes that manage filling those entities with data from the database on an as-called-for basis. Modified data is cached and written later by a lazy-writer thread. Unused data is eventually removed from the cache. Any modified column is validated against any extra schema available from the DB server. The goal is to make it really easy to write business objects that operate on relational databases, to take advantage of fast caching, transactions, and all without writing any plumbing code in the business object itself. Safari Cell scans the database schema at startup and exposes everything through typed classes. I have done a great deal of work on this project, all in Visual Studio .NET in C#. I want to make it open source so that others can help add code to support other DB servers besides just MS SQL Server. I started the project with extensibility and multiple database server backends in mind. Is there a great deal of interest in helping these classes grow and mature? I am planning on putting the source up on Novell’s sourceforge if people are willing to use/contribute. - Andrew Arnott