[Mono-dev] XPath UnionIterator

2005-11-23 Thread Vladimir Krasnov
Hello Atsushi,

I've found a problem in UnionIterator.SetCurrent() method. Please look
at the attached sample that reproduces the problem.
Also attached a patch that fixes the problem, please approve.

Vladimir Krasnov
?xml version='1.0'?
!-- This file represents a fragment of a book store inventory database --
bookstore specialty=novel xmlns:dt=urn:uuid:C2F41010-65B3-11d1-A29F-00AA00C14882/ xmlns:my=urn:http//www.placeholder-name-here.com/schema/
	book style=autobiography
	titleSeven Years in Trenton/title
		author
			first-nameJoe/first-name
			last-nameBob/last-name
			awardTrenton Literary Review Honorable Mention/award
			my:countryUSA/my:country
		/author
		price12/price
	/book
	book style=textbook
		titleHistory of Trenton/title
		author
			first-nameMary/first-name
			last-nameBob/last-name
			publication
Selected Short Stories of
first-nameJoeBob/first-name
last-nameLoser/last-name
countryUS/country
			/publication
		/author
		price55/price
	/book
	book style=storybook
		titleXQL The Golden Years/title
		author
			first.nameMike/first.name
			last.nameHyman/last.name
			publication
XQL For Dummies
first.nameJonathan/first.name
last.nameMarsh/last.name
			/publication
		/author
		price dt:dt=fixed.14.455.95/price
	/book
	magazine style=glossy frequency=monthly
		titleRoad and Track/title
		price3.50/price
		subscription price=24 per=year/
		special_edition per_year=1Yes/special_edition
	/magazine
	magazine style=glossy frequency=weekly
		titlePC Week/title
		pricefree/price
		publisherZiff Davis/publisher
	/magazine
	magazine style=glossy frequency=bi-monthly
		titlePC Magazine/title
		price dt:dt=fiXed.14.43.95/price
		publisherZiff Davis/publisher
		articles
			story1Create a dream PC
detailsCreate a list of needed hardware/details
			/story1
			story2The future of the web
detailsCan Netscape stay alive with Microsoft eating up its browser share?/details
stockMSFT 99.30/stock
date dt:dt=date1998-06-23/date
			/story2
			story3Visual Basic 5.0 - Will it stand the test of time?
			/story3
		/articles
	/magazine
	magazine style=glossy frequency=monthly
		articles
			story1Sport Cars - Can you really dream?
			/story1
		/articles
	/magazine
	magazine style=glossy frequency=monthly
		awardPC Magazine Best Product of 1997/award
	/magazine
	book style=textbook
		titleHistory of Trenton 2/title
		author
			first.nameMary F/first.name
			last-nameRobinson/last-name
			publication
Selected Short Stories of
first.nameMary F/first.name
last-nameRobinson/last-name
			/publication
		/author
		price55/price
	/book
	book style=textbook
		titleHistory of Trenton Vol 3/title
		author
			first-nameMary F/first-name
			last-nameRobinson/last-name
			first-nameFrank/first-name
			last-nameAnderson/last-name
			awardPulizer/award
			publication
Selected Short Stories of
first-nameMary F/first-name
last-nameRobinson/last-name
			/publication
		/author
		price10/price
	/book
	book style=textbook
		titleHow To Fix Computers/title
		author
			first-nameHack/first-name
			last-nameer/last-name
			degree from=HarvardPh.D./degree
		/author
		price08/price
	/book
	magazine style=glossy frequency=monthly
		titleTracking Trenton/title
		price2.50/price
		subscription price=24 per=year/
	/magazine
	my:magazine style=flat frequency=monthly
		titleTracking Trenton Stocks/title
		price0.98/price
		subscription price=10.75 per=year/
	/my:magazine
	book style=novel id=myfave
		titleTrenton Today, Trenton Tomorrow/title
		author
			first-nameToni/first-name
			last-nameBob/last-name
			degree from=Trenton UB.A./degree
			degree from=HarvardPh.D./degree
			awardPulizer/award
			publicationStill in Trenton/publication
			publicationTrenton Forever/publication
		/author
		price intl=canada exchange=0.76.50/price
		excerpt
			pIt was a dark and stormy night./p
			pBut then all nights in Trenton seem dark and
			stormy to someone who has gone through what
			emphI/emph have.
			/p
			definition-list
