I would like to thank all of you very much for taking the time to help me with my problem! I'm sorry I didn't participate in the discussion more actively over the past few days, but I only do this job part time and I tend not to think about it when I'm not at work here.
When I got to work today, everything seemed broken. I couldn't even connect to the localhost. It turned out that on the previous day I screwed up mod_perl (because...
User Profile
Collapse
-
Thanks for your answer. I tried that, but it didn't work. Also, I'm pretty sure the right path is in INC anyway. Let's say that B.pm is located in /path/A/B.pm, then /path was already in INC so A::B should be resolvable. I added /path/A with your method, but like I said it didn't help.
By the way, I looked in the Apache error_log and it prints another module in front of the error message:
C.pm: Can't locate object method "new"...Leave a comment:
-
Thank you both very much for your answers! numberwhun: I'll be sure to check out your link sometimes.
I agree that it seems that it would seem that not the correct A::B module is accessed. However, I kind of have an idea that the code is right (so maybe I shouldn't have posted it), because the same code does work for my colleague.
The thing is: my boss decided that we needed to use some package that we can't get to work...Leave a comment:
-
Can't locate object method "new" via package "A::B"
I'm getting the following error:
Software error:
Can't locate object method "new" via package "A::B" at /path/file.cgi line 5.
My code is basically this:
And in folder A in B.pm:Code:#!/usr/bin/perl -w use strict; use warnings; use A::B; my $test = new A::B;
...Code:package A::B; use strict; use warnings; sub new { -
Pass MouseEvent to underlying layer
Basically I have the following problem:
I have a JLayeredPanel with two JPanels on it. The smaller one is on top of a larger one and both handle their own mouseevents. However, when I click in the bounding box of the smaller JPanel on top I want the click to register on the lower JPanel also as if the top JPanel weren't there .
I thought I could solve this by just having the mousePressed-function of the top JPanel call lowerJPanel.mou sePressed(event )... -
Never mind, the new problem was similar to the old one, I just didn't see it.Leave a comment:
-
Thanks again for your reply!
The solution worked for a while. I forward declared GameEngine in Player.h and then included it in Player.cpp, where I could use all of GameEngine's public methods. However, I now derived a class from Player and put it in a file called RandomPlayer.cp p. I've created no header file for this, because this class is really basic and the public interface is almost exactly the same as Player's. However, Including...Leave a comment:
-
Thank you very much for you quick reply! I had figured parts of what you said out, but your explanation was very good and I understand a lot better now.
I'm assuming though that you meant to write "class Player;" instead of "class Player.h;".
This deals with my problem very well, but now I have another (far less important question):
From your explanation, I gather that I can always use forward...Leave a comment:
-
circular include
I'm having a problem which I think has to do with the circular use of inlcuding header files.
The short version of my code would look a bit like this, I think:
GameEngine.h:
...Code:#ifndef GAME_ENGINE #define GAME_ENGINE #include "Player.h" class GameEngine { public: GameEngine (); // .. private: // .. Player*
No activity results to display
Show More
Leave a comment: