search for: onload

Displaying 20 results from an estimated 642 matches for "onload".

Did you mean: unload
2009 Jul 07
0
Protection stack overflow when calling setGeneric()/setMethod() from within .onLoad()
Hi list, Calling setGeneric()/setMethod() from within the .onLoad() hook of MyPkg package produces the following error: > gctorture(TRUE) > library(MyPkg) .onLoad(): ok1 .onLoad(): ok2 Error : protect(): protection stack overflow Error : .onLoad failed in 'loadNamespace' for 'MyPkg' Error: package/namespace load failed...
2007 Mar 20
0
4 commits - libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_flv_decoder.h libswfdec/swfdec_movie.c test/trace
libswfdec/swfdec_flv_decoder.c | 108 +++++++++++++++++++++++++++++++- libswfdec/swfdec_flv_decoder.h | 4 + libswfdec/swfdec_movie.c | 2 test/trace/Makefile.am | 3 test/trace/onload-childparent.c | 38 +++++++++++ test/trace/onload-childparent.swf |binary test/trace/onload-childparent.swf.trace | 3 7 files changed, 156 insertions(+), 2 deletions(-) New commits: diff-tree 9395d4ef15746d3e1d7070a13f6da03a91c67b54 (from c1dade098152d072a1e1acb571a7deae7d3e9...
2006 Jun 16
11
Detecting Body Onload
I have a piece of code that "waits" for body onload. Every 30ms, it tests $(''body''). Seems that isn''t always good enough. I''ve hit situations where the DOM is "partially" loaded somehow. I fixed matters by setting a global flag... <body onload="bodyLoaded=true;"> which provides...
2011 Jun 23
1
Class not found when search in .onLoad
Hi, I am facing with a strange behaviour of isClass and extends when these are called in .onLoad in both R 2.12.1 and R 2.13.0. This is preventing my package from doing some object initializations at a proper place (i.e. in .onLoad). Suppose one defines two S4 classes in a package, and that one needs to check the inheritance between these two when loading the package (e.g. to validate slo...
2011 Oct 15
2
.onLoad failing because could not find function "loadMethod"
Hi, This strange warning happen sometimes when running 'R CMD check': * checking whether the package can be loaded with stated dependencies ... WARNING Error : .onLoad failed in loadNamespace() for ?pkgB?, details: call: length(new("A")) error: could not find function "loadMethod" Error: package/namespace load failed for ?pkgB? Execution halted It looks like this package (or one of its dependent packages) has an unstated...
2005 Oct 03
0
Prototype Ajax.Request (onLoading and onSuccess) question
...r via Ajax.Request when the previous (''? <http://luther.edu/new/?cur_month=2005-09>'') or next (''? <http://luther.edu/new/?cur_month=2005-11>'') month links are clicked . http://luther.edu/new/ It seems to work fine if I don''t call anything onLoading. http://luther.edu/new/noonloading.php When I do call something onLoading, sometimes it gets stuck and never makes it to the function I call onSuccess. Any idea what I am doing wrong? Could I be running up against a race condition? I guess I am assuming that onLoading will always be cal...
2006 Jan 22
3
"onload" event handler inside a div
Hi. I need help on what is essentially putting an "onload" event handler into a div. I am using render :partial and when the partial is loaded, I would like the divs to show using an effect from a library such as scriptaculous or moofx. However, there is no "onload" for a div. I was wondering what alternative methods I should use to ach...
2005 Nov 21
2
NAMESPACE, S4, and .onLoad
The Writing R Extensions manual instructs developers who use S4 classes and methods in a package with a name space to: There needs to be an .onLoad action to ensure that the methods package is loaded and attached: .onLoad <- function(lib, pkg) require(methods) I'm wondering if listing methods in the Depends field of the package's DESCRIPTION file is sufficient. My understanding is that doing so will result in the...
2005 Dec 29
2
Ajax.Request: onLoading executed after onComplete in IE
Hi, i''m trying to use a visual indicator for my Ajax requests. It''s based on the shopping cart demo at script.aculo.us and works great in Firefox, Konqueror and Opera, but fails in IE6. For some reason (timing problems?) onComplete is executed before onLoading, so the indicator is shown but not hidden when the request has finished. Oddly enough it works fine in the shopping card demo. It happens with both, script.aculo.us 1.5.0 and 1.5.1. Here''s the (somewhat reduced) code i''m using: ---------------------------------------- new...
2005 Aug 27
2
Writing R-extensions
...ge), but the section on `Load hooks' states Packages with name spaces do not use the @code{.First.lib} function. Since loading and attaching are distinct operations when a name space is used, separate hooks are provided for each. These hook functions are called @code{.onLoad} and @code{.onAttach}. I interpreted this as "o.k., loading and attaching are distinct operations, if I load a package .onLoad (and only .onLoad) is run, if I attach a package then .onAttach (and only .onAttach) is run". But the manual continues a bit further down...
2006 May 02
5
How to call a javascript function from rails view?
Is there a way to call a javascript function from within a rails view? I can''t use the onLoad javascript method inside the <body> tag because I don''t have control over the body tag, it''s in my header. There are several rss feed reading functions that are in the page and I would like to call those functions while the page is being loaded or once it''s done...
2013 Oct 03
1
check warning with .onLoad() and setClass()
Hi I am writing a package in which I define a new class in the .onLoad() hook: ,---- | .onLoad <- function(libname, pkgname) { | setClass( | "inDrak", | representation( | init = "SpatialGridDataFrame" | ), | contains = "simObj" | ) | } `---- The class "simObj" is d...
2005 Dec 08
1
Loading namespaces
I'm creating a package for my own use that uses some S4 classes but no methods. I have a file called NAMESPACE it contains the line: exportClasses("foo") and at the top of the R file I have setClass("foo", representation(x="numeric") and the line: .onLoad<-function(libname,pkgname) When I run R CMD check I get Syntax error in the only R file. If I comment out the .onLoad function I get a package/namespace load failed error. Are libname and pkgname parameters for the function .onLoad that need to explicitly stated, or does R populate them when...
2014 Feb 21
0
instantiating a reference class with an initialize() method from .onLoad fails
PkgA has a single R/binding.R file containing .A <- setRefClass("A", methods=list(initialize=function(...) {})) .onLoad <- function(...) .A() A NAMESPACE with import(methods) exportClasses("A") and DESCRIPTION Package: PkgA Type: Package Title: Documenting reference classes Version: 0.0.1 Date: 2012-08-05 Author: Martin Morgan Maintainer: Martin Morgan &l...
2016 Jan 30
2
Best way for rgl's .onLoad to fail?
...default, so I'd like rgl to fail nicely. Ideally, it will load a library that doesn't need to link to the X11 libs but will still allow WebGL code to work, but that's complicated, so I'd like a stopgap. I can detect that the failure is about to happen, and call stop() in the .onLoad hook, but that gives an ugly message: > library(rgl) Error : .onLoad failed in loadNamespace() for 'rgl', details: call: NULL error: X11 not found; XQuartz (from www.xquartz.org) is required to run rgl. Error: package or namespace load failed for ?rgl? Alternatively, I can just...
2005 Oct 18
3
Ajax.Request / XmlHttpRequest details
...HttpRequest''s readyState property can have? I mean, I know what the states are, but I''m unclear on the circumstances under which each occurs... In a simple test I wrote, I''m seeing the loaded, interactive and complete states (i.e. my Ajax.Request instance calls its onLoaded, onInteractive and onComplete event handlers). onInteractive gets called multiple times, so I assume it fires either every so-many- bytes of response data or every so-many-seconds -- but which is it? And why isn''t onLoading firing? The reason I''m asking is, I''m...
2006 Mar 28
3
How to set options() when a package without a name space is loaded?
...ding a package *without* a name space? Is it possible? I though this one was a common question, but I could not find it in the FAQ, in the help nor in the r-help/r-devel archives. Section 1.6.3 on "Load hooks" in "Writing R Extensions" says that this should be done using the .onLoad hook, but that does only apply to packages name spaces, cf. ?.onLoad Thanks Henrik
2004 Mar 16
2
Documentation on how to put classes and methods in packages with namespace?
...0) history() The classes and methods of dynamicGraph is not assigned, see the attached "run2.txt", and compare with the list of the objects of dynamicGraph in "run1.txt". I have experimented with the argument "where" to setClass, etc., see the attached "onLoad.R". Regards, Jens Henrik Badsberg ".onAttach" <- function (lib, pkg) { require(tcltk) } ".onLoad" <- function (lib, pkg) { .onLoad.dynamicGraph() } ".onLoad.dynamicGraph" <- function () { library(methods) setClass("GraphLatt...
2016 Jan 31
0
Best way for rgl's .onLoad to fail?
...39;d like rgl to fail nicely. > > Ideally, it will load a library that doesn't need to link to the X11 libs but will still allow WebGL code to work, but that's complicated, so I'd like a stopgap. > > I can detect that the failure is about to happen, and call stop() in the .onLoad hook, but that gives an ugly message: > > > library(rgl) > Error : .onLoad failed in loadNamespace() for 'rgl', details: > call: NULL > error: X11 not found; XQuartz (from www.xquartz.org) is required to run rgl. > Error: package or namespace load failed for ?rgl? &g...
2008 Aug 06
1
R CMD check message that I can't figure out (.onLoad failed)
I have been able to track and fix everything so far with R CMD check. How do I make this reproducible and I will do it. this is the message that I got: Error in fun(...) : couldn't connect to display ":0.0" Error : .onLoad failed in 'loadNamespace' for 'tcltk' -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of...