termTrenton/term
definitionmisery/definition
			/definition-list
		/excerpt
	/book
	my:book style=leather price=29.50
		my:titleWho's Who in Trenton/my:title
		my:authorRobert Bob/my:author
	/my:book
	my:book style=hard back price=99.95
		my:titleWhere is Trenton?/my:title
	/my:book
	my:book dt:style=string style=hard back price=19.99
		my:titleWhere in the world is Trenton?/my:title
	/my:book
/bookstore
functions
	functionboolean/function
	functionceiling/function
	functionconcat/function
	functioncontains/function
	functioncount/function
	functioncurrent/function
	functionmsxsl:date/function
	functiondocument/function
	functionelement-available/function
	functionfalse/function
	functionfloor/function
	functionformat-number/function
	functionfunction-available/function
	functiongenerate-id/function
	functionid/function
	functionkey/function
	functionlang/function
	functionlast/function
	functionlocal-name/function
	functionname/function
	functionnamespace-uri/function

Re: [Mono-dev] SWF, gtk#, OSX, Linux, Win32, GUI's thougths?

2005-11-23 Thread xiii29




Miguel de Icaza wrote:

  
CODY RUSSELL [EMAIL PROTECTED] wrote:



  I think OSX support for GTK just went into cvs recently.
  

with no need for X11? can anyone confirm this?

  
  
That is correct.

Miguel.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


  

More info :
http://developer.imendio.com/wiki/Gtk_Mac_OS_X




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


[Mono-dev] removing schema:import with empty namespace

2005-11-23 Thread Konstantin Triger








Hello Lluis,



The attached WS produces wsdl with empty namespace in
schema:import declaration. This causes problems in consumption of this wsdl by
MS wsdl tool.

The attached diff fixes that (by simple removing of imports
with empty namespaces). Please review.



Regards,

Konstantin Triger










Service3.asmx
Description: Service3.asmx


emtpyns.diff
Description: emtpyns.diff
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] XSP null reference exception

2005-11-23 Thread Carlos Solorzano
I had XSP running for a bit then I got a call saying the site was 
unresponsive, I tried it myself and yeah it was like it would accept the 
socket but do nothing with the new connection. I looked at the XSP 
windows and found the output below:


Unhandled Exception: System.NullReferenceException: A null value was 
found where an object instance was required.

in 0x0 unknown method
in (wrapper managed-to-native) 
System.Object:__icall_wrapper_mono_ldvirtfn (object,intptr)

in 0x002ad Mono.WebServer.ApplicationServer:RunServer ()
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()

I dont know what caused it, and don't know if its reproducible, I have 
been running that same site with a pretty high load for a few weeks now 
and never saw that error before, right now it actually had almost no 
load. I am on 1.1.9.2 on that machine on gentoo 64bit but will be 
upgrading to 1.1.10 this afternoon.


--Carlos

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


RE: [Mono-dev] COM Interop in Mono

2005-11-23 Thread Jonathan S. Chambers
First, thanks a ton to Jonathan Pryor, Paolo Molaro, and Lluis Sanchez
(and any others) for their help.

So, previously I was able to create a class from an interop assembly and
use that class in managed (casting, calling methods, etc. successfully
interacting with the underlying COM object).

That was only for COM objects whose coclass metadata was defined in the
interop assembly. Now, arbitrary COM interfaces can be handled, even if
the object is not a coclass or if the coclass is not defined in the
interop assembly. In other words, a COM interface can be marshaled back
to managed as long as that interface is defined in an interop assembly.

I'll described the process (I'll post code later, it's too ugly right
now as I just got it working).

It begins with a method/property returning a parameter/value
that is marked to be marshalled as an interface (meaning COM interface).
This will invoke the marshaller. At this point, all that is assumed is
that the pointer is a COM interface. The managed method has a target
interface for the pointer. This target interface is queried for a
GuidAttribute. The guid is then used to call QueryInterface on the
underlying COM object to verify that the object does indeed support that
interface. 
I created new class, ComProxy, that derives from RealProxy. An
instance of ComProxy is created for type System.__ComObject, and the COM
interface pointer is stored in the ComProxy object in an IntPtr field.
Next, GetTransparentProxy is called on the ComProxy object. This
transparent proxy is then cast to the target interface. ComProxy also
implements System.Runtime.Remoting.IRemotingTypeInfo, which has a method
CanCastTo. This method is called the first time the transparent proxy is
cast to a new type. In this method, it is verified that the underlying
COM object supports an interface via the method mentioned previously
(calling QI with the interface GUID). If a cast can proceed, then
special logic occurs because the object is a transparent proxy. The
interface is added to the interface table, and the additional methods
are added to the vtable. Normally, these vtable slots are filled with
trampolines for remoting calls. However, in the COM case I emit
trampolines that call the underlying COM object. 

