🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7295

Re: firing a property veto exception

#7295
From: CLG
Date: Sat, 30 Jun 2001 23:42
55 lines
3387 bytes
well ok, im breakin tradition.  Here, I am given a value I dont like, so I
am firing the change veto myself.  So  I have  actually  not created the
change event  yet.   maybe  this  is  wrong,  maybe  i should just  fire  an
illegal argument exception?  but  the  bean  spec  seemed  to imply  i
should  fire  a veto exception.  my  keyboard  is messing up  or  i  would
show  you  mycode.  its  just a  property get  and  set  routing thats
bound or  constrained.    I  guess   the  new  value should  be different
even  if  im  not  letting  the change  through.  ifIunderstand
youcorrectly.
imtiredofhittingthespacebar10timestoget1space.newkeyboardtimeIthink...

--
Peace,


Carl L. Gilbert
http://www.rigidsoftware.com
ICQ 614395-currently stolen working to retrieve.

"Then said I, Wisdom [is] better than strength: nevertheless the poor man's
wisdom [is] despised, and his words are not heard." Ecclesiastes 9:16

"John McGrath [TeamB]" <ng-b@JPMcGrath.net> wrote in message
news:MPG.15a81c058ddd641098a30c@forums.borland.com...
> On Sat, 30 Jun 2001 13:08:04 -0400, "CLG" <lamont_gilbert @
> rigidsoftware.com> wrote:
>
> > I disagree.  I am writing a bean, and I am the one responsible
> > for creating the methods.  So i dont have any such objects
> > premade and handed to me.  I am the maker in this event.
> > So my question is what should the maker of this object do.
>
> You create the PropertyChangeEvent *before* the veto can occur.
> The oldValue property is the previous (actually current) value
> of the property, and the newValue property is the proposed new
> value for the property.  This event is "fired" at all of the
> VetoableChangeListeners.
>
> The VetoableChangeListeners receive that event in the vetoableChange()
> method, and throw a PropertyVetoException if they do not like the
> proposed change.  The constructor for PropertyVetoException takes a
> PropertyChangeEvent as an argument, which should be passed the same
> value that was passed to vetoableChange() as an argument.
>
> No PropertyChangeEvent should ever be constructed by the listener
> that vetoes the property change.
>
> --
> Regards,
>
> John McGrath [TeamB]
>
> ---------------------------------------------------
> Before sending me e-mail, please read:
>     http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <3b3e64e1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.online.be!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnews
References: <3b3cee8f$1_2@dnews> <3b3da103_1@dnews> <3b3e0880$1_2@dnews> <MPG.15a81c058ddd641098a30c@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,e79ac2a4b52682c7
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-06-30 17:06:31 PST
From: "CLG" <lamont_gilbert @ rigidsoftware.com>
Newsgroups: borland.public.jbuilder.java.language
References: <3b3cee8f$1_2@dnews> <3b3da103_1@dnews> <3b3e0880$1_2@dnews> <MPG.15a81c058ddd641098a30c@forums.borland.com>
Subject: Re: firing a property veto exception
Date: Sat, 30 Jun 2001 19:42:13 -0400
Lines: 57
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 24.181.226.14
Message-ID: <3b3e64e1_2@dnews>
X-Trace: dnews 993944801 24.181.226.14 (30 Jun 2001 16:46:41 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.online.be!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnews