-
October 31st, 2009, 09:12 AM
#1
import module
hello all, i have a module which i wish to import in several projects. is there anyway i could do this?
the current method that i'm using is that i'm copying over several modules in all the projects i'm doing and if i had to change a single module i had to replace that module in all the projects, that is quite troublesome
-
November 1st, 2009, 01:31 PM
#2
Re: import module
Modules are nothing but static classes. Why don't you instead build a class library and then use this class library instead of using a module.
-
November 1st, 2009, 04:13 PM
#3
Re: import module
sry about that, but how exactly is a class library built? is it like throwing all the different classes within a single file
-
November 1st, 2009, 06:11 PM
#4
-
November 2nd, 2009, 05:08 PM
#5
Re: import module
i've written a class like this:
Code:
public class library
public class qwe
end class
public class asd
end class
end class
right now i would have to have 1 line of import for every class within library, is there a way to do something like this:
-
November 2nd, 2009, 07:04 PM
#6
Re: import module
Put them into the same class structure. One statement
-
November 2nd, 2009, 07:15 PM
#7
Re: import module
but that would spoil my "logic" because i couldn't simply jus strip out all the innerclasses and put them into 1 class, i mean i could but it will feel "weird".
i have innerclass1 that has f1() and innerclass2 that also have f1(), in this case i wish to refer to f1() by either innerclass.f1() or innerclass.f2()
however if the function name doesn't clash, like if i call specialfunction() and only innerclass7 has it, shouldn't it be understood im calling innerclass7.specialfunction() ?
but i do not wish to do something like this
Code:
imports myclass.innerclass1
imports myclass.innerclass2
imports myclass.innerclass3
imports myclass.innerclass4
imports myclass.innerclass5
imports myclass.innerclass6
imports myclass.innerclass7
everytime i want to use the functionality of myclass functions and refer to functions only through their "last-name" or when last-name clashes (and only when it clashes), their "class-name"."last-name"
-
November 2nd, 2009, 11:31 PM
#8
Re: import module
innerclass can import from myclass, right?
create the base class
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|