PDA

View Full Version : access modifiers on Listeners.InitOwner and Field.UniqueName



abertram
Jan 28, 2009, 8:58 AM
Hi,

Is it possible to have the access modifiers of all the Listeners classes (TextFieldListeners, BoxComponentListeners, etc changed from internal to public on the next release, and the Field.UniqueName changed from internal to protected?

I just finished building a new CoordinateField control for the entry of GPS coordinates and had to make those changes on my end in order to inherit from TextBaseField.

Thanks,

Alex

geoffrey.mcgill
Jan 28, 2009, 1:07 PM
Is it possible to have the access modifiers of all the Listeners classes (TextFieldListeners, BoxComponentListeners, etc changed from internal to public on the next release

Best I can tell everything is already marked as "public" or "public virtual"? At least in the v0.7 release.





and the Field.UniqueName changed from internal to protected?

done. This change will be included with the v0.8.0 release (or now via svn). 

abertram
Jan 29, 2009, 6:19 AM
Sorry, it's the InitOwner() method in the listener classes that is marked as internal, at least in the 0.70 release.

Thanks!

Alex

geoffrey.mcgill
Jan 29, 2009, 11:30 AM
Sorry, it's the InitOwner() method in the listener classes that is marked as internal, at least in the 0.70 release.

Ya, I ran into that issue yesterday as well when I was trying to create an extension. The InitOwner will have to change.


We should be able to make the change today.

skynet
Sep 30, 2009, 12:11 PM
Hello,


I just downloaded the source from SVN and it seems that this still has internal modifier as below:






internal void InitOwners(Control owner)
{
if(owner == null)
{
return;
}


this.Owner = owner;
foreach (ListenerTriplet listener in this.Listeners)
{
listener.Listener.Owner = owner;
}


//owner.Load += new EventHandler(Owner_Load);


owner.Load += delegate(object sender, EventArgs e)
{
this.Owner = owner;
foreach (ListenerTriplet listener in this.Listeners)
{
listener.Listener.Owner = owner;
}
};
}




Can this be changed to public, so that I can add my owen Listeners to a custom object? Or am I doing something completely wrong?


Thanks
SkyNet

Vladimir
Sep 30, 2009, 12:19 PM
Hi,

I think you can safely remove calling of that function from your listeners initialization (just don't use InitOwners)