search for: superclass

Displaying 20 results from an estimated 457 matches for "superclass".

2005 Aug 05
1
S4 generating function
Can someone explain what the problem is when I use the generating function? And how to get debug() to stop in the Superclass initialize method? ---- source ----- setClass("Superclass", representation(id = "character"), contains = "VIRTUAL") setMethod("initialize", signature(.Object = "Superclass"), function(.Object, id = "&quo...
2023 Jul 19
0
proposal for WRE: clarify that use of S4 classes implies use of superclasses
If a package has importClassesFrom(P, C) in its NAMESPACE, then should it _also_ have importClassesFrom(P, <superclasses of C exported from P>) importClassesFrom(Q, <superclasses of C exported from Q>) ## and so on ... ? I think that WRE could be more clear on this point, and in any case I _think_ that the answer is yes. Notably, I think that this rule would resolve some of the problems with s...
2006 Oct 19
1
Question about variable assignments/scoping after render call
I''ve got a question about how variables are made available to templates. We have a test that looks something like this: def test_variable_assigned xhr :get, :do_stuff, :id => 1 assert_not_nil assigns(:thing) end And our app code looks like this: class SuperClass < ActionController def do_stuff @parent_model = ParentModel.find(params[:id]) render :template => ''superclass/do_stuff'' end end class SubClass < SuperClass def do_stuff super @thing = @parent_model.thing end end When we run our tests with...
2018 Jan 31
0
Coding standards: duplicating method comments?
...use the rendered docs on the LLVM web site when using a dumb editor, so haven’t found this to be a problem. > The > disadvantage is that duplicated comments add maintenance burden just > like duplicated code. Indeed. It can lead to stale comments if the subclass is not updated when the superclass is. I also find these comments misleading: if an overridden method has a comment, I expect it to tell me what is different between this and the superclass’ definition (i.e. what I, as a caller of this method, should be aware of if I call this version and not the superclass version). If it is just...
2008 May 13
8
static private and multi-inherit
/*author:csf178-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org*/ function Class(Initalizer,SuperClasses) { if(!SuperClasses)SuperClasses=[]; var ret=function(){ for(var i=0;i<SuperClasses.length;i++) { SuperClasses[i].call(this); } var $private={}; var $public=this; var $static=ret; with($static){ with($private){ with($public){ eval("("+Initalizer+&quot...
2010 Nov 21
1
reference classes: question on inheritance
Dear list, I have a reference class which should act as a "generic" superclass for other classes. I've read the respective section at ?setRefClass and put the name of the superclass to the 'contains' argument of an example subclass (see class defs below). Classnames are set in a way that shouldn't result in collation issues (virtual def sourced before supercla...
2011 May 27
1
Reference Classes/S4 Classes: can method dispatch check superclasses BEFORE resorting to method for "ANY"?
Dear list, is it possible that method dispatch checks for superclasses/virtual classes before checking "ANY"? I'd like to build a generic initialization method for all my Reference Class (say "MyDataFrame") objects by having them inherit from class, say "MyRefClassVirtual" (which would have to be a virtual S4 class; there are n...
2018 Feb 01
1
Coding standards: duplicating method comments?
...cs on the LLVM web site when using a dumb editor, so haven’t found this to be a problem. > >> The >> disadvantage is that duplicated comments add maintenance burden just >> like duplicated code. > Indeed. It can lead to stale comments if the subclass is not updated when the superclass is. I also find these comments misleading: if an overridden method has a comment, I expect it to tell me what is different between this and the superclass’ definition (i.e. what I, as a caller of this method, should be aware of if I call this version and not the superclass version). If it is just...
2006 Jun 16
5
superclass mismatch for class OrderedOptions
I have Rails 1.1.2 installed and froze my app to 1.0 by checking it out into the vender directory. Maybe it''s coincidence, but now when trying to do rake migrate I get this: > rake migrate --trace (in /home/beet/workspace/) rake aborted! superclass mismatch for class OrderedOptions /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ordered_options.rb:27 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `requ...
2013 Jan 31
2
rbind Missing Something: Need New Eyes
I don't see what's missing in my statements to add rows to a data frame and someone else will probably see what needs to be added to the statements. The data frame has this structure (without any data): $ PHYLUM : chr $ SUBPHYLUM : chr $ SUPERCLASS : chr $ CLASS : chr $ SUBCLASS : chr $ INFRACLASS : chr $ SUPERORDER : chr $ ORDER : chr $ SUBORDER : chr $ INFRAORDER : chr $ SUPERFAMILY: chr $ FAMILY : chr $ SUBFAMILY : chr $ TRIBE : chr $ SUBTRIBE : chr $ GENUS : chr $ TAXON : chr...
2012 Sep 22
4
Class, Module, Object
>> reload! Reloading... => true >> puts Class < Module true => nil >> puts Module < Class false => nil >> puts Module < Object true => nil >> puts Object < Module false => nil >> Object.parent => Object The above indicates that the Class object instance inherits from the Module object instance and the Module object instance
2006 Jun 01
1
call method of superclass
Hi again, Is it possible to call a method of the superclass within a method with the same name in the derived class? e.g. : call Test::list from SubTest::list (SubTest being a subclass of Test)? Best regards, -- ---------------------------------------------------------------------- Yannick Majoros http://www.inma.ucl.ac.be/~majoros Informaticien UCL/I...
2007 May 30
0
DRYing up controller tests and mailer tests using superclasses
Hi! Currently both, the controller/functional tests and mailer tests, contain a lot of cruft. I''ve created two superclasses to DRY them up a bit. Here are some examples how tests using those superclasses will look: http://pastie.caboo.se/66139 Ticket with the patch: http://dev.rubyonrails.org/ticket/8521 Known issues: * Since we don''t explicitly setup the @request and @response objects anymore, we should...
2005 Nov 24
0
model classes into module = superclass mismatch
Hello. I''d like to put all my data model classes into a module to avoid name clashes with other classes. However, when I do so, I get a superclass mismatch error. My class hierarchy for the class in question looks like this: class ViewCTI < ActiveRecord::Base end module ORM class Molecule < ViewCTI end end I load the model classes from the ApplicationController class class ApplicationController < ActionController::Base mo...
2006 Aug 01
6
warning and errors
i got my app to run fine on one server, but I moved it to another and huge problem started.... I''ve been trying various things for 3 hours now, I can''t get it to work.... I am getting this error. Exception `TypeError'' at (eval):542 - superclass mismatch for class NotFound I am using the same camping.rb, apps starts in CGI but not in Apache/FastCGI. while it works fine on my other server the only difference I can think of, its the apache version. but I run rails fastcgi on this same apache, so the apache version should not be a problem....
2012 Jan 21
4
why doesn't an instance of Object get Class's new instance method?
"Object is the root of Ruby''s class hierarchy. Its methods are available to all classes unless explicitly overridden." Wouldn''t Class class be at the root of the class hierarchy? After all, look at this: 1.9.2p290 :006 > Object.instance_of? Class => true Object is an instance of class, after all we can use one of Class'' instance methods on Object:
2006 Mar 28
12
cached-model broken with Rails 1.1
It looks like cached-model is broken again under rails 1.1. Can anyone confirm? Note that the exception below indicates it''s trying to treat CachedModel as the class name of the model, rather than using the proper class name (which is Entry in this case, and the table called entries). This is a model using Single Table Inheritance and acts_as_tree, and worked just fine under 1.0 and
2018 Jan 30
3
Coding standards: duplicating method comments?
A quick coding standards question. The current coding standards doc has helpful guidance on Doxygen comments and the like: https://llvm.org/docs/CodingStandards.html#source-code-formatting One aspect which isn't explicit is the policy on duplicating code comments for subclasses. To modify an example from that doc: """ // In Something.h: /// An abstraction for some complicated
2009 Apr 06
3
After Rails 2.3.2 upgrade: superclass mismatch for class TestCase (TypeError)
I upgraded a working app from rails 2.1 to 2.3.2. Now when I run rake test:units I get this error: /usr/lib/ruby/gems/1.8/gems/ activesupport-2.3.2/lib/active_support/test_case.rb:17: superclass mismatch for class TestCase (TypeError) I generated a new test app and all tests run OK. For the upgrade I ran rake:update and renamed the class in test_helper to ActiveSupport::TestCase. Also renamed the classes in all unit tests and to inherit from ActiveSupport::TestCase and in functional test...
2005 Dec 14
5
Rails namespace help requested
...er so i can move on. To recap quickly, can someone tell if Rails is somehow forcing all modules into a single namespace? I have a model class StateProvince and inside a webservice module in my lib/ directory I have a StateProvince as well but no matter what I do when running under Rails I get a superclass mismatch error. This doesn''t happen when I have standalone ruby code in similar situations. Thanks for any help Mike