Hi,
I want to call a method on an object which I get through [self delegate]. I know which class it is so I can import the class and call it normally but I could also use performSelector: which doesn't require importing my class. I do not need to pass a parameter to the method. And yes, I did read this. Which one is preferable in this c...
I have this constructor;
public UmlDiagramEntity(ReportElement reportElement, int pageIndex, Controller controller) {
super(reportElement.getX1(), reportElement.getY1(), reportElement.getX2(), reportElement.getY2());
setLayout(null);
this.pageIndex = pageIndex;
this.controller = controller;
reportElements = reportEl...
Very similar to this post
How can I declare template array as a parameter in templated function?
Something like this code:
template <unsigned i> void my_func (char (&a)[i]); //yes, I do need that reference
...
I'm trying to write some abstract code for searching through a list of similar objects for the first one whose attributes match specific values. In order to do this, I need to call a bunch of accessor methods and check all their values one by one. I'd like to use an abstraction like this:
sub verify_attribute {
my ($object, $attribu...
In Javascript, we can call methods on string literals directly without enclosing it within round brackets. But not for other types such as numbers, or functions. It is a syntax error, but is there a reason as to why the Javascript lexer needs these other types to be enclosed in round brackets?
For example, if we extend Number, String, a...
I have a class MyClass which is templated on typename T. But inside, I want a method which is templated on another type TT (which is unrelated to T).
After reading/tinkering, I found the following notation:
template <typename T>
class MyClass
{
public :
template<typename TT>
void MyMethod(const TT & param) ;
} ;
For st...
Hi,
We've got a .NET client calling a Java WebService hosted on Glassfish. Sometimes, for no clear reason, we get the error stated above. It appears that the first letter of the method ("P" of "POST") is dropped somehow.
This is not consistent though, so we have no idea how to reproduce it.
The communication is done over SSL.
Any id...
Ok, This has been explained a few times (I got most of the way there using this post on SO), but I am missing something. I am able to compile cleanly, and able to set the delegate as well as call methods from the delegate, but I'm getting a warning on build:
No definition of protocol 'DetailViewControllerDelegate' is found
I have a De...
Hello World,
I have an assignment and i got a library including an interface class. [InfoItem]
I implement this class [Item].
Now i am required to write a method watchProgram(InfoItem item) [other class, importing InfoItem], which (as shown) requires an
InfoItem.
The passed parameter item has a variable 'Recorded' [boolean] which i w...
I have a method which I created that appends some new text to a UILabel. I've tried two ways of doing this (one is commented out) but both of them only update the label the first time. Any more calls to this method do not update the label.
- (void) updateLog: (NSString*) text
{
/*
NSMutableString *newText = [logLabel.text muta...
How do I get around Inconsistant accessibilty error in C # ?
I need to pass a pointer to a node in a linked list to a method.
When I do, I get a "Compiler Error CS0051"
Example
The following sample generates CS0051:
// CS0051.cs
public class A
{
// Try making B public since F is public
// B is implicitly private here
class B
...
Hello All,
I am doing small Project in JSF richfaces.
I have specified getter and setter methods for member variables...
Mbean created for the same. The Constructor getting called but all other methods which i have specified is not calling.
i have specified bean in faces-config also
please help me out
Thanks,
Jungle_Hacker
...
Hello.
I have created a simple method to check if an image has been approved and finally returns it as an control. But how do i call and show it on the page? I've tried something like this in the aspx-file:
<% SendImage("DKBygMiniLogo.gif", "True"); %>
Here is the simple method:
protected Image SendImage(object Image, object Approve...
How can I check for a boolean to change state over a given period of time, and if a change is made over that time period perform a method?
Can any help please be given in Java.
Thanks.
...
I'm a VB.Net guy. (because I have to be, because the person who signs my check says so. :P) I grew up in Java and I don't generally struggle to read or write in C# when I get the chance. I came across some syntax today that I have never seen, and that I can't seem to figure out.
In the following method declaration, what does < T > re...
I wrote my method: LangChange
type
MainForm = partial class(System.Windows.Forms.Form)
private
...
method LangChange();
protected
method Dispose(disposing: Boolean); override;
public
constructor;
end;
implementation
...
method LangChange();
begin
...
end;
However,I have an error
Error 1 (PE33...
Python's list type has an index(x) method. It takes a single parameter x, and returns the (integer) index of the first item in the list that has the value x.
Basically, I need to invert the index(x) method. I need to get the index of the first value in a list that does NOT have the value x. I would probably be able to even just use a fu...
I'm using this rule:
RewriteRule ^(.*)$ public/$1 [L]
and in public folder I use:
$url = $_GET['url'];
when I try to acess something on url using slash or it works fine and I get:
/cities/display/45 => Array ( [0] => cities [1] => display [2] => 45)
But when I try to submit a form, i'm not able to acces the data:
/...
I have two models (say A and B) which are independent and have independent methods. I want to add some methods that operate on both models though.
for example, addX() will create an object from both models A and B.
What's the best way to structure code in this situation, since it doesnt make sense to have the method belong to either o...
Do interfaces have properties or only methods?
Thanks
...