most decent books that teach how to use an object oriented programming
language will end up discussing scope at some point, unless they are
intended for an experienced audience.

I'd think for example that the 'pickaxe' book would end up discussing
it somewhat.

btw the counter to your  give-fish / teach-fishing comment  is that to
some folks, learning about locals, globals, scope etc  isn't so much
teaching them to fish as it might be how to make a fishing rod or tie
a net.   They can quite happily fish without knowing those things.  Of
course for folks of that mindset, at the point they suddenly want to
modify the net or rod, well then knowing those things could be
useful.    It depends I suppose on what you want to spend your time
doing?

For me at the present time at least, there's enough challenges as is
with figuring out how to test a highly interactive site with a lot of
client side code, that I'll gladly let the framework handle things
like scope issues for me.  But if you want to dig deeper, by all means
go for it, there's nothing wrong with understanding more about how
stuff works if you have the time and inclination to get into it. .

On Apr 21, 3:41 pm, George <[email protected]> wrote:
> Hi Chuck,
>
> Instead of being given a fish, I'd rather be taught to fish...while
> Watircraft can make things a little more convenient, I'd rather have a
> deeper understanding into what makes a framework successful.  Are
> there books/websites out there that can shed some light on this
> subject?
>
> BTW, thanks for the link Leigh!  I'm going to check that out.
>
> -George
>
> On Apr 21, 3:25 pm, Chuck van der Linden <[email protected]> wrote:
>
>
>
> > If you are using the watircraft framework (I think you were in the
> > training in portland?) then it's supposed to take care of scope, and
> > you can just use 'browser' (or ie or ff  or
> > whatever_makes_sense_to_call_your_browser_instance  if you like typing
>
> > On Apr 21, 3:18 pm, George <[email protected]> wrote:
>
> > > Thanks for the response, Tiffany.  Maybe that's what I wondering...am
> > > I using global variables properly?  The way I have things set up now,
> > > I have a separate file to store my application controls
> > > ($browser.text_field, etc.), and then I have my main script where I
> > > call those controls.  I'm assuming the browser needs to be globalized
> > > since they're being shared between multiple scripts.
>
> > > On Apr 21, 11:10 am, Tiffany Fodor <[email protected]> wrote:
>
> > > > Hi George!
>
> > > > It all depends on your framework and how you're using global
> > > > variables.  I'm currently using a simple Test::Unit framework and my
> > > > browser variable is a global variable ($ie).  Since I use that one
> > > > browser for all my tests and it's easier than passing a local or
> > > > instance variable to all my test classes and methods, I don't see a
> > > > problem with it.
>
> > > > Global variables exist for a reason and used properly, can be a good
> > > > option.
>
> > > > Just my $0.02.
>
> > > > -Tiffany
>
> > > > On Apr 21, 10:08 am, George <[email protected]> wrote:
>
> > > > > Hello folks,
>
> > > > > As I've been learning Watir, I'm becoming more aware that assigning
> > > > > global variable to a browser (or assigning one to anything for that
> > > > > matter!) is a huge no-no.
>
> > > > > So, I guess my question is...should I change the variable type from $
> > > > > to @?  And if yes, will it understood by other custom libraries I
> > > > > include in my main script?
>
> > > > > I hope that makes sense...
>
> > > > > Thanks,
>
> > > > > George- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to