If I create a =93system.windows.documents.adorner =93 class, see code below, it asks for the constructor argument =93UIElement=94 UIElement uie system.windows.documents.adorner myadr myadr =3d create system.windows.documents.adorner(uie) but if I inherit and create my own copy of =93system.windows.documents.adorner =93 in a PBL, when I create that class in script, see below, it does not ask for the constructor argument, is this a correct? myadorner myad myad =3d create myadorner <=3d=3d no UIElement required.
![]() |
0 |
![]() |
Peter, I just went through the process Looked at system.windows.documents.adorner in the Object Browser - did not see a default constructor 1. Inherited from system.windows.documents.adorner 2. Saw the overloaded constructor in the painter 3. Saved 4. Went to a script in a window event and started typing intellisense prompted me correctly all the way n_adorner myadorner myadorner = create n_adorner ( //<< as soon as I hit ( intellisense prompted me with arg info so it knows about the overloaded constructor It was able to compile without the call to the overloaded constructor Wonder why - there is no default constructor??? -- Yakov [TeamSybase] eLearnIT LLC Twitter: http://twitter.com/eLearnPB Blog: http://yakovwerde.sys-con.com Web Site: http://www.eLearnITOnline.com On 1/14/2011 11:37 AM, Peter Conn wrote: > If I create a �system.windows.documents.adorner � class, > see code below, it asks for the constructor argument > �UIElement� > > UIElement uie > system.windows.documents.adorner myadr > myadr = create system.windows.documents.adorner(uie) > > but if I inherit and create my own copy of > �system.windows.documents.adorner � in a PBL, when I > create that class in script, see below, it does not ask for > the constructor argument, is this a correct? > > myadorner myad > myad = create myadorner<== no UIElement required.
![]() |
0 |
![]() |
I do not see the intellisense for the default contructor arg, it is an abstract class, wonder if that effects it or is this a PB bug. MyAdorner adr UIElement ui adr =3d create MyAdorner(ui) <=3d=3d=3d fails compile Error 1 No suitable constructor for create statement: Myadorner. MyAdorner adr adr =3d create MyAdorner() <=3d=3d passes compile > Peter, > > I just went through the process > > Looked at system.windows.documents.adorner > in the Object Browser - did not see a default constructor > > 1. Inherited from system.windows.documents.adorner > 2. Saw the overloaded constructor in the painter > 3. Saved > 4. Went to a script in a window event and started typing > intellisense prompted me correctly all the way > > n_adorner myadorner > myadorner =3d create n_adorner ( > //<< as soon as I hit ( intellisense prompted me with > arg info > so it knows about the overloaded constructor > > It was able to compile without the call to the overloaded > constructor Wonder why - there is no default > constructor??? > > > -- > Yakov [TeamSybase] > eLearnIT LLC > Twitter: http://twitter.com/eLearnPB > Blog: http://yakovwerde.sys-con.com > Web Site: http://www.eLearnITOnline.com > > > On 1/14/2011 11:37 AM, Peter Conn wrote: > > If I create a =93system.windows.documents.adorner =93 class, > > see code below, it asks for the constructor argument > > =93UIElement=94 > > > > UIElement uie > > system.windows.documents.adorner myadr > > myadr =3d create system.windows.documents.adorner(uie) > > > > but if I inherit and create my own copy of > > =93system.windows.documents.adorner =93 in a PBL, when I > > create that class in script, see below, it does not ask > > for the constructor argument, is this a correct? > > > > myadorner myad > > myad =3d create myadorner<=3d=3d no UIElement required. >
![]() |
0 |
![]() |
The doc says the parameter is "The element to bind the adorner to" My guess is that it is looking for a concrete reference to a GUI element to bind to Of course any FrameWork element IS A UIElement so I might be looking for a Control or an ItemsControl etc..... Yakov On 1/14/2011 12:38 PM, Peter Conn wrote: > I do not see the intellisense for the default contructor > arg, it is an abstract class, wonder if that effects it or > is this a PB bug. > > MyAdorner adr > UIElement ui > adr = create MyAdorner(ui)<=== fails compile Error > 1 No suitable constructor for create statement: Myadorner. > > MyAdorner adr > adr = create MyAdorner()<== passes compile > >> Peter, >> >> I just went through the process >> >> Looked at system.windows.documents.adorner >> in the Object Browser - did not see a default constructor >> >> 1. Inherited from system.windows.documents.adorner >> 2. Saw the overloaded constructor in the painter >> 3. Saved >> 4. Went to a script in a window event and started typing >> intellisense prompted me correctly all the way >> >> n_adorner myadorner >> myadorner = create n_adorner ( >> //<< as soon as I hit ( intellisense prompted me with >> arg info >> so it knows about the overloaded constructor >> >> It was able to compile without the call to the overloaded >> constructor Wonder why - there is no default >> constructor??? >> >> >> -- >> Yakov [TeamSybase] >> eLearnIT LLC >> Twitter: http://twitter.com/eLearnPB >> Blog: http://yakovwerde.sys-con.com >> Web Site: http://www.eLearnITOnline.com >> >> >> On 1/14/2011 11:37 AM, Peter Conn wrote: >>> If I create a �system.windows.documents.adorner � > class, >>> see code below, it asks for the constructor argument >>> �UIElement� >>> >>> UIElement uie >>> system.windows.documents.adorner myadr >>> myadr = create system.windows.documents.adorner(uie) >>> >>> but if I inherit and create my own copy of >>> �system.windows.documents.adorner � in a PBL, when I >>> create that class in script, see below, it does not ask >>> for the constructor argument, is this a correct? >>> >>> myadorner myad >>> myad = create myadorner<== no UIElement required. >>
![]() |
0 |
![]() |