instance

get current instance of class in PHP

how do i get access to a current instance of class that's already running in PHP? in my one PHP class, I want to call a function from another that's already running as a server. so i cant create a new instance. thanks. p a ...

WSS 3.0 Cannot create list instance

I have created three features - fields, content types and lists. I deployed the solution and everything was fine. However, I deleted my list instance from the Lists section in my site. Now I cannot create it again. I tried to deploy the solution again but no instance was created. How can that be done? <ListInstance Id="2" Title="My Cont...

Printing class histogram programmaticly...

is there any way to print top used N classes on the current java application programmaticly? sample output: N=10 num #instances #bytes class name -------------------------------------- 1: 23 4723136 [I 2: 19 4718928 [J 3: 18 4718880 [D 4: 73925 1774200 java.lang.String 5: ...

My iPhone app crashes after returning from background. Cause: UIImage problem.

Hi all, First off, I want to say this site is AWESOME! and it helped me do lots of stuff while creating my iPhone app. Now, my problem is: When I launch my app, I have a UIImageView that loads an image depending on an if/else statements in -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event method. These images are assig...

how to use same UIView in tabs?

hi everybody, i have a small UIView, i fill it with some string data from net. i want to it load just once. thats why i call it in appdelegate class. CurrencyView *currView; @property (nonatomic, retain)CurrencyView *currView; in application didFinishLaunchingWithOptions: CurrencyView *view=[[CurrencyView alloc] initWithFrame:CGRect...

static properties and instances

Hi, What will happen if I create a class with a static property and create two instances of it? Will the static property will be shared between both instances and not be duplicated? Thanks, Yossi ...

How to pass arguments to stage instances in ActionScript 3?

I have an instance on my stage that I dragged from my library at design time. This instance links to a custom class who's constructor takes an argument. package { import flash.display.MovieClip; import flash.media.Sound; public class PianoKey extends MovieClip { var note:Sound; public function PianoKey...

Problem with a instance and a Dictionary.

I try to work on a Force based 2D ship game. I have Forces, that a stored in a Dictionary, for 'Jets' on a ship. So I just have to say the name, the amplitude and let the engine do the acceleration/rotation. For that I have to rotate the force into the local coordinates of the ship, before I can apply it, but instead only rotating the n...

iOS AVAudioPlayer multiple instances, multiple sounds at once

I am working on an interactive children's book for the iPad that has a "read to me" option. For each page (that has an index), theres an audio clip that produces the "read to me" feature. The feature works well, except for the fact that when I turn the page, the previous pages audio still plays, even when the new audio starts, here's my...

Python: pytz returning unusable __repr__()

I understand that repr()'s purpose is to return a string, that can be used to be evaluated as a python command and return the same object. Unfortunately, pytz does not seem to be very friendly with this function, although it should be quite easy, since pytz instances are created with a single call: import datetime, pytz now = datetime...

creating instances in objective c

Here is my code: //ECHOAppDelegate.m @implementation ECHOAppDelegate ... @end //PtyView.m @interface PtyView (PtyPrivate) -(void)startTask; -(void) didRead: (NSNotification *)fileNoty; @end @implementation PtyView ... -(void)startTask { //starts task } @end Now, how do I trigger "startTask" from ECHOAppDelegate.m? I need...

C# - Determine at runtime if property is a Type or an Object instance?

I want to determine whether MyBindingSource.DataSource is assigned to the designer-set Type, or if it has been assigned an object instance. This is my current (somewhat ugly) solution: object result = MyBindingSource.DataSource; if(result.GetType().ToString() == "System.RuntimeType") return null; return (ExpectedObjType) result; ...

How can I make an instance of a class created in one method available to another peer method?

Is there any way to be able to create multiple class objects based on how many the user wants created? I was able to do this but then that instance is only available under the method that created it public void Create() { //create class objects here } and now I wouldn't be able to use it in another method for examp...

Network Service needs to return a callback

I have a Networking service that i want to use as a Service. It's a local Service since it's not valid anymore once the application process is dead and no Other applications need to access it.(or should...). I was pondering if to use the IBinder interface with local reference to the class and decided not to, for the moment. I have the ...

Django ModelForms - 'instance' not working as expected

I have a modelform that will either create a new model or edit an existing one - this is simple and should work, but for some reason I'm getting a new instance every time. The scenario is this is the first step in an ecommerce order. The user must fill out some info describing the order (which is stored in the model). I create the model...

C++: Is it possible to call an object's function before constructor completes?

In C++, is it possible to call a function of an instance before the constructor of that instance completes? e.g. if A's constructor instantiates B and B's constructor calls one of A's functions. ...

Pooling of Stateful Session Beans

Is it possible to do instance pooling of stateful session beans.. like if a stateful bean instance is being passivated, during the execution of prepassivate() remove all the state information associated with it and send it to the pool, if a request is received from a client during the postActivate() restore the state to an instance picke...

insert string info into addressing a movieclip in as3?

I am trying to dynamically address different instances of the same movieclip by passing a string into the movieclip address, but apparently I don't know what I'm doing. I'm trying something like below: var vsTargetName:String; vsTargetName = "instance50"; vsTargetName + vsThumb.thumbHighlight.visible = true; Is something like this pos...

Accessing a class' instance variable (NSMutable Array) from another class

Hi all - new to Obj C and programming in general - learned a lot from this site and really appreciate everyone's contributions. My scenario is as follows (programming an iPhone game which explains the funny names) In my main gameLoop (which is in my view controller) if a certain condition is met I create an enemy - the cherry bomb if ...

How to share an instance of a class with many classes ?

I have a c# web service. When I get a new request I create a logging instance. I have many other instances of other classes to process the request and I want them to log as well. What is the best way to share logging instance without passing it in constructors or properties ? ...