Email lists > Melbourne Python Users Group > Re: [melbourne-pug] Simple syntactic error? > Re: [melbourne-pug] Simple syntactic error?

Re: [melbourne-pug] Simple syntactic error?




This post if a part of  this thread

2008-05-23 04:56:25
Re: Simple syntactic error?
So what was the issue in the end? It helps to know the
answer if people
have a similar problem and find the list archives via
google. (Also, I'm
curious).

Thanks,

Anthony


On Fri, May 23, 2008 at 01:49:50AM -0400, g sobers wrote:
> Problem solved.
> 
> Appreciate the assistance.
> 
> Best,
> wirefree
> 
> 
> 
> On 5/23/08, g sobers <g.forumzgmail.com> wrote:
> >
> > Addressing each of your suggestions below with
resulting output:
> >
> > *Kevin Littlejohn*
> > *- Are you certain cb_calling is even being
called? *
> > Confirming the same. Checked via print statement.
> >
> > - *cb_calling should definitely declare state as
global - and for style,
> > I'd want the global declaration in keys() as well
> > *Declared: global *state* in keys() as well as
global *state* in cb_calling.
> > To no avail.
> >
> > *Tennessee Leeuwenburg*
> > *- The "state" in cb_calling is not the
same "state" you declare earlier.
> > You'll need to declare it global inside cb_calling
for it to work.*
> > PyS60 documentation confirms "if a variable
is defined outsite any
> > function, it belongs automatically to the global
scope."
> >
> > **Anthony Briggs
> > *- appuifw is a framework, so your keys function
will be called in a
> > different 'context'. Your framework might be using
state for something
> > else, or is otherwise messing around with globals.
Try changing
> > 'state' to 'foo_state' or similar and see if that
helps.
> > *That is indeed correct. However, in the case of
the intended
> > functionality, *state* only becomes relevant when
a key is pressed i.e.
> > keys() is called.
> >
> > Which state are you suggesting being changed?*
> >
> > **
> > - And yes, you should have 'global state' in each
of your functions,
> > otherwise you'll drive a local variable over the
top of your global.
> > *Done.
> >
> >
> > *All of the above attempts have been unsuccessful.
Quite perplexing.*
> >
> > Just a brief plain english understanding of the
intended
> > functionaity, present results and implemented
code:
> >
> > *Canvas receives a key event and passes it to
keys(). If the phone's 'yes'
> > key is pressed, a note stating the event displays
correctly. However, when
> > the phone rings and is answered, state is
assigned
> > 'EStatusConnected' parameter. At this point,
second of the if-statements in
> > keys() should result in a note stating 'yes key is
pressed & call active'.
> > But, the note statement of the first if-statement
continues to be displayed.
> > *
> >
> > *NOTE*: The following code, source for this
script, works perfectly.
> >
> > http://mindinthewater.blo
gspot.com/2008/01/recording-phone-calls-on-s60-phone-part.ht
ml
> >
> > Look forward to your suggestion.
> >
> > Best,
> > wirefree
> >

> _______________________________________________
> melbourne-pug mailing list
> melbourne-pugpython.org
> http://mail.python.org/mailman/listinfo/melbourne-pug


-- 
------------------------------------------------------
 HyPerACtIVe?! HEY, Who ArE yoU cAllInG HYPERaCTive?!
 abriggswestnet.com.au
------------------------------------------------------
_______________________________________________
melbourne-pug mailing list
melbourne-pugpython.org
http://mail.python.org/mailman/listinfo/melbourne-pug

about | contact  Other archives ( Real Estate discussion Medical topics )