[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]Status of cscc and Qt#
From: |
Adam Treat |
Subject: |
Re: [DotGNU]Status of cscc and Qt# |
Date: |
Wed, 6 Nov 2002 00:53:17 -0500 |
User-agent: |
KMail/1.4.7 |
On Wednesday 06 November 2002 12:44 am, you wrote:
> Adam Treat wrote:
> > Thanks Rhys! I am very happy to see that you are a busy bee on -patches
> > :-)
>
> Just cleaning up some loose ends from 0.4.6.
>
> Try it now (from the CVS version of course).
>
> Cheers,
>
> Rhys.
No more problem with Array's but now:
address@hidden:~/dev/qtsharp/src/examples/samples$ ilrun hello.exe
Uncaught exception: System.ArgumentNullException: Argument cannot be null
Parameter name: type
at System.Activator.CreateInstance(Type, BindingFlags, Binder,
Object[], CultureInfo, Object[])
at System.Activator.CreateInstance(Type, BindingFlags, Binder,
Object[], CultureInfo)
at Qt.QtSupport.DispatchEvent(IntPtr, String, IntPtr, String)
at Qt.QWidget.qt_QWidget_show(IntPtr)
at Qt.QWidget.Show()
at QtSamples.HelloWorld.Main(String[])
Segmentation fault
The DispatchEvent method looks like this:
private static void DispatchEvent (IntPtr instance, string eventname, IntPtr
eventinstance, string eventclass)
{
ArrayList array;
QObject obj;
QEvent ev;
Type evtype = Type.GetType ("Qt."+eventclass+",Qt");
if ((obj = (QObject)LookupObject (instance)) == null)
return;
try
{
if ((ev = (QEvent)LookupObject (eventinstance))
== null) {
object[] args = new object[] {
eventinstance };
BindingFlags bflags =
BindingFlags.Instance | BindingFlags.NonPublic |
BindingFlags.Public;
ev = Activator.CreateInstance (evtype,
bflags, null, args, null) as
QEvent;
}
// Notify global event handlers first.
if ((array = EventList.QEventHandlers
(eventclass)) != null) {
foreach (Delegate del in array) {
QEventArgs evargs = new
QEventArgs (eventname, ev);
del.DynamicInvoke (new object[]
{ obj, evargs });
}
}
// Notify local event handlers second.
if ((array = EventList.QEventHandlers
(eventname)) != null) {
foreach (Delegate del in array) {
if (ReferenceEquals
(del.Target, obj))
del.DynamicInvoke (new
object[] { ev });
}
}
}
catch (TargetInvocationException e) {
throw e.InnerException;
}
ev.deleted = true; // Qt deletes events for us
ev.Dispose ();
}
I wonder if it isn't a problem with the binding flags. Perhaps the
CreateInstance can not find the correct ctor or something. We had this
problem with Mono's reflection.
Cheers,
Adam
- [DotGNU]Status of cscc and Qt#, Adam Treat, 2002/11/05
- Re: [DotGNU]Status of cscc and Qt#, Adam Treat, 2002/11/05
- Message not available
- Message not available
- Re: [DotGNU]Status of cscc and Qt#,
Adam Treat <=
- Re: [DotGNU]Status of cscc and Qt#, Adam Treat, 2002/11/06
- Re: [DotGNU]Status of cscc and Qt#, Rhys Weatherley, 2002/11/06
- Re: [DotGNU]Status of cscc and Qt#, Adam Treat, 2002/11/06
- [DotGNU]The Intended usage of GNU software (was Treecc Ruby support), James Michael DuPont, 2002/11/06
- [DotGNU]Re: The Intended usage of GNU software (was Treecc Ruby support), Rhys Weatherley, 2002/11/06
- [DotGNU]Re: The Intended usage of GNU software (was Treecc Ruby support), James Michael DuPont, 2002/11/06
- Re: [DotGNU]Status of cscc and Qt#, Gopal V, 2002/11/06
- Re: [DotGNU]Status of cscc and Qt#, Gopal V, 2002/11/06
- Re: [DotGNU]Status of cscc and Qt#, Adam Treat, 2002/11/06
- Re: [DotGNU]Status of cscc and Qt#, Rhys Weatherley, 2002/11/06