Displaying 20 results from an estimated 4000 matches similar to: "Map select value or other to same attribute"
2006 Jan 16
42
Linux Suggestions
I''m fairly new to Ruby & Rails and I come from a stricly M$ background. I''m
trying to move into the world of open source, but I don''t have a good roadmap.
I''m starting to develop a Rails-based product and I want to have the option to
distribute it to non-hosted customers. So I''ve said all that to say this... I
want to learn how to setup linux and
2006 Feb 22
1
MLS Integration
Does anyone know of a good resource on doing MLS (Multiple Listing Service)
integration with Rails? My searches don''t seem to be turning up much information
and I need to get a quick handle on what''s involved in this process.
Many thanks!
2006 Jan 13
2
file_column in session
is it possible to store a field of type file_column in the session?
Rails crashes on me every time i try to do something like the
following:
@session[:newpost] = @params[:post]
however if i assign each field of @params[:post[ except for
@params[:post]["image"] i have no problems. Is there something that
should be done to allow the file in the session?
thanks
adam
2014 Jan 07
1
Why do methods of "initialize" have no "srcref" attribute as other S4 mehtods?
For documentation we use a system that generates Rd files from special
comments in the code. (inlinedocs).
It is crucial to be able to get the defining source code for objects like
methods to extract the comments from it.
Here is an R session that shows how this works for several kinds of methods
and (at the end of the session) how if fails for methods of "initialize"
>
2006 Jan 20
1
AW: Linux Suggestions
Like the idea - how''d you call it, "railix"? ;)
.mitro
-----Urspr?ngliche Nachricht-----
Von: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] Im Auftrag von David Harrison *EXTERN*
Gesendet: Freitag, 20. J?nner 2006 11:25
An: rails@lists.rubyonrails.org
Betreff: Re: [Rails] Linux Suggestions
Is this thread an indication that what would be
2008 Jan 04
6
Ajax.Request: onFailure vs. onException
Hello All,
I''m trying to capture the exception message that my server application
is providing in response to my Ajax.Request. However, I''m confused as
to when onFailure is fired vs. onException. The onException handler has
access to the javascript exception object and I''d understood that it was
only called when the dispatch fails. Not sure what exactly that means
2006 Feb 21
7
Self-referencial habtm relationship
Heyo!
I am setting up a self-referencial habtm relationship with the users
of my app. I am using Chad Fowler''s "Rails Recipes" to get me started,
and everything works great with the join table "people_friends". I add
friends by doing somebody.friends << somebodyelse. However, with my
app, there is an approval process so my join table has columns
person_id,
2006 Feb 07
4
Dynamic url with javascript? - Help Please
Hi,
I''m trying to call a remote function when a combobox option is selected,
passing as an argument the current value of the combobox (paramenter
"panel_id":
<select id="server_interface_jack_switch_panel"
2007 Mar 30
2
Replacing slot of S4 class in method of S4 class?
Dear all,
Assume that I have an S4 class "MyClass" with a slot "myname", which
is initialized to: myname="" in method("initialize"):
myclass <- new("MyClass", myname="")
Assume that class "MyClass" has a method "mymethod":
"mymethod.MyClass" <-
function(object, myname=character(0), ...) {
2020 May 12
4
S3 method dispatch for methods in local environments
Dear All,
In R 3.6.3 (and earlier), method dispatch used to work for methods stored in local environments that are attached to the search path. For example:
myfun <- function(y) {
out <- list(y=y)
class(out) <- "myclass"
return(out)
}
print.myclass <- function(x, ...) print(formatC(x$y, format="f", digits=5))
myfun(1:4)
# prints: [1]
2005 Dec 07
1
Dots argument in apply method
Hello everyone,
I'm working on a package using S4 classes and methods and I ran into the
following "problem" when I tried to create an "apply" method for objects
of one of my new classes. I've found a way around the problem but I
wonder if I did not paint myself into the corner. I'd like your opinion
about that.
So I have an object "myObj" of class
2019 Jul 07
3
Possible bug in `class<-` when a class-specific '[[.' method is defined
Hi all !
I noticed a strange behaviour of the function `class<-` when a class-specific '[[.' method is defined.
Here below a reproducible example :
#-------------------------------------------------------------------.
counttt <- 0
`[[.MYCLASS` = function(x, ...) {
counttt <<- counttt + 1
# browser()
x = NextMethod()
return(x)
}
df <- as.data.frame(matrix(1:20,
2011 Oct 31
1
Question about copying reference objects using the initialize method
Dears,
I have a question about copying reference objects using the initialize method.
1) If the latter has no arguments, there is no problem to copy an object.
myClass = setRefClass("myClass", fields = list(value = "numeric") )
myClass$methods(initialize = function(...){
? value <<- 1
? callSuper(...)
})
newObject = myClass$new()
newObject$value = 2
copyObject =
2000 Jun 26
2
nargs() inside "[.myclass"
I am writing a function to work with class I am defining. I have a question
about using nargs() inside of parentheses function. nargs() shows the same
for supplying 1 argument, or no arguments at all. Here is a small example:
> "[.myclass"<-function(x,...) print(nargs()-1)
> x<-c(1,2,3)
> class(x)<-"myclass"
> x[]
[1] 1
> x[1]
[1] 1
> x[1,2]
[1] 2
2002 Dec 12
1
improving ts object
Dear all,
Currently, a ts object behaves like an array, and it would be very useful to have a similar object, which would behave like a data.frame, i.e. it could be indexed, named, etc. like a data.frame. What would be the most efficient way to construct such an object? I have tried to make one on my own following the directions of class design from "S Programming" (2000) as a
2008 Dec 22
1
How to add a slot to S4 class of an existing package?
Dear all,
Since my package is based on S4 classes, I would like to know how to add
a slot to an existing S4 class without breaking the code of users of my
package.
Assume the following S4 class:
setClass("MyClass",
representation(name = "character",
type = "character",
data = "data.frame"
),
prototype(name =
2005 Jul 08
2
R.oo static field
How can I define a static member of a class? not a static method,
rather a static field that would be accessed by all instances of the
class.
2011 Sep 22
1
R.oo: do work on data member at construction
Hello,
I'd like to 'do work' on data members upon construction (i.e. without
implementing it in a get method). Is this the best way to create data member
'z' upon construction? I'm thinking if .z=paste(x,y) below gets more complex
I'll run into issues.
setConstructorS3("MyClass", function(x=NA,y=NA,...) {
this <- extend(Object(), "MyClass",
2007 Oct 08
6
stub actions that depend on the parameter
Hi,
I''m pretty new to all related to bdd and rspec and I have the following
question. Is it possible to stub actions that return different objects
depending on the parameteres they were called with? Something like this:
MyClass.stub!(:method).with(1).and_return(@mock_object_1)
MyClass.stub!(:method).with(2).and_return(@mock_object_2)
I know I could use
2006 Feb 10
13
Element.observe () binding
Hey all,
I working on a project, but I am not sure I can do what I want to
do. The following works beautifully:
Event.observe(el, ''click'', function () { this.className += "
myClass"; return false; });
I have also tried doing this:
this.varname = ''test'';
Event.observe(el, ''click'', function () { alert (this.varname); }.bind