Filed Under (Ruby) by manatarms on 19-03-2008
When I tried to compile Ruby Shoes I got the following error:
1
2
3
4
5
6
7
8
| CC shoes/app.c
In file included from /usr/include/signal.h:333,
from /usr/include/sys/ucontext.h:23,
from /usr/include/ucontext.h:27,
from /usr/lib/ruby/1.8/i486-linux/node.h:378,
from shoes/app.c:11:
/usr/include/bits/sigcontext.h:28:29: error: asm/sigcontext.h: No such file or directory
make: *** [shoes/app.o] Error 1 |
The fix is this:
1
2
| cd /usr/include/
sudo ln -s asm-i386/ asm |
Filed Under (Web Development) by manatarms on 07-03-2008
I have now come across a few situations where using nested forms in ASP .NET causes problems. The typical error produced in this case is a ‘Invalid postback or callback argument’ error. This occurs because ASP .NET allows the rendering of multiple, nested forms but fails to validate the forms when a postback occurs. Thus when ASP .NET recognizes nested forms in a page, it marks the page as not valid (Page.IsValid returns false).
The reason that this error occurs is because multiple, nested forms cannot reside on a single aspx page .
The solution is very simple: The submit button for the user created form must contain the following attribute: onclick=”this.form.submit();”. A recent example I came across is below. The basic form that was developed and placed inside an aspx page as a nested form was as follows (only the beginning and ending of this form is shown. The content is not necessary or relevant):
1
2
3
4
5
6
7
8
9
10
11
12
| <form accept-charset="UTF-8" action="http://www.response-o-matic.com/mail.php" method="post" enctype="multipart/form-data">
<table>
<tbody>
...
<tr>
<td colspan="2" align="center">
<input value="Submit Form" type="submit" />
</td>
</tr>
</tbody>
</table>
</form> |
The following code demonstrates the proper way of entering this form so that nested forms will work. Please note that I reiterated all of the attributes (action, method, enctype, etc…) of the form in the JavaScript call.
1
2
3
4
5
6
7
8
9
10
11
12
| <form accept-charset="UTF-8" action="http://www.response-o-matic.com/mail.php" method="post" enctype="multipart/form-data">
<table>
<tbody>
...
<tr>
<td>
<input onclick="this.form.action='http://www.response-o-matic.com/mail.php'; this.form.method='post';this.form.enctype='multipart/form-data';this.form.submit();" value=" Submit Form " type="submit" />
</td>
</tr>
</tbody>
</table>
</form> |