object "loses values" when other object created

Discussion in 'Perl Misc' started by cisono, Jul 29, 2005.

  1. cisono

    cisono Guest

    Hi,

    Can anyone shed some light on this?!?!

    I have created object 1 of class X. This object gets passed to a
    method. At first, everything is OK.

    However, as soon as I create another object (object 2) of class X (in
    that same method):
    - all the fields in object 1 "lose their values".
    - object 1 still knows that it is an object of class X

    Any idea why this would happen?

    - Of course, the two objects have different variable names... (!)
    - The class itself is declared in their own .pm file and it is properly
    blessed (as far as I can tell).

    cisono.
     
    cisono, Jul 29, 2005
    #1
    1. Advertising

  2. cisono

    Paul Lalli Guest

    cisono wrote:
    > I have created object 1 of class X. This object gets passed to a
    > method. At first, everything is OK.
    >
    > However, as soon as I create another object (object 2) of class X (in
    > that same method):
    > - all the fields in object 1 "lose their values".
    > - object 1 still knows that it is an object of class X
    >
    > Any idea why this would happen?


    Yes. You did something wrong.

    However, since you provided absolutely no code for us to examine, it is
    wholly impossible to determine *what* you did wrong. A completely
    random *guess* is that your issue has to do with not properly scoping
    the variables in your module.

    Please read the posting guidelines for this group, and then follow the
    adivce contained therein; specifically, post a short-but-complete
    script that illustrates your problem.

    Paul Lalli
     
    Paul Lalli, Jul 29, 2005
    #2
    1. Advertising

  3. cisono

    cisono Guest

    No need to lecture.
    Thanks anyway
     
    cisono, Jul 29, 2005
    #3
  4. cisono

    Paul Lalli Guest

    cisono wrote:
    > No need to lecture.


    Clearly, there is a need, as you still obviously haven't read the
    posting guidelines and still haven't provided anyone with any
    information that could help them help you.

    > Thanks anyway


    You're quite welcome.

    Paul Lalli
     
    Paul Lalli, Jul 29, 2005
    #4
  5. cisono

    cisono Guest

    At the time, I could not post the whole script or easily reduce it to a
    small number of lines that would still recreate the problem.

    If you really want to remind people of the guidelines, you should
    provide a link.
     
    cisono, Jul 29, 2005
    #5
  6. cisono <> wrote:

    > No need to lecture.



    Just because you haven't seen the need does not mean that it does not exist.

    People that persist in posting without context risk getting killfiled.

    Listening to the lecture would have helped you to avoid such a fate.


    > Thanks anyway



    But it didn't work.

    So long!


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Jul 29, 2005
    #6
  7. cisono

    Paul Lalli Guest

    cisono wrote:
    > At the time, I could not post the whole script or easily reduce it to a
    > small number of lines that would still recreate the problem.


    If *you* couldn't put that tiny amount of effort into debugging your
    problem, exactly how could you expect anyone else to be able to divine
    both what you did wrong and how to fix it? You gave us *nothing* to
    work with.

    > If you really want to remind people of the guidelines, you should
    > provide a link.


    Yeah, definately. Because as you've already proven, you are far too
    lazy to actually type the word "guidelines" into the Google Groups
    search box. I know that you are far too lazy because you have again
    shown your failure to read the guidelines, by continuing not to quote
    any context in your replies.

    I'm done trying to get you to help yourself. Fare well.

    Paul Lalli
     
    Paul Lalli, Jul 29, 2005
    #7
  8. cisono

    cisono Guest

    Actually, it did work.
     
    cisono, Jul 29, 2005
    #8
  9. cisono

    Ian Wilson Guest

    cisono wrote:
    > Actually, it did work.
    >


    If it (the lecture or your reading of it) had worked, surely neither
    Paul nor Tad would have killfiled you and your reply might have looked
    as follows instead:

    -----------------------------------------------------------------------
    Tad McClellan wrote:
    > cisono wrote:
    >> Paul Lalli wrote:
    >>> cisono wrote:
    >>>>
    >>>> [snip: vague description of a problem]
    >>>
    >>> since you provided absolutely no code for us to examine,
    >>> it is wholly impossible to determine *what* you did wrong
    >>> Please read the posting guidelines for this group

    >>
    >> No need to lecture

    >
    > Listening to the lecture would have helped you <avoid being killfiled>
    > but it <the lecture> didn't work.


    Actually, it did work.
    -----------------------------------------------------------------------

    It didn't work: you didn't learn how to use newsgroups effectively and
    consequently you got killfiled by the people most able to help.
     
    Ian Wilson, Jul 29, 2005
    #9
  10. cisono <> wrote:

    > Actually, it did work.



    What did?


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Jul 29, 2005
    #10
  11. "cisono" <> wrote in
    news::

    > At the time, I could not post the whole script or easily reduce it to
    > a small number of lines that would still recreate the problem.
    >
    > If you really want to remind people of the guidelines, you should
    > provide a link.


    I know this is old, but I'll take the bait anyway:

    Locating the comp.lang.perl.misc guidelines is as simple as typing

    comp.lang.perl.misc guidelines

    in the Google search box.

    If you are a newcomer, please note that, in general, no one will be
    willing to put any effort into helping you if you have not put any
    effort into helping others help you.

    Just FYI.

    Sinan

    --
    A. Sinan Unur <>
    (reverse each component and remove .invalid for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, Aug 27, 2005
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Phillips

    Disabled Panel control loses values

    Robert Phillips, Apr 28, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    728
    Martin Dechev
    Apr 28, 2004
  2. Bryan Ax
    Replies:
    5
    Views:
    1,590
    Bryan Ax
    Jun 2, 2004
  3. Roger R. Smith

    ASP.NET DropDownLost loses values on PostBack

    Roger R. Smith, Aug 18, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    528
    Roger R. Smith
    Aug 18, 2004
  4. Mark Broadbent

    textbox loses values

    Mark Broadbent, Jan 12, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    564
    Mark Broadbent
    Jan 14, 2005
  5. Janaka

    Listbox loses values

    Janaka, Feb 14, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    4,887
    Janaka
    Feb 15, 2005
Loading...

Share This Page