1
голосов
3ответов
323 просмотров

How to make Action<param> compatible with event's delegate type?

Given the code below: void LookupBox_Load(object sender, EventArgs e) { Action d = delegate { if (!_p.AutoClose) CloseLookupBox(); }; if (this.ParentForm.MdiParent != null) this.ParentForm.MdiParent.Deactivate += delegate { d(); }; ...

4
голосов
2ответов
16651 просмотров

How to override form action in Drupal?

I originally started this question in another thread, but that thread was sorta, kinda answered, and now I primarily want to know how to specify another form action... I tried using the code below, but the form action, when output, remains unchanged, although looking at the print_r($form), it's c...

0
голосов
1ответов
301 просмотров

Pass an ID from main swf to child swf

I have a main movie clip that loads the appropriate swfs based on the button click. The buttons and the corresponding swfs are loaded through XML. The method I adapted to achieve this can be found here : Sample Code Now, this seems to be working just fine. But, my problem is instead, of calling ...

15
голосов
3ответов
33128 просмотров

How to convert System.Linq.Enumerable.WhereListIterator<int> to List<int>?</int></int>

In the below example, how can I easily convert eventScores to List&lt;int&gt; so that I can use it as a parameter for prettyPrint? Console.WriteLine("Example of LINQ's Where:"); List&lt;int&gt; scores = new List&lt;int&gt; { 1,2,3,4,5,6,7,8 }; var evenScores = scores.Where(i =&gt; i % 2 == 0); ...

69
голосов
9ответов
31043 просмотров

How do you use Func&lt;&gt; and Action&lt;&gt; when designing applications?

All the examples I can find about Func&lt;&gt; and Action&lt;&gt; are simple as in the one below where you see how they technically work but I would like to see them used in examples where they solve problems that previously could not be solved or could be solved only in a more complex way, i.e. ...

2
голосов
2ответов
4900 просмотров

How can i know which button is clicked? Objective C

I am doing Presence1 in Assignment which require me builds a multiple screens application. I have two ViewController, vc1 and vc2. In vc1, i have two buttons. I use a same method for them and the title of them are same. My question is How can i know which button is clicked in vc1 when i change t...

1
голосов
1ответов
1331 просмотров

Mouse enter mouse leave? Expression blend (silverlight)

I'm a designer using Expression blend. Does anyone know how to use the events tab? I'm looking at a column of input fields, such as mouse enter etc. Not sure what to put in these any ideas?

1
голосов
4ответов
6901 просмотров

Output Flash Trace to Firebug Console

I am trying to output my Flash application's trace to the firebug console. After some Goggling I have found that other are doing something like this: public static function debug(text: Dynamic):Void { trace(text); ExternalInterface.call("console.log", text.toString()); ...

0
голосов
2ответов
1338 просмотров

Symfony: adding new action/view error. (Newb question)

I'm getting a 404 when trying to add a new module page. I'm apparently missing something fundamental here, being a newbie to Symfony. Can anyone point out what it is I'm missing? Many thanks. modules/admin/actions/actions.class.php /* following executeIndex() */ public function executeSched...

0
голосов
2ответов
2613 просмотров

print a jpg

I've been trying to print a dynamically loaded jpg and for some reason it's never printing to scale, not sure what I'm doing wrong so here's what I've done so far var request:URLRequest = new URLRequest(getAbsPath("pages/" + pagePrint + "_big.jpg")); var loader:Loader = new Loader(); loader.load...

1
голосов
1ответов
4370 просмотров

Action Pack Subscription License Keys - Physical vs Virtual

I've noticed on my Action Pack Subscription there are new license keys for Windows Operating Systems that are labeled Physical and Virtual. There is no documentation on the site about what the differences are for those keys. I called Microsoft and got the run around. Eventually, the MS tech ema...

0
голосов
2ответов
122 просмотров

Troubles with html-forms

index.php: &lt;form action="update_db.php" method="post"&gt; &lt;?php require_once 'modules/' . $currentModule . '.php'; ?&gt; &lt;/form&gt; modules/some_module.php ... &lt;input type="submit" /&gt; ... update_db.php: @extract( $_POST ); print_r( $_POST ); ...

2
голосов
1ответов
721 просмотров

Rails - Redundant RESTFUL Actions for map.resources? (new, create)

I was wondering why when you create restful routes in rails with map.resources it generates actions for new, create, edit, update? Is there anything wrong in declaring just one action for create and update and do something like this? def create unless post? @user = User.new else re...

0
голосов
3ответов
185 просмотров

Which is the best approach?

I have a question regarding struts. I have a HashMap which has nearly 50 entries. Now I have to define this map inside an action class, say TestAction. As you know, this action class extends the Action class. Now my doubt is fundamental: Should I load the map as static? What are the advanta...

0
голосов
3ответов
624 просмотров

Data type used in action forms

Hi can somebody explain that if i declare variables of other types (except string) in the form beans what problems I might face ?

13
голосов
3ответов
7969 просмотров

ASP.NET MVC - Current Action from controller code?

This is very similar to another recent question: How can I return the current action in an ASP.NET MVC view? However, I want to get the name of the current action from within controller code. So within the code of a function that's being called by an Action, I want to get a string of the name ...

1
голосов
4ответов
2599 просмотров

Is it possible to "transfer" an ASP.NET MVC request from one action to another?

Suppose I have the following actions: public ActionResult DoSomething() { // Some business logic return RedirectToAction("AnotherAction", RouteData.Values); } public ActionResult AnotherAction(string name, int age) { ... } And the following form: &lt;form method="post" action="DoS...

2
голосов
2ответов
3435 просмотров

C# - Is it possible to have multiple method signatures for an Action&lt;&gt;?

In C#, is it possible to have an object that has multiple method signatures for an Action&lt;&gt; or delegate? Like this: class Foo { public Action&lt;string&gt; DoSomething; public Action&lt;string, string&gt; DoSomething; } class Bar { public Bar() { Foo f1 = new Foo(...

8
голосов
4ответов
1461 просмотров

Managing Swing Actions with a Registry

Typically when I'm creating a Swing (or any UI) application, I have various Actions that appear on menu items and buttons. I usually create an action registry and store the actions in there and then when certain things occur, I disable/enable actions in the registry based on the state of the appl...

5
голосов
4ответов
2423 просмотров

ASP.NET MVC: Get an action output within another action

In ASP.NET MVC application I have an action Page() which renders a page (like a wiki page). Now, I have another action RenderPdf() which should collect the HTML output of Page() and use HTML2PDF component to create PDF version of that page. How do I collect the HTML output of one action within...

0
голосов
1ответов
526 просмотров

ASP.NET StrongTyped Controller-Action View<tview>(TModel Data)</tview>

I'm using Asp.net MVC 1 and I would really like my controller actions to use StronglyTyped View(data) calls that enforce type checking at compile time and still let me use aspx pages under the default view engine. The ViewPages I call are strongly typed, but errors in the action's call to View(d...

47
голосов
7ответов
82938 просмотров

.NET MVC Call method on different controller

Can anybody tell me how to call a method on a different controller from within an action method? I don't want to redirect. I want to call a method on a different controller that returns a string and use the response within my action method.

5
голосов
4ответов
5597 просмотров

Qt Play/Pause Action?

What's the best way to go about creating a play/pause button in Qt? Should I create one action and change it's icon when clicked, or should I create two actions and then somehow hide one when clicked? How do I use one shortcut key to activate both actions? (Pause when playing, or play when paused).

5
голосов
5ответов
721 просмотров

Sync JMenu ButtonGroups with JToolbar ButtonGroups

Imagine I'm making a simple Word Processor with Java Swing. I've got a set of Actions written to perform text justification. On the MenuBar I've got a menu: View Left Justify Center Jusitfy Right Justify This consists of JRadioButtonMenuItems and a ButtonGroup to ensure only one item is...

0
голосов
2ответов
487 просмотров

Template not found in action method after calling a library method in symfony

I'm calling a method of a library that I've created in symfony 1.2. If I don't call the library method in the action method, then the method in the action class works as it should, and it finds the template. But, if I call the library method in the action class, symfony tells me that it cannot fi...

1
голосов
1ответов
214 просмотров

ASP.NET MVC class that represents a controller+action set?

Is there a class in the ASP.NET MVC framework that represents a controller name and an action name? I'm writing a method that will return a collection of URLs and I want them to be returned as objects that contain a 'Controller' and 'Action' property or something similar. This is because someti...

1
голосов
3ответов
3081 просмотров

Java default form action or button

In HTML forms, if you press 'enter' while in a text field the form will generally submit. I'm implementing a search panel in Java Swing, and I want to include the same functionality as I think users will be expecting this. I know that it's possible to use setAction on a JTextField to accomplish...

0
голосов
1ответов
5981 просмотров

Default action on JSF pages (ie pressing enter on input fields)

A HTML page is created using JSF and facelets (xhtml). There are 2 h:forms that goes to different places. The user enters data on one form and presses the "Enter" key. Here is where it gets tricky. On IE 6 and above, either the forms action gets submitted (which usually points to the page you ar...

1
голосов
1ответов
3045 просмотров

wordpress: actions, filters &amp; hooks

I'm quite new to this (understanding the WP Guts), and I wanted to understand the Hooks and Filters better, I can't get it right from Codex. I did a simple test, the idea is to override the get_title() method in order to erase the "Protected: " sentence from the title if the page is protected,...

1
голосов
5ответов
352 просмотров

New Action Not Working

I have a standard User controller with the normal set of actions (index, show, new, edit, etc) and I'm trying to add a new action named 'profile'. I added the following code: def profile @user = User.find(session[:user_id]) end I also created a new view for the action (app/views/users/pro...