Re: [Vala] An array of Delegations?

2011-06-02 Thread Joseph Montanez
Jim, That worked perfectly! On Wed, Jun 1, 2011 at 9:44 PM, Jim Nelson wrote: > That's just a missing access modifier.  Add "public" before the "delegate" > keyword on the first line and it should compile. > > -- Jim > > On Wed, Jun 1, 2011 at 9:23 PM, Joseph Montanez > wrote: >> >> Jim, >> >>

Re: [Vala] An array of Delegations?

2011-06-01 Thread Jim Nelson
That's just a missing access modifier. Add "public" before the "delegate" keyword on the first line and it should compile. -- Jim On Wed, Jun 1, 2011 at 9:23 PM, Joseph Montanez wrote: > Jim, > > I had tried that too and get the hole " is less accessible than field" > > On Wed, Jun 1, 2011 at 5

Re: [Vala] An array of Delegations?

2011-06-01 Thread Joseph Montanez
Jim, I had tried that too and get the hole " is less accessible than field" On Wed, Jun 1, 2011 at 5:22 PM, Jim Nelson wrote: > Try wrapping the delegates in an object and storing those in Gee or an > array.  The class accepting the delegates could use a private class so it's > not exposed. > >

Re: [Vala] An array of Delegations?

2011-06-01 Thread Jim Nelson
Try wrapping the delegates in an object and storing those in Gee or an array. The class accepting the delegates could use a private class so it's not exposed. delegate void UserCallback(); public class CallbackManager { private class DelegateWrapper { public UserCallback cb; } private

Re: [Vala] An array of Delegations?

2011-06-01 Thread Aleksander Wabik
But keep in mind that glib signals are not good if you care about performance. best regards, >I know it's not exactly what you want, but you can use signals to obtain >something similar. Since signals can contain parameters and return values, >they function more or less like delegates when connec

Re: [Vala] An array of Delegations?

2011-06-01 Thread Alexandre Rosenfeld
I know it's not exactly what you want, but you can use signals to obtain something similar. Since signals can contain parameters and return values, they function more or less like delegates when connected to. And any number of functions can be connected to a single signal at any time. *Alexandre R

[Vala] An array of Delegations?

2011-06-01 Thread Joseph Montanez
I know this is a bit insane, but is there any plan or maybe even a work around to having working list of delegations? I tried with both gee and fixed arrays for delegations but I get the error of: "Delegates with target are not supported as array element type" Right now my only work around is hav