module

Joomla - Component - Form not posting to itself!

I am learning Joomla and doing examples out of books. Im working on an example that does not throw any errors but doesnt do what I want. The example is to create a suggestion form that posts the data to itself which is then put into a database. The form does not return to itself tho! When the submit button is pressed it takes you to h...

In a software project, how would you differentiate a Component from a Module?

In a software, how would you differentiate a Component from a Module? ...

IPython Modules

I have a few IPython scripts which have redundant functionality. I would like to refactor the common functionality into one module and include that modules in the existing script. The problem is it cannot be made a python module as the code uses Ipython's language extensions (!, $ etc). Is it possible to make a module having IPython code...

How can I fix test failures of Perl module HTML::TreeBuilderX::ASP_NET?

I'm trying to install the HTML::TreeBuilderX::ASP_NET mentioned Perl module on my box with CPAN.pm, but the "make test" part of the installation fails so the module doesn't get installed. Distribution: HTML-TreeBuilderX-ASP_NET-0.08 Perl: "This is perl, v5.10.0 built for i486-linux-gnu-thread-multi" OS: Linux 2.6.28-13-server #44-Ubunt...

Ruby module with a static method call from includer class

I need to define the constant in the module that use the method from the class that includes this module: module B def self.included(base) class << base CONST = self.find end end end class A def self.find "AAA" end include B end puts A::CONST But the compiler gives the error on the 4th line. Is there any ...

Including a Ruby class from a separate file

For a while I had been including an entire class inside of a Ruby module. Apparently this is not what I am supposed to do. It appears that the point of a module is to store functions which can then be included as methods in a new class. I don't want this. I have a class that I want to keep in a separate file which I can access from oth...

Install a custom ASPX file as part of a ListTemplate definition

I am using VSeWSS 1.3 to create a custom list definition scoped to 'Site'. <Elements Id="8924acef-84ef-4584-ade4-e3eaeb8df345" xmlns="http://schemas.microsoft.com/sharepoint/"&gt; <ListTemplate Name="MyListDefinition" DisplayName="MyList" Description="" BaseType="0" ...

How to import a Python class that is in a directory above?

For example, I want to inherit from a class in a file that lies in a directory above the current one. Is it possible to relatively import that file? thanks! ...

Callable modules

Why doesn't Python allow modules to have a __call__? (Beyond the obvious that it wouldn't be easy to import directly.) Specifically, why doesn't using a(b) syntax find the __call__ attribute like it does for functions, classes, and objects? (Is lookup just incompatibly different for modules?) >>> print open("mod_call.py").read() def __c...

Ruby: a class extending a module

Hi, I'm trying to to define a class called "HTML" to extend Nokogiri - which uses modules. I tried the following: require 'nokogiri' class HTML include Nokogiri end and require 'nokogiri' class HTML extend Nokogiri end but so far it's been impossible that the class HTML inherit of all the functions in nokogiri. So stuf...

Inherit a class accross modules?

We have a class Car defined like this in a car.rb file class Car end then, we have another class Car defined in electric/car.rb require "../car.rb" module Electric class Car < Car end end Unfortunately, it seems that we can't inherit from the first class. Why is that? ...

Including modules in a class and executing code

Here is a class that I used to have class Something # Defines the validates class methods, which is called upon instantiation include Module validates :name validates :date end I now have several objects that are using the same functionalities, and worse, several object that are defining similar things, like this: c...

Rails /lib modules and

I am writing a custom wrapper for open_flash_chart plugin. It's placed in /lib and load it as a module in ApplicationController. However, I have some Class hierarchy or smth problem. From any controller I can access open_flash_chart functions as OpenFlashChart, Line etc However, in a class in a /lib module, it doesnt work! Any ideas?...

How to reload a Python module that was imported in another file?

I am trying to learn how Python reloads modules, but have hit a roadblock. Let's say I have: dir1\file1.py: from dir2.file2 import ClassOne myObject = ClassOne() dir1\dir2\file2.py: class ClassOne(): def reload_module(): reload(file2) The reload call fails to find module "file2". My question is, how do I do this properl...

In Python, how do you change an instantiated object after a reload?

Let's say you have an object that was instantiated from a class inside a module. Now, you reload that module. The next thing you'd like to do is make that reload affect that class. mymodule.py --- class ClassChange(): def run(self): print 'one' myexperiment.py --- import mymodule from mymodule import ClassChange # why is t...

Python: How can I import all variables?

Hi, I'm new to Python and programming in general (a couple of weeks at most). Concerning Python and using modules, I realise that functions can imported using from a import *. So instead of typing a.sayHi() a.sayBye() I can say sayHi() sayBye() which I find simplifies things a great deal. Now, say I have a bunch of variables that...

Why This ABAP Funtion Module Always Set the Importing Parameter with <Initial>?

We have a function module which contains an importing parameter IS_USER, which is of type S_USER, S_USER is a structure and contains the following fields: USER_ID USER_ID CHAR 60 IP_ADDR IP_ADDR CHAR 16 SESSION_ID SESSION_ID CHAR 20 LANGU SPRAS LANG 1 MACHINE_NAME MACHINE_NAME CHAR 128 SAP_PASSPORT SAP_PASSPORT STRIN...

Defining custom exception in a module in Rails

Hi! I've created a custom module (which currently only defines a new Exception class), and put it under lib/lib_th.rb module LibTH module Error IDNotFound = Class.new end end I should not need to require/include the module in my code, as it should be automatically loaded, since it follows the conventional naming rules...

try to use Module in Perl and print message if module not available

Hi, I wanted to be able to do this in Perl (the code below is Python lol) try: import Module except: print "You need module Module to run this program." Does anyone have any idea how to? ...

Access Modules in Flex

Hello Community, I have build a module in Flex that I call myModule, this module has a method myMethod. Now I use the ModuleManager to load this module. mod = ModuleManager.getModule("myModule.swf"); mod.addEventListener(ModuleEvent.READY, modEventHandler); mod.load(); now I want to access the method (customComp as myModule).myMeth...