Hi,

I was having a problem with a DateTime object, and I noticed some behaviour 
that differs from other Perl programs, so I thought I'd ask here if this is 
a bug, and if there's anyway around it.  The unusual behaviour is as 
follows:

  DB<52> x $datetime1_tab0
0  Win32::GUI::DateTime=HASH(0x7b54a54)
   '-accel' => 0
   '-handle' => 1705748
   '-name' => 'DateTime1_tab0'
   '-type' => 24

This is a typical object created by AddDateTime to a window.

  DB<53> x ${datetime1_tab0}
0  Win32::GUI::DateTime=HASH(0x7b54a54)
   '-accel' => 0
   '-handle' => 1705748
   '-name' => 'DateTime1_tab0'
   '-type' => 24

Same object, but with a bit of syntax sugar difference.

  DB<54> x ${"datetime1_tab0"}
0  HASH(0x7b87064)
     empty hash

Huh?  It's my understanding (and testing this with a couple of other modules 
confirms this) that anything with the braces {} gets "evaluated" and if it 
returns a valid result, then everything should be fine.

The reason I'm trying to do it this way is because I have quite a few of 
these objects, and I want to create a simple loop to iterate over them, 
setting each one to the right time according to my script, but if I can't 
substitute "1/2/3" as needed in the variable name, then I'm stuck.

I've also tried:

  DB<59> $temp = "datetime1_tab0"


  DB<60> x ${$temp}
0  HASH(0x7b87064)
     empty hash

  DB<61> x $$temp
0  HASH(0x7b87064)
     empty hash

As you can see, no such luck.  I'm completely stumped.  Does anyone have any 
tips or advice on how to proceed ?

Thank you. 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/

Reply via email to