So, much is done yet much remains ;-). If anyone has any questions
please ask.

TODO:
1. A lot of marshalling code. Currently, the System.Object type is not
marshalled at all. This needs implemented for VARIANT, IUnknown, and
IDispatch types.
2. Currently I'm not even going through the default marshalling code. I
need to use this and adjust it for COM rules rather than pinvoke rules
when using COM Interop.
3. Add finalizer logic so that COM objects will be released during
finalization. Need to look into the thread issues with this, as
finalization may not occur on the thread that the COM object was created
on.
4. Right now, I store the IUnknown pointer. I really need an array/list
of pointers that are indexed by interface. Thus, I only need to
QueryInterface for each interface once. I do it on every method call
currently.
5. Try this with XPCOM, or a cross platform COM solution.
6. Connection points/events.
7. COM Callable Wrappers - exposing managed objects to COM

- Jonathan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jonathan
S. Chambers
Sent: Thursday, November 17, 2005 11:52 AM
To: Paolo Molaro; mono-devel-list@lists.ximian.com
Subject: RE: [Mono-dev] COM Interop in Mono

Well,
Some things are windows only (BSTR marshalling comes to mind),
at least for now. Should that not be included at this point, or should
it be put inside of an #ifdef? On #mono there was some concern about
different levels of support across platforms.
Also, if I leave this inside of mono for now, any advice on
that? Should I stick all my routines at the bottom of the file for
example, or tag them all with a comment, etc.?

Thanks,
Jonathan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paolo
Molaro
Sent: Thursday, November 17, 2005 11:49 AM
To: mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] COM Interop in Mono

On 11/16/05 Jonathan S. Chambers wrote:
 Attached is a diff of some current progress. These changes are all in
 place right now, they would of course need moved to an external
library.

Thanks for the patch.
I don't think this stuff should be moved to a library, at least not
until it's windows-only. Moving to a module may be needed later if we
support other COM-like systems using the same interface, but that is
likely way off.


 Index: metadata/class.c
 ===
 --- metadata/class.c  (revision 52794)
 +++ metadata/class.c  (working copy)
 @@ -2682,6 +2682,12 @@
   g_assert (class-field.count == 0);
   }
  
 + /* reserve space to store COM object pointer in RCW */
 + if (class-flags  

[Mono-dev] Interop question, C++ string marshaling

2005-11-23 Thread Gennadiy Donchyts
Hi all, 

is there standard way of C++ string marshaling. I'm trying to write
wrapper of the C++ library in C#. And what is the best recommended 
way to do such wrapping in Mono if I have library in C++?

Is it better to export everything as the C structures + functions with 
extern C__declspec(dllexport
) or classes are also supported quite well?
(the finalcode should be clean and easy readable and portable of course).

What is Is it better to use StdCall or Cdecl? I started with Cdecl but later 
did not manage to make callback work wit Cdecl here:

typedef void (__stdcall *LogHandler) (
const char *message);static LogHandler log_handler = 0;


I plan to make all interface C++ / C# code to be generatable, could you please
point me for some some good recommented examples of using SWIG or 
similar library for such C# = C++ interops which are implemented?

Thanks in advance,
--Gena
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Re: Interop question, C++ string marshaling

2005-11-23 Thread Gennadiy Donchyts
...

I plan to make all interface C++ / C# code to be generatable, could you please
point me for some some good recommented examples of using SWIG or 
similar library for such C# = C++ interops which are implemented?

... sorry, I've found enough info about it on their web site .. and I missed a point 
a bit about what is SWIG :). 



Thanks in advance,
--Gena
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] SWF, gtk#, OSX, Linux, Win32, GUI's thougths?

2005-11-23 Thread Cody Russell
On Tue, 2005-11-22 at 23:24 -0500, ted leslie wrote:
 On Tue, 22 Nov 2005 15:15:17 -0600
 CODY RUSSELL [EMAIL PROTECTED] wrote:
 
  I think OSX support for GTK just went into cvs recently.
 
 with no need for X11? can anyone confirm this?

Just look in gnome cvs; Anders committed Mac support just a few days
ago, so I guess it'll go into the 2.9.x release series.

You might find this more informative of the progress:

http://developer.imendio.com/wiki/Gtk_Mac_OS_X

Regards,
   Cody

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