Re: Tcl script fails on some platforms



Mark Janssen wrote:
On 31 jul, 11:06, hrp1...@xxxxxxxxx wrote:

Sorry, I thought I'd done that in the lines -

puts "this is the image filename: $l_image_file"
# If the user picked a file
if {$l_image_file != ""} {
puts "Okay, the image filename wasn't blank"
# add the image to the current session
$::session addImage $l_image_file

addImage is surely the method, and l_image_file is the variable???



You are not setting the ::session variable here, you are referencing
it ($::session)
Add this point the error indicates that $::session is "" so this is
substituted to:

"" addImage $l_image_file

giving the 'invalid command name ""' error.

Maybe you meant ::Session::addImage instead? I did notice that this is
defined as:

body Session::addImage ...

Is body some procedure you wrote yourself?

"body" is an incr tcl command. "body Session::addImage" defines the method "addImage" for any object of class "Session"

But yes, $::session is null for whatever reason. He needs to figure out why either a) session is never set, or b) what is causing it to be set to the null string.
.



Relevant Pages

  • Re: [PHP] Keeping file pointers open after script end
    ... so that it can be access later, by passing it through session? ... Well, okay, *MAYBE* you could hack something up with execand fork ...
    (php.general)
  • Re: Festival weather - Time for a new venue.
    ... We have a few local festivals but nothing folky that lives up to the ... of Cambridge or even the Big Session. ... Well, okay, there _are_ places from which it's north-east ... ...
    (uk.music.folk)
  • Re: Damaged ie6
    ... In article, Davidsb says... ... > program itself seems okay as it suddenly came back for one ... > session and then disappeared when I rebooted. ... En dragu a sei lain ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: GPS tracking software
    ... void print_bytes(unsigned char *buf, size_t n) ... [session 3 accepted from 77.237.103.225] ... Everything will be okay ...
    (comp.lang.c)
  • httpclient
    ... I have classes that made the HTTP simulation of a browser. ... Okay, ... session of httpclient with the value of the image? ... In java achieve this with the class apache httpclient, ...
    (php.general)