Libraries

Hi
we are developing a system that involves using libraries of objects (maybe better to say classes), each one implements a common interface. A client program has to be able to request a particular object (via a name parameter). The question is what is the best way to go about this? Client programs might request Objects that do not yet exist in the library.
I was thinking of having a lib class that contains a hash with the names as keys and the objects as vals. Each object would be an instantiation of a class in the "lib" package. So when the client program requests an object with name = "n" i can use hasKey functionality and return the object if it is there or null or whatever if not. This lib class will be built up by hand -- everytime a developer implements an object following the interface he manually adds it to the lib.
I dont know if this is the best way to go about this, and this approach has a bunch of obvious problems...Any comments?
Another way of asking the question is -- is there a way to import a specific class from a lib when you dont know if that class even exists, from inside the program code?
Thanx in advance.

Hi,
Another way of asking the question is -- is there a way to import a specific class from a lib when you dont know if that class even exists, from inside the program code?You can load classes dynamically as long as you got the name of the class, which you can read from a configuration file etc. (see topics on reflection)
/Kaj

Similar Messages

  • How do I use your iPhone with multiple iTunes libraries

    Hi, I have my music spread out between 3 seperate Itunes libraries on 3 different profiles on my computer. I have the newest generation Ipod Nano, Ipod Shuffle, and Iphone 4s. My Ipod's are both full, so I've decided to start putting music onto my phone. With my Ipod's, I can plug them into one profile on the computer, download the music on the Itunes library that exists on that profile, then do the same with the other profiles with no issue. However when I try to do this with my phone, It asks me to erase the music I have gotten from one Itunes library and sync with the current library, as soon as I plug it in to a different Itunes on one of the other profiles. I have my Iphone configured with the Manually manage music option, and I still haven't found a way to use my Iphone with multiple music libraries. PLEASE HELP

    http://support.apple.com/kb/PH12113 - If you use manual syncing, you can sync items from more than one iTunes library to your iPod. (You can sync iPod touch, iPhone, and iPad with only one iTunes library.)
    http://support.apple.com/kb/HT1202 - When manually managing content, you can add content from multiple libraries to your iPod or iPad. Even when manually managing music, some content may be available from only one library at time. This includes all content on iPhone and video content on iPod and iPad.
    They seem inconsistent as far as the iPad is concerned but in both articles the iPhone appears to only be able to sync to one library at a time.
    Troubleshooting Home Sharing - http://support.apple.com/kb/TS2972

  • How to handle iTunes Match with multiple libraries (one account, 5 family members)?

    How would this work, in the situation below ...
    Everyone has their own iCloud account (for their own syncing purposes).
    But we (family) ALL share the same iTunes account (for purchasing).
    How will this work, since we all have our own iTunes libraries?

    One person sets up Match on their computer using the iTunes account.  Uploads everything to match.
    I would recommend waiting until that person is done, and do computers one at a time.  No particular reason, just seems sensible.
    Next person sets up match using same iTunes account details.  Uploads their stuff.  They will then see everything the previous user put into the system, unless you select "Hide music not on this computer" in the view menu.  Previous user will now see their stuff too.
    Rinse and repeat.
    This is how it worked with my multiple machines anyway...  As long as every computer uses the same iTunes account for the store, you all get access to the same Match account.

  • Multiple itunes accounts/libraries on one computer

    We currently have only one ipod (shuffle) in our family for my 12 year old. Her itunes account is in my folder on our only internet connected computer. My younger daughter is buying her own shuffle and I would like to create a separate library and account for her. Is is possible to have separate Itunes libraries for different users on a Windows XP computer?

    while in your profile (where her musci is) open C:/Documents and Settings. find the folder for her profile and open it. then there should be another documents folder in there with her name. open that then go to her music folder in there, and then itunes folder, and drag and drop it from where its at under your profile into that folder.
    make sence?

  • Multiple iTunes Libraries on one computer?

    I'm a newbie and have what is probably a very simple question, but I'm confused. Both my boyfriend and I have iPods. What we're doing now is he's got his iTunes library on the laptop (syncing and charging on the laptop), and I have mine on the desktop (syncing and charging on the desktop).
    We're going on vacation and we would both like access to our libraries on the laptop while on vacation. Can you maintain two libraries on a single computer? How do I manage two different iPods on one computer?
    Thanks

    See http://support.apple.com/kb/HT1495

  • Multiple Libraries on one computer

    I want to store more music in iTunes than my iPod has room for (original iPod). I want to use one library for music that I don't want on my iPod and the other for the music I want to sync. I also want to be able to move music back and forth between the them.
    How do I store music in multiple libraries on one computer without making separate computer user accounts or using the playlist work around?
    Any ideas would be greatly appreciated. Thanks, apple-rules

    Yes, I am referring to the auto syncing of playlists. Not all of my music is assigned to playlists and I don't want to create them - too many songs.
    As I mentioned in my original post:
    I want to store more music in iTunes than my iPod has room for (original iPod). I want to use one library for music that I don't want on my iPod and the other for the music I want to sync. I also want to be able to move music back and forth between the them.
    I want to be able to store music in iTunes and play that music in iTunes without having them downloaded to my iPod. It would be nice to have a Library in iTunes that can be separate from the iPod stuff.
    I think I found a work around (#12). Until I get a better solution I am going to create a master folder to which I will move all my music that I do not want syncing to my iPod. Then, I will do a manual sync and exclude that folder.
    Thanks everyone.

  • Multiple iPods / libraries on one computer

    Hi All and thanks in advance for any help you can give me.
    Until recently I have had three ipods with three different libraries all managed through one computer running Windows XP. I accessed the different libraries by clicking onto iTunes and holding the shift key choosing the required library when the option came up.
    I have now bought a new computer running Windows 7 and just can't seem to get the same system running. Basically I can get one library up and running but each time I create a second library and import that one it just overwrites the first library leaving only the second library available.
    When opening iTunes in the same way (holding down shift) I get a clear option to 'Create new library' but this always seems to superseed the existing library rather than running seperately.
    It's now driving me nuts so any help to solve the problem would be fantastic. Plain English answers would be greatlt appreciated as i'm certainly no expert in this field!
    Thanks again!

    Wow guys, 276 responses, thanks to all.
    Unfortunately with such a huge response I haven't been able to go through them all as yet but i'm sure somebody will have come up with the soltion I need.
    Thanks again.

  • How can I have two devices with separate iTunes accounts on the same computer without sharing libraries?

    I have an iPhone 3s and my sister has an iPhone 3.  We use them only as iPods.  We each have our own iTunes account, but we have to share a computer.  How can we both syn our devices without sharing our music and app libraries?

    The most reliable way would be to set up individual user accounts in WIndows. Then each of your iTunes libraries will be completely separate.
    Regards.

  • I brought my itunes library onto a mac from a windows machine and now i have two separate libraries.  How can I merge them?

    I moved to Mac from a Windows machine where I had downloaded all of my CDs into iTunes.  When I got my Mac it only put my purchased items into my library.  So I merged my windows library and it created a whole new user account with that on it.  I now have two libraries and can only sync music with one account or I lose all of my imported CDs.  Help!  How do I merge them. 

    The easiest way is to get both computers on your home network and copy the files over the network. It's easier than you think
    Check this earlier thread:
    [How do I move my itunes library to new computer|http://discussions.apple.com/thread.jspa?messageID=7937172&#7937172]
    That thread mentions Target Disk Mode, which won't help moving from a PC to a Mac. But you can use file sharing to copy the files.
    As the articles all say: don't forget to de-authorize your PC before you get rid of it.

  • HT1229 I have several iPhoto libraries. How can I combine them to make one?e new library?

    I have several iPhoto libraries. How can I combine them to make one?

    iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ - 
    or the current version of Aperture can merge libaries from the current version of iPhoto
    LN

  • Have THREE iPhoto Libraries...How can I combine them? Plus most ALIASES!

    I have read some of the forum topics that I hope can help me. I have iPhoto 2 and when I messed up my iBook OS 10.2.8, I lost the iPhoto ( about 2K pictures :-()
    Now i have the 'puter back but still missing the iPhoto. I have found Three(3) iPhoto Libraries with "Find"...all are just labeled "iPhoto Library".NONE have numbers after the iPhoto Library...each has a different amount of "items" listed as being in the folder. 156 items, 126 items, and 30 items . ALL have photos NOT in the other Library folders.
    All three have different pathways:
    156 items:(user name)/Desktop 2/iPhoto folder-12/07**/iPhoto Library;
    127 items:(user name)/Desttop 2/iPoto folder1/26/08**all alias/ iPhoto Library;
    30 items: (user name)/Pictures 2/iPhoto 2/iPhoto Library.
    My question is:
    1. Is there a simple way to combine these so I have ONE iPhoto Library with ALL the photos in it???
    2. Most, not all, of the photos are "Aliases" but I can see the photos in "Preview"..but can't move them into an iPhoto blank folder.
    I gather I need to solve the "Alias" problem FIRST? right?I need to match the "Aliases" with their originals...
    Then hopefully move photos into the largest iPhoto Library with the 156 items in it. Is there a simple way to do this???

    OK...so I now have the MAJOR iPhoto Lib. I thought I'd lost (thanks to all your help steerin' me in the right direction).:-)
    I want to get the photos FROM the other two smaller Libraries and switch them to the BIG Lib. I now have....Is there a KB that will tell me how to do that...without having to move the BIG Library I have retrieved???
    Like, can I move the smaller Lib.s to the desktop and take out the photos by dragging them into the BIG iPhoto Lib.?...as there are many duplicates in the two smaller Lib.s that I don't need to add to the BIG iPhoto Library.
    The iPhoto Help " Switching between photo libraries"sez
    "1. Quit iPhoto;
    2. Rename your current Photo Library folder in the Finder or move it to a new location on your HD.;
    3 Open iPhoto;
    4 Click Find Library;
    5.Choose the library you want to display.;
    6. Click open.
    The library appears in the iPhoto viewing area."
    I DO NOT want to switch between lib.s, I want to MOVE photos FROM the smaller lib.s to the BIG iPhoto Library, so I will have only ONE iPhoto Lib. to deal with.Consolidation NOT switching....
    Am I making sense here?????

  • I have three different libraries.  How can I combine them?

    Downloading more music onto my Mac, but they show up in different libraries on my ipod.  Is there a way to combine the libraries?
    Thanks

    Hey Kelliott222,
    Thanks for using Apple Support Communities.
    In iTunes your library library some items might be stored in different locations and you can consolidate all the files in your library to the iTunes folder.
    iTunes 11 for Mac: Change where your iTunes files are stored
    http://support.apple.com/kb/PH12165
    Managing content manually on iPhone, iPad, and iPod
    http://support.apple.com/kb/ht1535
    You can drag media files onto the iPod or iPad in iTunes to add them to the device without adding them to the iTunes library.
    Have a nice day,
    Mario

  • How do I go from using a single Apple ID with multiple libraries to using home sharing?

    Until now my wife and I have opted to share our iTunes/Apple ID and use multiple libraries to manage our iPhones. This has become increasingly difficult...with issues such as having apps I've downloaded that she doesn't want automatically downloading to her library and even her phone. Now, add in the fact that I want to continue to manage my iTunes library from our PC and allow her to manage hers from her new MacBook Pro and we have good reason to move to home sharing with separate Apple IDs for each of us.
    My question is the logistics of doing so. Not only do we need to replicate her existing library on a new Apple ID, but then we need to migrate all the necessary files over to her MacBook Pro. Quite honestly, I don't even know where to begin. Is it possible to associate her existing library with her new Apple ID without having to create her library from scratch? Then is there anyway to migrate only the items in her library over to her MacBook Pro as opposed having to move all of our music & apps? Where do I begin?
    Thanks!

    Okay...I misunderstood and thought we needed separate ID's...but I see we actually need to use the same ID which simplifies things in my mind a bit. But still some followups...
    1) What do you mean by restore the library on her computer? Simply open her library file in iTunes?
    2) On our current machine...media is actually split between a couple folders but all under the My Music folder. But there are multiple subfolders (iTunes, Her iPhone, and Amazon MP3). I presume as long as I copy over the entire My Music folder there shouldn't be any access issues when the library is opened on her machine?
    3) Is there any easy way to get rid of all the extra files that she doesn't have in her library? For instance, all my music and apps that she doesn't actually want, is there any easy way of separating those out from the files that are actually linked to in her library? Vice versa for me...once we've go her library set up on her machine, any easy way to purge all the extra files from my PC that aren't actually in my library?
    Thanks!

  • Two Libraries on ONE user account, or multiple iTunes?

    I have a rather large library of music and spoken word
    shows that I share at work, and I'd like to split these
    into two libraries, one for those who listen to the
    Spoken Word playlists, and the other for the music lovers.
    My biggest complaint I get daily is that the 5 user limit locks out too many users and they often perch like hawks
    to get on just to hear their favorite song or to hear
    an interview.
    How do I enable the use of either two iTunes running at the same time on my mac, or the running of two libraries
    to share out, on the same mac?
    I downloaded Libra, but it only allows you to
    switch libraries one at a time, enable two or more.
    Where am I missing it?

    The library was in the user account you deleted.  You should have transferred the iTunes folder before deleting the account.
    Your i-device was not designed for unique storage of your media. It is not a backup device and media transfer was planned with you maintaining a master copy of your media on a computer which is itself properly backed up against loss.  To use a device with a new computer you transfer the content from the old computer (or its backup) directly to the new computer, not the device to the new computer. Syncing is one way, computer to device, updating the device content to the content on the computer, not updating or restoring content on a computer. The exception is iTunes Store purchases which can be transferred to a computer.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - only purchases from iTunes Store
    For transferring other items from an i-device to a computer you will have to use third party commercial software.  See this document by turingtest2: Recovering your iTunes library from your iPod or iOS device - https://discussions.apple.com/docs/DOC-3991

  • Can you view multiple iTunes accounts and libraries on the same computer

    Can my wife open her itunes account on my computer and view and play her libraries on my computer

    she has her own account. when we put in her account info a screen opens on the right - it says welcome to her and provides several opttions but none to see her libraries. all of my libraries continue to appear on the left side of the screen

  • Managing multiple libraries for multiple family members

    I have four family members with multiple iTune libraries, including two that need to be age appropriate for our children. To add to this burden, we now have an iPad as well. How do I best manage these libraries, minimizing duplicate purchases, enabling each to have store accounts for gift card purchases, and sync each iPod simply for those not familiar with the apple software? Can I merge our libraries, create different users with their songs and accounts for purchases and syncing logins? We have two operating systems in the home, mac and pc? Argh, this is cumbersome, my library has over 4000 items, other family members have much smaller libraries, but would like their own individual libraries. Should I merge and make separate playlists for each user? If so, how can I incorporate my own vast library of playlists already created?
    Help me please, any suggestions?
    Rob Mc

    There are 3 options. See this page:
    http://support.apple.com/kb/ht1495
    My advice is to use option #1 and have each user with a separate windows userID. They can each keep their own itunes library database file with ratings, play counts, playlists.
    Have all the library content in a public folder to avoid filling the PC's hard drive with duplicates.
    You can use a 3rd-party utility program like iTunes Folder Watch to update all the libraries when new content gets added.
    Method #2 is easiest, but then ratings and play counts will not be separated. Also, they have to remember to log out of the itunes store and log in with their own ID when making purchases. Something to watch for when kids are involved with their own gift cards....this is not a problem with method #1.
    Method #3 seems to give a lot of people grief because all users MUST use a shift-start of itunes to choose their own library. Woe has fallen on many who have tried this method.
    As for using both Mac & PC, itunes & ipods are designed to only sync with one PC. There is a way around that, but you either have to do a lot of manual backing up and copying, or buy something like TuneRanger.

