Archiving NSToolbar items

I have an NSToolbar in a Cocoa document-based applications. I want to be able to save the items and the order of the NSToolbar, so that the next time the program opens (or the next time a new document opens) the toolbar will be the updated version. I have the following code.
In MyDocument.m I have this method (MyDocument is the delegate of the main window). toolbarItems is an NSArray, and ToolbarKey is an NSString. myToolbar is an IBOutlet NSToolbar.
-(void)windowWillClose:(NSNotification *)notification {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
toolbarItems = [myToolbar items];
[defaults setObject:toolbarItems forKey:ToolbarKey];
Then I have this in windowControllerDidLoadNib. mainWindow is my main window (the document window)
- (void)windowControllerDidLoadNib:(NSWindowController *) aController
[super windowControllerDidLoadNib:aController];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[mainWindow setDelegate:self];
if ([defaults objectForKey:ToolbarKey] != nil) {
int x;
for (x = 1; x <= [[defaults objectForKey:ToolbarKey] count]; x++)
[myToolbar removeItemAtIndex:x];
for (x = 1; x <= [[defaults objectForKey:ToolbarKey] count]; x++)
[myToolbar insertItemWithItemIdentifier:[[[defaults objectForKey:SSToolbarKey]
objectAtIndex:x] itemIdentifier]
atIndex:x];
This code isn't working, because whenever I open up a new document, I see the same toolbar as the default one, and not the user customized one. What am I doing wrong?

Hi Deepti,
I completely agree Samanjay, in addition to trail mail plaese see few more information:
BSIS, BSAS, BSIK, BSAK, BSID, & BSAD are the tables related to secoundary index. These index are built in order for Customer, Vendor and GL Account when FI document posting is done. This index will allow to account -specific access to the data and to improve the access.
This table can be deleted by Postprocessing program for the archived data. FI_DOCUMNT is the archiving object for this.
Reward if it is useful.
-Thanks,
Ajay

Similar Messages

  • How to archive Open items

    Hi All,
    I am using FI_DOUMNT to archive Vendor/Customer Open Items. If i run the Object for open items saying that
    1 of the 1 company codes selected still have open periods.
    How can i archive Open items, Any alternatives.
    thanks,
    sriram

    You need to establish clearing criteria and clear the items first, then they have to pass the residency criteria in order to be archived.  As Rob indicated, you can not archive open items - that does not make sense.  Your open items directly affect the balance of the A/P or A/R account...

  • Archiving News Items

    Can someone please help me with how to archive news items after 30 days? I still want these news items to be accessable to users. So I guess I need to know 2 things:
    1. How to archive news items
    2. How to retrieve archived news items
    Thanks,
    Tara

    Hi Tara,
    This depends on what you call "archived". If you just want news not to be published after a certain date, the Timedependent Publishing Service maybe would be enough for you. See http://help.sap.com/saphelp_nw04/helpdata/en/e8/a9a76828b8dc469969ff450ec81ced/frameset.htm
    If you want them to move to some "archive" folder (located wherever), you could implement your own SchedulerTasks which regulary check documents if they are "old enough" and then move them into some archive folder.
    Hope it helps
    Detlev
    PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

  • Online Archive - Deleted Items Folder

    Hello,
    I have setup retention policy and tags.  It seems to be working okay, almost.  A default retention tag applies which archives items after one year.  This seems to be working ok for folders such as inbox, and sent.  However, it does not
    seem to be working for the deleted items folder.  
    I've also created personal tags to archive after various periods.  Users try to apply those personal tags to the Deleted Items folder, but the managementAssistent never listens to that personal tag on the deleted items folder.  Personal tags do
    work for other folder (custom and inbox, etc).  And the managementAssistant does run as expected... just not on the deleted items folder.  This happens for another (6 month personal tag to archive deleted items folder), and same for my mailbox (1
    week personal tag to archive deleted items folder).
    Any suggestions?
    Drew

    Hi,
    Deleted items folder is managed by "Deleted Item Retention" Either on DB level or mailbox level
    http://technet.microsoft.com/en-us/library/ee364752(v=exchg.141).aspx

  • Archiving cleared items.

    Hi all,
    I want to remove cleared items from tables BSE_CLR,
    BSAK and BSAS, I used archiving object FI_DOCUMNT
    (that I got from transaction DB15).
    I was able to remove a cleared item from BSE_CLR.
    But entries for the same cleared item still exist in BSAK and BSAS tables.
    Can anyone tell me how can I get this data removed drom these two tables?
    Thanks,
    Deepti.

    Hi Deepti,
    I completely agree Samanjay, in addition to trail mail plaese see few more information:
    BSIS, BSAS, BSIK, BSAK, BSID, & BSAD are the tables related to secoundary index. These index are built in order for Customer, Vendor and GL Account when FI document posting is done. This index will allow to account -specific access to the data and to improve the access.
    This table can be deleted by Postprocessing program for the archived data. FI_DOCUMNT is the archiving object for this.
    Reward if it is useful.
    -Thanks,
    Ajay

  • Archive page - items are not linked

    I have published to a non-.mac site and cannot understand why the items in the archive page aren't linked. The result is that one cannot access any of the blog posts that are no longer on the main page. However, interestingly enough one can double click on the posts on the archive page while in iweb and they will take you to the respective entry.
    Thank you in advance for your help.
    Iweb 1.1.2
    Cyberduck for Uploading
    P.S. Wrong forum I know, but has any solution been developed yet for the wireless-n's unreliability associated with os x 10.4.10?

    Hi Miranda,
    Did you used same parameters in CSV file when you tried to upload second time like product number, price,etc.
    If there is some changes then need to check with that.
    Did you publised that perticular catalog once again (If not then please do it). Also you need to publish your master catalog if you are searching items from that catalog.
    Please let me know if once done.
    Award few points if relavent ans,
    Navneet.

  • Archiving Calendar items - Outlook

    Hello,
    Very frustrated here, and hoping the community can help me.  I have Outlook 2011 on my Macbook Air on Mavericks (not that the OS matters).  I'm trying to clean up space on my Exchange (work) account, as it's nearly full.  Most of the space is being used from old calendar items with attachments. 
    How do I archive PARTS of my calendar? I don't want to archive everything, just everything prior to Dec 2013. Is it possible? I can't find a solution anywhere.
    Much appreciated,

    I am running Outlook 2003 and cannot sync my new 5G IPOD. I've tried archiving all but future appointments but it still runs briefly then says it can't copy the Outlook calendar.
    I also tried to export a .csv file from Outlook directly to the IPOD in disk mode but that didn't work either. Apple documentation says we need to use a .vcs or .ics file. Outlook does not support those formats.

  • Archiving line items distributed through ALE

    Hi All,
    Can anyone share any document/tell me the steps involved in archiving transactions posted using ALE, i.e transactions posted from other systems/client
    For eg,
    Restrictions for the archiving object states that 'CO line items that were distributed using ALE cannot be archived' -
    Can anyone let me know how to archive and delete such transactions?
    Thanks in advance
    Regards
    Anupama

    Hi,
    Regarding your issue of how to read data out of acrhives please consider the notes 422836 (Profit Center archiving: How
    to read archived data), 401961 (how line item reports read from archive) and 203545 (general information about archiving and archiving objects).
    regards
    Waman

  • Archiving List Items

    I have a filtered list setup. New entries to the list will have a sequence number followed by the year. For example: 001-15. For the filtered view, this works fine. When I click the list name and view all list items (unfiltered view), what I have in the
    list is the following:
    001-14
    001-15
    002-14
    002-15
    Is there a way to archive the 2014 items so they don't show up in the list?

    You could modify the All Items view with a Filter where your Column contains -15
    Not ideal as you would have to modify it each year. So when 2016 came around you would need to change the filter to -16.
    I did try to setup a dynamic filter (but didn't work for me) where the Column contains ="-"&TEXT(NOW(),"yy")
    Maybe someone else could provide you with a more dynamic way so you didn't have to modify each year.

  • Archiving old items

    Can I save old calendar items or does iCal automatically delete them after a period of time?

    If you look at iCal's Advanced preferences, there are options to delete events and to do items after a period of time you choose. If you don't check those options, I would think they would stay. Just to be safe, you could go to file>export>iCal archive and periodically save your calendar.

  • Archive Calendar Items

    I have had my Curve since before Christmas 2008. I really like it BUT one thing that frustrates me is that it SEEMS to delete calendar items older than two months. Are they going off into an archive I have not found? Can I send them to Outlook archives? This is one of those conundrums that is annoying because I can't figure it out by myself.
    Please tell me it is possible to archive older calendar items.

    open your calendar, click menu button, options, general
    in here there is a settings on how long to keep messages... you would need to set it to never if you want it to just keep building, 
    also in DTM, under syncronization settings, calendar setup, you can select ... sync all events, future events or you can set a range of dayd before and after

  • Exchange 2010 archiving: sent items missing

    Hi,
    I have created an archive for a user with rule to archive anything older than a year. However I haven't noticed the sent items folder does not exist in archive, so the consequence is there are no sent emails older than a year. 
    So the question is, how can I recover them?
    Thank you in advance!

    Hi,
    I have created an archive for a user with rule to archive anything older than a year. However I haven't noticed the sent items folder does not exist in archive, so the consequence is there are no sent emails older than a year. 
    So the question is, how can I recover them?
    Thank you in advance!
    What sort of archive? PST or In Place Within Exchange? You generally wouldnt use a rule to archive however.
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • Can you archive old calendar items in Entourage so you don't run out of space on your Blackberry?

    Hi everyone,
    I have a Sprint Pearl 8130 and I am syncing with PocketMac to Entourage 2004 on an iBook G4 running OS 10.3.
    Most of my syncing issues are minor (for some reason, in contacts, work and home email addresses switch fields, but I can live with that) and I don't have too many complaints about PocketMac for now....
    My question is - Does anyone know how to archive old calendar items so that my Blackberry doesn't run out of space? I have calendar items going back to the beginning of 2008.  I don't need past calendar items on my Blackberry, except for reoccurring items, like birthdays and such, and maybe a month's worth of old appointments just for reference.  My Blackberry has run out of space a couple of times and when it deletes the appointments from my Blackberry, syncing wants to either delete from the Mac or restore to the Blackberry.  I know you can do this with a Palm and their Palm software, since I used to have one and I was able to archive items older than a week.  Then you would be able to access them in a separate archive profile.
    I have searched everywhere and the closest thing I can find is to purchase Missing Sync and set to match my sync date range.  https://support.markspace.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=327.  But that doesn't really solve my issue of running out of space on my Blackberry.  The other thing that I could think of is to export the calendar items into a .rge file, then delete the calendar items from there, sync, and have PocketMac remove items from my Blackberry, but it would be a pain to easily access old calendar items.
    I appreciate any thoughts, ideas and especially solutions!

    I have the exact opposite issue you mentioned
    my client wants his archived calender items to be synched to his 8830 world wide ed.
    he is running RIM software (DesktopManager) v 6.4
    BES 2007
    current issue is that his archived old calendars are not synchronizing to his handheld; we tried to force his PC to synch those items manually through cable, which didn't help, since our BES policy force waireless synch policy to the device and wireless synch never can see the archived items files
    I think if you can set the option on your device so it turns on the calendar wireless synch, and also make sure MAC does not select archive to synch
    Calendar > Options > General settings or /Wireless synch set to ON;
    if you running BES set Calendar Wireless synch off

  • Archive Items in the Unix Directory

    Hi,
    I have archived workflow items in the Unix directory, this archived files are stored in ASCII format.
    Is there any tool to convert this ASCII format to readable format, without retrieving archived data back.
    Thanks

    posted this same question under workflow.

  • Create Archive, how to change the behavior of the default file naming?

    From an earlier post on archiving via the contextual menu in the Mac OS X Finder:
    "If you archive a single item, the archived file has the name of the original item with a ".zip" extension. If you archive multiple items at once, the archived file is called Archive.zip."
    Is there a way to change the behavior of this?
    I ask because I want to archive a single file, say "photo.psd" and when I do I get an archive called "photo.psd.zip" - is there a way to create an archive from the contextual menu and have the original file extension be appended? - in this case I would want "photo.zip" to be the end result.
    Also, is there a way to change the behavior of archiving multiple files? To, say, create a differently named file afterwards instead of the default "Archive.zip" - perhaps something a little more descriptive but standard, like "YourFilesCompressed.zip" - something that would stay the same across each archive creation.
    Thanks, I've been manually renaming after all create-archive's. And I do realize other applications could probably do this, but I'm thinking there must be a way to do this in the finder, no? A terminal command? Any ideas would be appreciated.

    Try looking at the documentation for the ditto and zip Terminal commands.
    (14504)

Maybe you are looking for