A child class can access protected functions in parent class,but the parent class can't access protected functions in child class.
I'd like to keep both classes as private as possible.The parent class is a form and only once instance is used.All functions in the child class are static,it inherits from the parent class.
How is it possib...
How do i get all classes within a package?
...
I have 2 Forms (Form1 and Form2) and a class (Class1). Form1 contains a button (Button1) and Form2 contains a RichTextBox (textBox1) When I press Button1 on Form1, I want the method (DoSomethingWithText) to be called. I keep getting "NullReferenceException - Object reference not set to an instance of an object". Here is a code example:...
Well,I have a parent class with a nested class declared in the "protected" tab with a protected class variable.In another unit I have a child class,which inherits from the parent class.When I try to access something protected/public from the parent class -it works,but when I try to access something protected from the nested class,it does...
How to use Class Dictionary in java ?
...
I'm very new with c#, and was previously attempting to ignore classes and build my small program structurally more similar to PHP. After reaching a road block, I'm trying to start over and approach the problem properly OO. I'm taking a long file, and in a loop, every time certain conditions are met, I want to make a new object. How can I...
I have a php page that calls and runs a method called pagestart() in a class called construct. Later in that same page I call a different method in a different class. If that different method errors for any reason I would like to have it call the error() function in the construct class.
My question is is there a way to call the error() ...
Hello,
I am pretty new to Python world and trying to learn it.
This is what I am trying to achieve: I want to create a Car class, its constructor checks for the input to set the object carName as the input. I try to do this by using the java logic but I seem to fail :)
class Car():
carName = "" #how can I define a non assigned vari...
How can I count the number of objects of a class type within a method of that class? For that matter, how to do it outside of a class without adding the objects to a list?
I should have thought of that! Thanks! I'm gonna leave it unanswered for a little while to see if there is a better way, because I agree. I'm just sortv wrapping my h...
I want to make a program that parses an XML file and then updates labels on 2 different tab bar views. On both of these views, I have a refresh button to update the results. What I'd like to do is update both of the views labels from either view. I figure the AppDelegate is probably a good choice to make this happen, but I tried creat...
Hello everyone,
I am using VSTS 2008 + C# + .Net 2.0 to develop Windows Forms application. I found by default, the new Form we created will be marked as public partial.
My concern is whether expose class as public has any security risks? Should we mark it as private? Any impact for functionality if we mark it as private?
BTW: I met wi...
I am trying to create a rollover effect with jQUery. I have similar things, however because I am trying to do a mouseover with a an object that has a link in it I am having problems.
I have a level-2 nav bar. The placeholder's are table cells (bad I know - but it's already done this way). I want to change the background from white (#FFF...
Hi everyone, I was just wondering if any one knew a function to remove ALL classes from a string in php.. Basically I only want
<p>
tags rather than
<p class="...">
If that makes sense :)
...
I want to let users test out a PHP class of mine, that among other things crops and resizes images.
I want them to write PHP code in a text field, send the form, and then their code will be run. How can I do this?
Or is it other safe ways to let users (anyone) demo a PHP class?
...
I am new to C#, C++ and .Net.
I am currently returning to programming from a stint in Networking and Cisco engineering. I used to program on IBM mainframes etc using Cobol, assembler, easytrieve, Rexx and clist etc so the command syntax is reasonably familiar to me as are programming standards and structures.
However I am having quite ...
Hello,
my question is actually
What kind off structure would I use to send xml as part off a REST service if I have most off the logic in a class. I call/include the class at the top off my php index page if it becomes clear a service is being requested.
Someone mentioned to me that a class method should not output anything.
Then wher...
Lets pretend you have a 3 Gb jar file and your application only uses a small class within it. Does the JVM load the whole jar file into memory or does it read the Table of Contents and load only the pieces it needs? Is this behavior controllable?
...
I want to pass Value from Constructor in my Main Class to another Class.
Main Class:
public function Main() {
Snap.locationX = 350;
}
Another Class:
public function get locationX():Number{
return _value;
}
public function set locationX(x:Number):void{
_value = x;
}
It returns 1061: Call to a poss...
I'm trying my hand at some iPhone programming and I've run across something that may be fairly obvious to veterans but I'm not exactly sure why it's happening. I have two UIViewController classes, and I want to access a method from the other class. I have two NSObject classes associated with both of them in IB (with the Class file as U...
So I'm a bit rusty getting back into programming and I can't seem to find a good reference for understanding the structure for what I am trying to achieve. So, without further ado I am looking at creating and Class object such as.
#import Assets.h
@interface MainRecord: NSObject {
Assets* assets;
...
}
...
@end
Having a class...