Maybe you are looking for

  • How can I call a public function in one component from another component?

    I have two components: Form and Confirmation.  Form is a Canvas and Confirmation is a TitleWindow. Form contains several controls and a submit button.  Confirmation contains an OK button.  When the user clicks the submit button, the Confirmation appe

  • Problem in installation

    Hi, Am a technical consultaning to install trying to install 11.5.10 on Linux 4 stuck at some place not able to figure it out.Please help. I think problem is with this statement ,but don't know how to fix ALTER DATABASE RENAME GLOBAL_NAME TO VIS.iapp

  • Inbound XML IDOC to IDOC

    I've searched the internet for solutions but I have not seen any solutions.  I'm trying to upload an XML IDOC (generated from SAP) back into SAP using IDOC_XML_FROM_FILE.  I've configured the my XML port to see the directory where the idoc is stored

  • Semi-Simple Chart -- getting started help requested

    I am trying to make a smiple chart with years, campuses, and number of students. The x axis would be years, the y axis the number of students, and for each campus, a line horizonally displaying the change across time of the number of students. I don'

  • Oracle database 10g and symantec ghost

    i'm working on trying to install oracle database 10g on a bunch of computers in a computer lab here at my university. we are using symantec ghost to manage all of these computers. like normal, i installed oracle database 10g enterprise on the build m