Re: Interacting with controller

jon klein <[email protected]> Wed, 7 Sep 2005 09:03:18 -0400
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
--===============72840962035962686==
Content-Type: multipart/alternative; boundary=Apple-Mail-1--385373115


--Apple-Mail-1--385373115
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed


On Sep 7, 2005, at 5:44 AM, Anand Veeraswamy wrote:

> Hi,
>
> I noticed that it is possible to define global constants in Steve  
> using @define
>
> Is it also possible to define global variables which can be shared  
> by the different classes.
>
> If not, how is it possible to access a variable declared in the  
> controller class??

breve does not allow global variables.  The normal way to solve this
problem is to store variables in the controller (the only "global"  
object)
and then add methods in the controller to get/set the values you're
interested in.

- jon klein
--Apple-Mail-1--385373115
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=ISO-8859-1

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; "><BR><DIV><DIV>On Sep 7, 2005, at =
5:44 AM, Anand Veeraswamy wrote:</DIV><BR =
class=3D"Apple-interchange-newline"><BLOCKQUOTE type=3D"cite"> =
<DIV><FONT face=3D"Arial" size=3D"2">Hi,</FONT></DIV> <DIV><FONT =
face=3D"Arial" size=3D"2"></FONT>=A0</DIV> <DIV><FONT face=3D"Arial" =
size=3D"2">I noticed that it=A0is possible to define global constants in =
Steve using @define </FONT></DIV> <DIV><FONT face=3D"Arial" =
size=3D"2"></FONT><FONT face=3D"Arial" size=3D"2"></FONT>=A0</DIV> =
<DIV><FONT face=3D"Arial" size=3D"2">Is it also possible to define =
global variables which can be shared by the different =
classes.</FONT></DIV> <DIV><FONT face=3D"Arial" size=3D"2"></FONT>=A0</DIV=
> <DIV><FONT face=3D"Arial" size=3D"2">If not, how is it possible to =
access a variable declared in the controller =
class??</FONT></DIV></BLOCKQUOTE><BR></DIV><DIV>breve does not allow =
global variables.=A0 The normal way to solve this=A0</DIV><DIV>problem =
is to store variables in the controller (the only =
"global"=A0object)=A0</DIV><DIV>and then add methods in the controller =
to get/set the values you're</DIV><DIV>interested in.</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>- jon =
klein</DIV></BODY></HTML>=

--Apple-Mail-1--385373115--

--===============72840962035962686==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
breve mailing list
[email protected]
http://lists.spiderland.org/mailman/listinfo/breve

--===============72840962035962686==--