class

How to pass a reference of a movieClip made in one class to another?

Hello friendly Flashers... I have a movieClip with a button that I created inside of my display class Thumbnail.as and I have a button function that interacts with it inside of my ui class ThumbnailController.as. The current problem I'm having is that; in my ui class I can't target the movieClip playGlow which was created inside of m...

Class with just Shared functions - Why is it bad?

Hi, I have a class called MembershipHelper, which I am using in my ASP.NET project. It looks like this: Public Class MembershipHelper Public Shared Function IsMultiStoreUser() As Boolean return Roles.IsUserInRole(....) End Function Public Shared Function IsAdmin() As Boolean return Roles.IsUserInRole(....) ...

Determine whether .class file was compiled with debug info?

How can I determine for any Java .class file if that was compiled with debug info or not? How can I tell exactly what -g{source|lines|vars} option was used? ...

Friend class and all its descendants

Hello, suppose that I have a class A with several subclasses (B, C, and D). I need B C and D to access some protected members from a class E. Is it possible to make B, C and D friends of E in a single hit without having to list them all? I have tried with: class E { friend class A; ... }; But this doesn't work. Thank you...

Extending the IndexController with a BaseController in Zend

I'm trying to extend my controllers with a global base controller as such: class BaseController extends Zend_Controller_Action { // common controller actions public function listAction() { // do stuff } } class IndexController extends BaseController { // index controller specific actions } class LoginController exten...

Creating two different types of Users (Scala, Lift)

Hi all- I am creating a website which will need two types of users: students and providers. In a traditional java setting I would create a user class (or interface) and then create two classes which inherited from the user. Is this the best course in scala too, using the "extends" and "with" modifiers? If that is indeed the best way ...

WordPress: How can I add extra classes via variables when using body_class()?

Hi, I am trying to add some dynamically (based on the URI) created class names into the standard body_class() statement. The wordpress codex mentions to put the class into the brackets while using the body_class('add-class-here') however I have 2 variables that I need to echo out inside the body class="" so I tried doing it as follows...

Java: How do you access a sub-object of an object with no "getXXX" method to that sub-object

I'll explain with pictures from Eclipse Debugger I have an Class called "FieldContext", (I can't edit it, it's compiled in the Java OVal API) Within "FieldContext" on the eclipse variable tab are "CompileTimeType" and "field" Q1 Is there a legend for the icons in the variables tab? like what the red box with the "F" means + yellow d...

Declaring a non static const array as class member

How can we declare a non static const array as an attribute to class. Following code produces compilation error (“'Test::x' : member could not be initialized”)? class Test { public: const int x[10]; public: Test() { } }; ...

Changing class variables by means of a second and third class

I'm working on a personal project and at the same time experimenting with it. I've got 3 classes contained in 3 files: Calculate.java, Geometry.java, and Test.java. Geometry.java so far only contains some variables I want to work with, the get/set methods along with a constructor method. package project; public class Geometry { ...

Pseudo selectors after a class selector?

I've got a class .text2{ font-size: 1.2em; color: #473f37; padding-bottom: 0.3em; } I want text of links to appear white within this class, how do I do it? <div class="text2"> <a href="notice">Notices</a> </div> I tried the below and it not working .text2 a:link{ color: white; } ...

scala case classes questions

Hi, I have two questions regarding the '::' case class. :: can be used as case head :: tail => ... How does it work? Meaning, what is exactly the flow that Scala uses to match a List instance with the :: case class? Given that I have a class MyClass, with operator op, can I create a case class named op that I can use as: case foo o...

How do you know when two objects can communicate?

class GuiMaker(Frame): #more code def __init__(self, parent=None): Frame.__init__(self, parent) self.pack(expand=YES, fill=BOTH) # make frame stretchable self.start() # for subclass: set menu/toolBar self.makeMenuBar() # done here: build menu-...

Organizing Classes in PHP

Suppose I've the following classes in my project: class Is // validation class class Math // number manipulation class Now, if I want to validate a given number for primality where would be the logical place to insert my Prime() method? I can think of the following options: Is_Math::Prime() Math_Is::Prime() ...

Header class file to be used by others

Hi, I would like to know if there is a way to put only protected and public stuff on the header file .h, and all private stuff in the compile unit .cpp I need this because the library is going to be used by others, and I wouldn't like to have to copy and edit all .h files to remove private declarations and implementations. I tried but g...

(Python) Passing a threading.Thread object through a function?

I have a timer function: # This is a class that schedules tasks. It will call it's ring() funtion # when the timer starts, and call it's running() function when within the # time limit, and call it's over() function when the time is up. # This class uses SYSTEM time. import time, threading import settings from object import Object c...

How to refer to a static constant member variable in PHP

I have a class with member variables. What is the syntax in PHP to access the member variables from within the class when the class is being called from a static context? Basically I want to call a class method (but not create a new object), but when the class method is called, I want a handful of static constant variables to be initia...

Interfaces - Is This Overkill?

This is a pretty basic OO question but I'm curious if I've been going overboard. Let's assume the following hierarchy, which is an example along the lines of what I would typically create: IVehicle - IFlyable - IPlane - Plane - IHelicopter - Helicopter - IDrivable - ICar - Car -...

Temporary Storing data entered in steps in class in asp.net

how can i store different data enetered using multiple steps? Its 4-5 step procedure, user can go through each step & at the final submission i want to store it in database. I want to create class to store this data & store the data in object of that class & use it from session. I just want to know what type should i use to store multipl...

If statement using a class within a repeater

Hello All, I am using c#.net I have a repeater and a ObjectDataSource (ObjectDataSource is created within the code behind). Within the repeater are two buttons (edit/delete). I need to system to either hide/remove these buttons if the user doesn’t have permissions to edit/delete. Repeater Code <ItemTemplate> ...