Displaying 20 results from an estimated 4000 matches similar to: "Extending Prototype"
2006 Jul 23
1
some question about ''observer_field''
Is the observe_field (ActionView::Helpers::PrototypeHelper )
can be apply to any html tag? (such as div)
I tried to apply ''observe_field'' to observe the content of
<div> tag, but, as the observed <div>''s content was changed,
there was nothing happend.
for example (in test.rhtml):
<%= link_to_remote "test", :update=>"content1",
2006 Jun 22
5
Problems with layouts
ruby script/generate controller Tools::Search - ok
in views/layouts/application.rhtml:
<%= render_component :controller => ''tools/search'',
:action => ''searchbox'',
:params => {:context =>
''header-section''}
%>
in
2006 Jun 29
4
Multiple belongs_to
Let''s say I have a catalog with hotels. Each hotel belongs to a
category (4-star, 5-star etc.) This is it''s official category.However,
there is also a category that users assign and a category that
"independent reviewers" assign. So I have this:
hotels {
id,
category_id,
reviewer_category,
user_category
}
categories {
id,
name
}
class Hotel <
2006 Jan 11
0
RE: extending the Element.prototype to provideasetAttributes function
No problem, also check out bindAsEventListener for attaching functions
to element events, still maintaining your object as the "this" in the
event handler scope at the same time having access to the originating
"event" object.
In case you haven''t found this resource yet:
http://www.sergiopereira.com/articles/prototype.js.html
-----Original Message-----
From:
2007 Aug 29
0
Element.addMethods vs extending prototype.
Hi.
I''m using prototype.js V1.6.0_rc0.
I''ve successfully used Element.addMethods() to add some additional
functionality to my forms ... Element.addMethods(''FORM'', { ... });
So far so good.
I now want to add a new property to all forms.
Is there an equivalent Element.addProperty(''FORM'', { ... }); technique
I could use?
As readAttribute /
2006 Jan 11
2
extending the Element.prototype to provide a setAttributes function
Hi folks, I''m pretty new to javascript and prototype, so I just want to get
some peer-review on a function I wrote that makes a handy (at least, it seems
handy) way to set a group of attributes on an element easily.
Object.extend(Element.prototype, {
setAttributes: function(attrs) {
var el = this;
$H(attrs).each( function(attr) {
el.setAttribute(attr[0], attr[1]);
2006 Jan 11
2
RE: extending the Element.prototype to provide asetAttributes function
No comment on the usefulness of your function, as I''ve yet to try it.
But for the "this" scope problem, try this... (removed your var and
added the bind(this) after the function declaration. I didn''t test it
though so you might want to give it whirl. It might introduce a
different scope problem with the "attr" var but I think it should work.
2006 Mar 09
2
extending an existing DOM object in a prototype way
I want to take an existing DOM object and extend it with some
functionality. I know there''s a way to do this with prototype.
Unfortunately, I''m not entirely sure how to do this.
Basically, I want to take an existing DOM object and turn it into a
''widget'' by adding some functionality.
say we have a span:
<span id="blah">some text
2005 Dec 16
6
extending prototype''s classes
Hi, I''m relatively new to javascript programming, and OOP in general, so
please be nice to me ;)
My question is:
I''d like to extend the Form class in prototype to have a Disable function that
will disable all of the fields in a form.
I''ve already written a function to do this, but I''d like to include it in my
own library so I can access it easily and also
2009 Aug 31
3
Getting this error
HI friends,
After updating ruby 1.8 to ruby1.9.1.......& on firing script/server to
start a server,
I am getting the following errror.....
/home/HUNT/WEBlog/config/boot.rb:86:in `load_rubygems'': undefined method
`>='' for nil:NilClass (NoMethodError)
from /home/HUNT/WEBlog/config/boot.rb:52:in `load_initializer''
from /home/HUNT/WEBlog/config/boot.rb:38:in
2012 Dec 07
0
Workarounds/solutions to Rd file name conflict when extending a S4 method of some other package
Dear list,
this is a re-post of my post to r-help on 2012-30-11. Duncan Murdoch did
provide a great pointer to a possible workaround, but I'm still eager to
check out other ways. So I hope it's okay to get this out on r-devel now
as well:
// IN SHORT //
What are possible workarounds to "consolidate" documentation for S4
methods that are scattered across different packages
2008 Nov 16
1
Changing values (factors) does not change levels of that value?!
Hello,
* I read in a server weblog with read.table.
-> OK.
* I look for the downloaded-size-values (filesize of the download)
-> OK
* I found "-" and wanted to substitute them with "0" and
used: weblog$V8[ weblog$V8 == "-" ] <- 0
-> OK
* checked the contents on "-" vs. "0" and found all "-" substituted by
2012 Nov 30
1
Workarounds to Rd file name conflict when extending a S4 method of some other package
Dear list,
// IN SHORT //
What are possible workarounds to "consolidate" documentation for S4
methods that are scattered across different packages (generic and some
custom methods in one package, additional custom methods in another
package) in a *single* Rd help file while using package 'roxygen2' to
generate the actual Rd files?
// ADDITIONAL INFORMATION //
First of, here
2006 Jun 25
7
Unicode HOWTO?
I am disappointed about the (seeming) lack of Unicode support in Rails.
Is there a howto about working the most important limitations? For
example, figuring out the length of an entered word: "???".length() will
return 6, not 3. So if there is a maximum number of characters a user is
allowed to enter, this won''t work as it should -- it treats strings as
byte arrays instead
2008 Dec 20
2
NA, where no NA should (could!) be!
Hello,
again I'm on my weblog-script... having problems...
This code:
===========================
weblog <- read_weblog("web.log")
weblog_by_date <- split(weblog, weblog$date)
#for ( i in names(weblog_by_day) ) { print(i); print(weblog_by_day$i) }
for ( datum in names(weblog_by_date) )
{
print(datum)
selected <- weblog_by_date[[datum]]
res_size_by_host <-
2007 Jul 09
0
Planet R - a weblog aggregator for statistical computing
Announcing...
Planet R - a weblog aggregator for statistical computing
Q: What is it?
A: An aggregator for weblog posts about statistical computing topics,
focused primarily around the R community.
Q2: Where is it?
A2: For now, at http://planetr.stderr.org
Q3: What's it good for?
A3: Hopefully, collecting resources and weblog posts from people who might
otherwise not know about
2007 Jul 09
0
Planet R - a weblog aggregator for statistical computing
Announcing...
Planet R - a weblog aggregator for statistical computing
Q: What is it?
A: An aggregator for weblog posts about statistical computing topics,
focused primarily around the R community.
Q2: Where is it?
A2: For now, at http://planetr.stderr.org
Q3: What's it good for?
A3: Hopefully, collecting resources and weblog posts from people who might
otherwise not know about
2006 May 26
10
ROR website''s weblog not viewable on internet explorer
Does anyone know why the weblog at http://weblog.rubyonrails.org/ is
often messed up, with the first or first and second topics left-shifted
and melded with the Rails logo, the Live Search box and the page''s menu?
This happens on all my boxes that run Internet Explorer 6 (IE6). I
checked it on Firefox and the page appears correctly. While it''s easy
to argue "just use
2005 Oct 03
0
[ANNOUNCE] developer journals / planet.netfilter.org
Hi!
1) planet.netfilter.org
As some of you have already noticed, the link bar on the top of the
netfilter homepage has now one additional link: "planet".
http://planet.netfilter.org/ is a aggregator for RSS feeds of the
blogs/diaries/journals[1] of developers related to the netfilter project.
The idea is that there is one aggregated source where interested people
can stay in touch
2008 Dec 20
1
How to do indexing after splitting my data-frame?
Hello,
after splitting a data-frame I want to access the results.
Maybe the problem is, that the factor/index is a string...
...or do I miss knowing details of the index-uasge?
Please look and help:
=======================================
> weblog <- read_weblog("web.log")
>
>
> str(weblog)
'data.frame': 2247 obs. of 18 variables:
$ host : Factor w/ 77