Re: Change object state

From: Date: Tue, 03 Jun 2003 21:38:36 +0000
Subject: Re: Change object state
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-150080@lists.php.net to get a copy of this message
On Tue, 2003-06-03 at 14:34, Info@Best-IT wrote: > Is there any way I can change the state of an already instantiated object? > > ex: > > $thisone = new Object(); > > $content = something; > > $thisone -> SetContent($content); > > $thisone -> Display(); > > > That creates the object. Now if I want to change its content: > > $content = something different; > > $thisone -> SetContent($content); > > $thisone -> Display(); > > This does not work but it illustrates what I want to do. I need to change > the content property of the "thisone" object. This should definitely work. However, without the code to the Object class there is little way to tell where the problem is. Presumably the SetContent() method is deciding not to work a second time for some reason (perhaps the new content fails to satisfy some kind of requirement for valid content input?) Torben > R/T > -- Torben Wilson <torben@php.net> +1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com -----==== Boycott Starbucks! http://www.haidabuckscafe.com ====-----

« previous php.general (#150080) next »