How would one switch a public bool to true from a child form in a mdi type program?
I have a child form called logon that if everything checks out i want to set a "authenticated" bool to true in the form1 (main) form
...
This might be a really dumb question but I'm learning .NET, so I'm quite clueless...
Let's say I have two files default.aspx and the associated default.aspx.cs.
default.aspx.cs:
protected void Page_Load(object sender, EventArgs e)
{
var myObject = new MyObject();
}
Is there a way that in the default....
I've just started learning Jquery but the examples aren't helping me much...
Now whats happening with the following code is that I have 4 forms that I switch between using a link for each. But what I can't figure out is how to get variable "postOptionSelected" in the first function to pass to the other functions to display even more use...
hi everyone, i was blocked by a coldfusion problem, any suggestions are appreciated. now lemme decribe my problem.
i have an Application.cfc in my website root, the content in it is as follows:
<cfcomponent output="false">
<cffunction name="onRequest" returnType="void">
<cfargument name="thePage" type="string" required="true...
This question is a furtherance of the one asked in this thread.
Using the following class definitions:
template <class T>
class Foo {
public:
Foo (const foo_arg_t foo_arg) : _foo_arg(foo_arg)
{
/* do something for foo */
}
T Foo_T; // either a TypeA or a TypeB - TBD
foo_arg_t _foo_arg;
};
template <...
If I declare local variables in a partial and then render the partial from another erb template, will the latter also have accces to those local variables?
...
In Javascript OO, when should I use the this keyword?
Also, if I want to call a method of a class from another method of the same class, should I use this or just the name of the function? E.g is this correct?
function Foo()
{
this.bar= function()
{
alert('bar');
}
this.baz= function()
{
this.bar(); //should ...
I often write functions that need to see other objects in my environment. For example:
> a <- 3
> b <- 3
> x <- 1:5
> fn1 <- function(x,a,b) a+b+x
> fn2 <- function(x) a+b+x
> fn1(x,a,b)
[1] 7 8 9 10 11
> fn2(x)
[1] 7 8 9 10 11
As expected, both these functions are identical because fn2 can "see" a and b when it executes. But ...
How to pass current scope variables and functions to the anonymous function in plain Javascript or in jQuery (if it's specific for frameworks).
For example:
jQuery.extend({
someFunction: function(onSomeEvent) {
var variable = 'some text'
onSomeEvent.apply(this); // how to pass current scope variables/functions to this functi...
Hi,
I'm currently developping my first iPhone application and I would like to know what is the best way to share an object which is gonna be used in every controller.
I was thinking of referencing the controller containing the needed data in other controllers and access this data thanks to properties, is that a good idea or is there a ...
I have a JavaScript object that looks like the following:
venue = function(map, dataSet) {
// set some constants
this.VENUE_ID = 0;
this.VENUE_NAME = 1;
this.VENUE_CITY = 2;
this.filterBy = function(field, value) {
...
var filterValue = 'parent.VENUE_' + field;
}
}
Now, the problem is that I ne...
I am having some trouble with the classic javascript local variable scope topic, but dealing with a JSON variable. I have looked at other questions here regarding the same thing, but nothing has matched my case exactly, so here goes. I have a class that I have made from javascript that has 3 methods: func1, func2, and func3. I also ha...
Hi
I'm not massively experienced with JavaScript and I'm having trouble with variable scope and jquery. I have the following structure:
function pass_variables()
{
username = "efcjoe"
response = post_variables(username)
alert(response)
}
function post_variables(username)
{
$.post(
'/path/to/url/',
{
...
I have a foreach loop that cycles through a list of types and creates an instance of each one. However, when I build, it gives a CS0246 error ("The type or namespace could not be found ... "). Here's a simplified version of the code:
internal static class TypeManager
{
internal static void LoadTypes()
{
// Fill the lis...
I'm using the facebooker gem which creates a variable called facebook_session in the controller scope (meaning when I can call facebook_session.user.name from the userscontroller section its okay). However when I'm rewriting the full_name function (located in my model) i can't access the facebook_session variable.
...
Hi,
I have written an application with a draggable annotation which I have added on top of a MKMapView. I've added a CLLocationCoordinate2D variable called myloc in my main view controller to store the coordinate (lat,lng) values whenever I drag the annotation. My question is how do I update the myloc property value in the super parent ...
I have a public variable "testStr" in my applications main form. I have a tabControl which adds tabs loaded with user controls. How can I reference "testStr" from these user controls? I would imagine its either Application.* or parentForm.* ... but everything I'm trying isnt working, not really sure how to do it and I'm a bit new to .net...
Why Java, C and C++ (maybe other languages also) do not allow more than one type on for-loop variables? For example:
for (int i = 0; i < 15; i++)
in this case we have a loop variable i, which is the loop counter.
But I may want to have another variable which scope is limited to the loop, not to each iteration. For example:
for (int ...
Does anyone know how to update a property value from the subview (child) view controller?
I have a int property called statusid defined with gettor/settor in parent view controller.
[self.view addSubview:detailsVC.view];
In the child subview, I trying calling [super statusid:updatedValue]; to update statusid to a new value, but this cre...
Why is the following code prints "xxY"? Shouldn't local variables live in the scope of whole function? Can I use such behavior or this will be changed in future C++ standard?
I thought that according to C++ Standard 3.3.2 "A name declared in a block is local to that block. Its potential scope begins at its point of declaration and ends ...