Hi everyone, I'm trying to get the selected items string out of a spinner. So far I've got this:
bundle.putString(ListDbAdapter.DB_PRI, v.getText().toString());
This doesn'y work and gives a casting exception (I thought you could cast a view to a widget that inherits it... obviously not!). So how do you get the selected value of a spinner
I am loading an html page into a WebBrowser object in a VB.NET Windows Forms application. The user may make changes to textboxes, dropdowns, etc. on the HTML page displayed in the browser. I want the ability to save the current context to a .pdf file on the local HD. I am able to print using WebBrowser.Print(), which shows the current context, but what ways are possible to get this saved as a PDF file locally?
I want a class property to be reference to another class, not its object and then use this property to call the class's static methods.
class Database {
private static $log;
public static function addLog($LogClass) {
self::$log = $LogClass;
}
public static function log() {
self::$log::write(); // seems not possible to write it like this
}
}
any suggestions how i can accomplish this?
cause i have no reason making them objects, i want to use the classes for it.
Hi,
For winforms applications I'm wondering what setup code should go in:
MainForm()
as opposed to
MainForm_Load(object sender, EventArgs e)
Are there any best practise guidelines here?
Hi, does anyone know if it is possible to cast a generic type with a certain type parameter (e.g. Bar) to the same generic type with the type parameter being a base type of Bar (such as object in my case). And, if it is possible, how would it be done?
What I want to do is have a collection of Foo but be able to add Foos with more specific type arguments.
Thanks
Hello everyone,
I need to get the selected value from an ajax.net combobox throught javascript so that I can do some client side validation.
What's the best way to do this?
Thanks,
Is there a simple way to make Django render {{myform.name}} as
John Smith
instead of
<input id="id_name" name="name" value="John Smith" />
inside <form> tags? Or am I going about this the wrong way?
When using Excel Interop libraries from .NET, I can find a Range object representing the cell offset from Range X by calling something like.
Range Y = X.Range[2,3];
But what should I do to perform the inverse operation, ie: I have two Range objects, A and B, and I would like to find out by how many rows/columns B is offset from A.
Does anyone know the easiest way to do this? Is there a library function?
Thanks.
How do i explode and check if the array contains more than one value
this doesnt work
<b>{if $test->tester|explode|count>1}Vars:{else}Var:{/if}</b><br>
Hello,
I come from PHP background and am used to doing var_dump, echo and print_r while doing some kind of debugging.
I have just started on jquery, today is my first day infact and am trying to see if there is a way to dump out value to firebug console.
Do we have similar function to var_dump or echo in jQuery or any other way to get values or debug statements displayed on the console ?
I have a checkable DropDownButton and a Grid.
I want to bind Button's IsChecked parameter with grid's Visibility value.
If (Visibility == Visible) IsCheked = true
I've tried to do like that:
IsChecked="{Binding ElementName=UsersDockWindow, Path=IsVisible}"
but it didn't work, cause IsVisible is readOnly property.
This should be so simple... but something screwy is happening.
My setup looks like this:
MainViewController
Tab Bar Controller
4 tabs, each of which loads WebViewController
My AppDelegate contains an ivar, tabBarController, which is connected to the tab bar controller (this was all set up in Interface Builder). The leftmost tab is marked "selected" in IB.
Within the viewWillAppear method in WebViewController, I need to know which tab was just selected so I can load the correct URL. I do this by switching on appDelegate.tabBarController.selectedIndex.
When the app first runs and the leftmost tab is selected, selectedIndex is a large garbage value. After that, I get values from 0 to 3, which is as it should be, but they are in random order. Not only that, but each tab I touch reports a different value each time.
This app is extremely simple right now and I can't imagine what I could have done to make things go this wrong.
Has anyone seen (and hopefully solved) this behavior?
Update: we have a request for code. There's not much to see.
The tab bar controller gets loaded in applicationDidFinishLaunching:
[self.mainViewController view]; //force nib to load
[self.window addSubview:self.mainViewController.tabBarController.view]
There is currently no code whatsoever in MainViewController.m other than the synthesize and release for tabBarController.
From WebVewController.m:
- (void)viewWillAppear:(BOOL)_animation {
[super viewWillAppear:_animation];
NSURL *url;
switch([S_UIDelegate mainViewController].tabBarController.selectedIndex) {
case 0: url = [NSURL URLWithString:@"http://www.cnn.com"];
break;
case 1: url = [NSURL URLWithString:@"http://www.facebook.com"];
break;
case 2: url = [NSURL URLWithString:@"http://www.twitter.com"];
break;
case 3: url = [NSURL URLWithString:@"http://www.google.com"];
break;
default: url = [NSURL URLWithString:@"http://www.msnbc.com"];
}
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];
}
This is where I'm seeing the random values.
Hi All,
How does jvm know what class an object is an instance of at runtime. I know we can use the getClass method to get the class name but how does the getClass method work?
Thx,
Praveen.
Hi,
I want to move 500 table from Database to other with their data and constraints all the tables have column who has default value, I used SSIS using "Transfer SQL Server Object Task" and I choose to copy all tables, copy data and primary keys, it copies the table except the default bindings
I tried in SQL Server 2008 CopyAllDRIObjects Property but still the same result.
How can I copy all tables from database to other with their data and maintaining their constraints.
Sorry if this question is answered already. But I didn't find suitable answer.
I am having a string expression in C# which I need to convert to an int value or decimal anything. For example,
string strExp="10+20+30";
output should be=60.
how shall I do that???
Hi,
If there is a tool for analyzing memory leaks in a c++ COM Object, please provide a link here
If no such tool exist, what would be the best way to handle memory leaks ?
Thank You
Apparently this does not work.
WHY ???????
I don't want to do all this just to call my function:
Dim x as new Object()
x.Method()
WHY do I have to do this in 2 lines when I can in one. This is really pissing me off.
I have a java.io.Reader as the return type of my method. But i have Object type of an instance which i get from Database. So how can I convert this to Reader type and return?
need help
thanks.
Is there any difference between Convert.ToString Method and Object.ToString() in C#.net other than the how these handle null value.
There could be some difference between the two in the Globalization Perspective.
Hi,
Can any one tell me which one is better in "Session Facade Class" and "Single ton Object" design patterns in ASP.Net? Also, please state the scenarions where specific design pattern is advisable to use.
Thanks
Rupa
how i can set default value for DateTime in optional parameter?
public SomeClassInit(Guid docId, DateTime addedOn = DateTime.Now???)
{
//Init codes here
}
How can I check this:
$something = array('say' => 'bla', 'say' => 'omg');
How can I check if the $something['say'] has the value of 'bla' or 'omg'
Best Regards,