Quick question: When are xib files loaded?

As applications grow in scope and interface breadth, I wonder if separating out optional interfaces into different nib files could improve performance.
I can't tell if it does, however, or if it supports multiple nib files per project just for organization or something.
If it does, does it:
-Only load the nib after the object is initialized?
-Only load the nib after the object is visible?
-Load the nib file multiple times for different object instances? Redraw it or something?
What is the primary performance hit for nib files? Their size, graphical complexity (opacities and stuff), something else?

NIB files are full of archived objects. Using the initWithNib: method of a viewController and remembering to release an IBOutlets in the dealloc method will insure proper memory handling. To get to your question, when you load a NIB it will bring all objects in that NIB into memory. So if you design your whole interface in one NIB, then you are requiring the entire interface to load at once. The main reason to split your interface into multiple NIBs is to avoid this hit. This is more of an issue on the iPhone than on a Mac, but the principle is still the same. And if you create multiple viewController objects and initWithNib: them, then you will have multiple copies in memory. Likewise if you use the NSBundle class to explicitly load NIBs, each load call will create new objects. So if you have an interface element you reuse a lot, you can load it from one NIB many times. But the memory comment still holds true -- each load allocates memory for the NIB objects.

Similar Messages

  • Hi there, I just bought an iMac 2011.  Just a quick question.  Are those keyboard and mouse batteries that comes with the package are rechargeable?

    Hi there, I just bought an iMac 2011.  Just a quick question.  Are those keyboard and mouse batteries that comes with the package are rechargeable?  Thanks!

    Mine was bought last year and they were not; it they don't say "rechargeable". they're not. I started to use rechargeable as soon as the original batteries died.

  • Quick Question: When to use ( ) and when to use [ ] and why the ( *)

    Hi all,
    A quick question that i'm sure is very simple but is slightly confusing me. I've just started trying to learn Objective-C and am a little confused by ( ) and [ ].
    I get that you use the [ ] brackets when you want something specific from an object, i.e.
    [ textField textColor ]
    and that you use ( ) brackets for things like:
    if ( x == y) {
    But I get confused when I see things like:
    NSLog(@"some text here");
    Why does that get ( ) brackets and why is it not [ ].
    Also another point of confusion, creating methods... Why are some methods done like:
    - (void)awakeFromNib
    And others done like (with the additional "*" added):
    - (NSString *)stringvalue
    As I said, I'm sure this is very simple and obvious, but it is confusing me slightly.
    Thanks in advance!

    Adam:
    As you already know, square brackets are used to send a message to an object, so if a object like myObject implements the method -doSomething, you can call it with:
    \[myObject doSomething\];
    The other use square for brackets have is to index C-style arrays, such as:
    aValue = anArray\[10\]; // Get the 10-element of an array
    However, because C-style arrays are rarely used in Cocoa applications (use NSArray instead) you will not see this situation often.
    Parenthesis in expressions are used to group and prioritize, such as:
    x = 10 * (3 + 5); // x = 80
    If () statements use it to delimit the test expression. Same with while (). for () uses it to enclose the limits and increment statements, etc.
    The other important use of parenthesis is in calling a C function:
    result = foo(3);
    means that you are calling the function named foo with the argument 3, and storing the the return value in the variable 'result'. This is different from a message because a C function is not a method of an object. They exist independently of any objects. NSLog() is a function defined within Cocoa but it is not a method. So, you call it with the traditional C function call syntax. Cocoa defines other functions like NSStringFromRect(), which takes an NSRect as argument and returns a pointer to an NSString.
    And that leads me to your last question. Some methods return simple types, like int, float, or void (i.e. returns no value). These methods will have prototypes like:
    \- \(void\)returnNothing;
    \- (int)returnInteger;
    Other methods return pointers to types, like:
    \- (int \*)returnPointerToInteger;
    \- (void \*)returnPointerToAnything; // In obj-C one typically uses id instead of void*
    Returning whole objects from methods has problems and it is better to just return a pointer (the address in memory) instead:
    \- (NSString *)makeAString;
    The method above returns a pointer to an NSString rather than the entire object.
    Good luck with your learning,
    Juan-Pablo
    Message was edited by: Juan Pablo Claude

  • Flex app behaves differently when Adobe automation files loaded

    We have an application built with Flex 3.1. I am attempting to create QTP tests for this application.  The instrumentation files are loaded at run time, not compiled into the application.
    I am using QTP 9.5 with the Adobe Flex Add-in 3.0.  I am able to see the controls an run tests to some extent.
    The main issue I am trying to resolve is that there is a difference in behavior of the application when it is started with the instrumentation files. The differences occur both inside and outside of the QTP environment.
    The observed differences are:
    The initial page is a login screen. After entering the id and password, I can click ‘Enter’ or click the “Log in” command button. With the instrumentation files loaded, the ‘Enter’ key no longer works.
    When I log out of the application, a progress screen displays while the environment clean-up occurs.  When the progress bar hits 100%, the original login screen is displayed. With instrumentation files loaded, activity stops when the progress bar hits 100% and the original login screen is never displayed.
    After logging in, a window with perspective tabs displays.  Each perspective tab page contains a window containing a list of resource associated with the perspective. When instrumentation files are loaded, the tab pages exist, but the perspective windows are not created.
    I realize I am dealing with application-specific behavior here and I am pursuing this with our developers. What I am looking for is any information related to differences in application behavior when instrumentation files are loaded.

    I can't seem to reproduce what you are seeing with this sample application:
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark">
        <s:states>
            <s:State name="state1" />
            <s:State name="state2" />
        </s:states>
        <s:controlBarContent>
            <s:Button label="change state" click="currentState=currentState=='state1'?'state2':'state1'" />
        </s:controlBarContent>
        <s:Button x="50" y="50" label.state1="state1" label.state2="state2" skinClass="CustomButtonSkin" />
    </s:Application>
    Can you provide a similar sample application that demonstrates the issue?

  • Quick Question **PLEASE HELP** .jar file?

    Hey everyone, im pretty new to the java scene but I have a really quick question that hopefully someone can help me with.
    I'm really interested in making a .jar file out of my code. And basically I just want to make one. but i understand there are certain things like main class's, etc. that need to be made in order to make a .jar file.
    So basically Say I opened up a new project in blueJ. I made 1 new class called "main." Inside of it I had nothing for conductors and no variables declaired untill the bottom part where i write my code.
    say i write...
    System.out.println("hello");
    and that is it.
    What steps from there do i do to make a jar file and have it be able to be executed and SEE the "hello" printed somewhere NOT in blueJ??
    (I understand there is something about a "static" method? Im not really sure but if somoene could enlighten me on how to make a .jar file that would be great.)
    Thanks a lot everyone!
    Tom

    I don't know anything about BlueJ, but this section of Sun's tutorial explains how to
    write a program that outputs a single line of text to the console:
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
    Deploying an application as an executable .jar file is covered here:
    http://java.sun.com/docs/books/tutorial/deployment/jar/index.html
    The first two sections - "Using JAR Files: The Basics" and "Working with Manifest
    Files: The Basics" - contain the information you need to understand this process.

  • Quick question when purchasing prints through iPhoto

    Just a real quick question.
    When I select photos I want to purchase from my iphoto collection, i know it hooks into Kodak. My question is, is an account created for me on Kodak's site that keeps my collection and allows me to log in from anywhere to view photos, buy photos? Does it allow me to share albums that friends and family can view and buy photos from as well?
    I've never used the service before, but I would like to, assuming it allows me to do the above stuff I mentioned.
    Thanks,
    Jason

    Create an album and drag the photos you want to print to it,  crop  them to the print dimensions, select all of the photos in the album and order your prints
    LN

  • IPhone apples stable when using xib files

    okay I have am app that I wrote using views with controls added on the initWithframe and it will run no problem for 100+ games. Created a new project and used the xib files to load setup the interface and now it will crash at about 20 games or sooner if I flip to the backside view. The memory usage seems to go upto just over 20 megs
    Anyone else notice the difference between using xib files and not using them?

    Okay - I think I found it! This little code causes memory leak.
    [[NSURLCache sharedURLCache] removeAllCachedResponses];
    Adding this little piece of code in (delegate.m) to avoid caching solves the leak problem.
    [[NSURLCache sharedURLCache] setMemoryCapacity: 0];
    I'm guessing the UIWebView is calling the removeAllCachedResponses, which is probably trying to do something that's causing the leak. Not digging any further as this solves my problem.
    After 2 days, 1 line of code solved the problem. Not worth it
    References:
    http://lists.apple.com/archives/cocoa-dev/2005/Dec/msg00373.html
    http://www.cocoabuilder.com/archive/message/cocoa/2002/3/15/62361

  • When are renderd files saved ?

    pe 11
    I want to know when PE saves the rendered files (I mean rendering for editing, not the final rendering for export) and when the program doesn't save the rendered files.
    You should expect that PE saves also the rendered files at the moment you save (or/and autosave) but in my project I estimate only 2/10 of the timeline is green after loading the project again. So most rendered preview files are NOT saved in my case ...
    So I have to start rendering everytime and this takes than longer and longer before I can start work ...

    fredowww66
    Again, the preview files generated when you direct the program to give you the best possible preview are not deleted or damaged in their hard drive save location when you save/close a project with the "rendered look" and then reopen it to find the "unrendered look". There appears to be a disconnect between the project and those "rendered files", be those rendered files DV AVI from a SD project or MPEG2.mpeg from a HD project....either that or there is a problem with the indicator line itself programming.
    Reports of this issue peaked around Premiere Elements 7 and have presented less frequently from then until now. But, it does happen even today with Premiere Elements 11 and 12 without a real explanation for how, when, or where.The problem has never been confined just to the use of .psd files in Premiere Elements. Today, I revisited the issue specifically for Premiere Elements 11 on Windows 7 64 bit some .psd files versus their .jpg counterparts.
    a. When I took 4 .psd files into a project, rendered - orange indicator line to green, saved closed the project and then reopened it, the 4 .psd files presented with orange line over their contents. At the same time, the preview files generated automatically by the rendering process were still alive and well in their hard drive save location.
    b. When I took the same 4 .psd files and converted them to .jpg files, and repeated "a", the 4 .jpg files presented with a green line over their contents immediately before save close and immediately after reopening. But, based on the history of this problem, we cannot be sure that will be the case all the time for all the versions with the different computer operating systems.
    Yes, in this situation, if you want to render the Timeline content for the reopened project, the program will let us and will generate another batch of preview files to add to the existing ones which appear to be disconnected from the reopened project.
    Considerations
    1. Ignore and proceed knowing that you saw the best possible preview before the save close of the project. But, if you edit that re-rendered content, you will get the orange render indicator line anyway and will have to render to get the best possible preview of what you just edited.
    2. If you do not want to render the whole Timeline with its orange line over it, you can render selectively by setting the gray tabs of the Work Area Bar to span just the content to be rendered.
    3. You can render the whole Timeline in the re-opened project.
    Some just in case notations...Rendering is not going to improve the quality of the end product. It is just an opportunity to catch a problem sooner than later. It is particularly indicated for titles, transitions, effects, and non native formats.
    My take on the situation is that you will need to find a way to adjust your workflow according to what is. Based on history and this issue, there is no evidence to suggest otherwise.
    By the way, if you are preparing your images in Photoshop, do not apply the CMYK color model. Premiere Elements (any version) does not support it.
    ATR

  • When are Redolog files reset to zero size? Manual reset possible?

    As far as I know redolog files contain all stuff which is changed during operation of an Oracle database.
    However I wonder if there are events when these files are AUTOMATICALLY reset to zero.
    I guess it is when I do a full offline backup.
    Is this correct?
    Are there any other events when this happens automatically ?
    How can I manually reset/initialize Redolog files to an empty state?
    Peter

    What did you mean empty redo logfile?
    if you mean zero size on redolog files....
    We can not reset redo log files to empty (zero).
    I guess it is when I do a full offline backup.That mean your database offline... no operation, so no redo log generate. but not mean you can make redo log empty anyway...
    If you mean redo log file no need for instance recovery.
    redo log groups have "INACTIVE" status -> is no longer needed for instance recovery. It may be in use for media recovery. It might or might not be archived.
    check from v$log
    UNUSED - Online redo log has never been written to. This is the state of a redo log that was just added, or just after a RESETLOGS, when it is not the current redo log.
    CURRENT - Current redo log. This implies that the redo log is active. The redo log could be open or closed.
    ACTIVE - Log is active but is not the current log. It is needed for crash recovery. It may be in use for block recovery. It may or may not be archived.
    CLEARING - Log is being re-created as an empty log after an ALTER DATABASE CLEAR LOGFILE statement. After the log is cleared, the status changes to UNUSED.
    CLEARING_CURRENT - Current log is being cleared of a closed thread. The log can stay in this status if there is some failure in the switch such as an I/O error writing the new log header.
    INACTIVE - Log is no longer needed for instance recovery. It may be in use for media recovery. It might or might not be archived.;)

  • Debugging mode stopped automatically when using xml file load

    Dear Sir,
    I am trying to develop a new add-on using xml files for creating new forms. In fact I was using the sample code delivered with the SDK ( WorkingWithXml - under VB.NET). The Problem is that when I am in the debuging mode and after the form load. the application goes out of the debugging mode and stop action.
    In fact what i was trying to do first is to create a new menu and then when i click on this menu a new form appear but once the menu is loaded the application stop the debugging mode automatically.
    Can somebody clarify to me what I am doing wrong and why the debugging mode is stopped automatically, noting that i am still in the add-on developpement phase.
    As i mentioned above i used the WorkingWithXml sample code (VB.NET) and i have adjusted in a way to load menu and then on the menu click i load my form.
    Please advice
    Best Regards

    Hi Mary,
    Put your code between in a Try Catch block. In the Catch part use the following:
    oApplication.MessageBox("CompError: " & oCompany.GetLastErrorCode.ToString & ", " & oCompany.GetLastErrorDescription & vbCrLf & "Message: " & ex.Message)
    This should give you a clearer idea of what the error is all about.
    The most likely reason is that there is something wrong with your XML file.
    Regards,
    Vítor Vieira

  • When are RAW files modified?

    I know that Lightroom is based on the idea of non-destructive editing.
    However, even tho I'm still a LR newbie, it does look to me like there
    are a few cases in which LR does modify a RAW file as it came from the
    camera (e.g., the NEF bug). Where would I find an accurate list of the
    operations that do cause a modification of RAW files. (For example, is
    inserting metadata on import one of these?)
    (This is my first post here. Does anybody else find it odd that the
    posting software considers "Lightroom" and "metadata" to be misspelled?)
    Many thanks.
    --Milt--

    Milt,
    >(This is my first post here. Does anybody else find it odd that the posting software considers "Lightroom" and "metadata" to be misspelled?)
    Yes :)
    >I know that Lightroom is based on the idea of non-destructive editing. However, even tho I'm still a LR newbie, it does look to me like there are a few cases in which LR does modify a RAW file as it came from the camera (e.g., the NEF bug).
    Is the term 'nondestructive editing' being used correctly here? The way I typically see the term used in Adobe's literature and doc is not applicable to RAW files.
    Before CS3 Photoshop did/does destructive editing with its filters. With Photoshop filters if you apply certain effects and filters they degrade the image in memory so if you try to apply an opposite filter or undo the effect, tough luck. Nondestructive editing in CS3 (and in Lightroom) allows application of effects and filters in a 'virtual' manner that can be backed out, applied multiple times or changed without image degradation.
    None of this applied to RAW files because Photoshop and Lightroom do not touch the *image* bits of any camera manufacturer's RAW file (metadata changes aside). You cannot open a RAW file like a .NEF in Photoshop and save it as a .NEF RAW file -- it has to be saved as PSD, TIFF, DNG or whateverand you can do destructive editing in those formats with filters, rotations, etc. The original RAW file itself, however, always remains intact. So no PS or LR editing can be destructive in that sense.
    Lightroom virtualizes all of its edits so you can back out any LR edit without degrading image quality. That is nondestructive editing -- again, of the image itself. That said, changing camera metadata in a RAW file is not something I can see immediate use for, I admit. But even that doesn't touch the actual RAW image bits.
    >>For myself, I will not start using LR on anything except experimental copies of my photo library until I am fairly confident I have this list in hand so I can avoid doing the things on the list.
    Your call, of course. But the only way to avoid something bad happening to your file is to have a copy of the file somewhere else. A lot of things can damage your file that have nothing to do with LR. I have copies of all my photos on a separate computer. My next step wrt that will be to burn Blu-Ray disks to keep offsite.
    I also have 5500 photos that Lightroom is doing quite an amazing job with for me overall. Printing (certainly with titles) is the weakest link in LR (I've made some feature enhancement requests/recommendations for the Print module in that area) but the rest of the program has removed most of the hassle, drudgery and unnecessary expense/waste from photography and made it a truly new, fresh joy again, just like it was for me 30 years ago when I bought my first SLR.
    Cheers,
    Robert

  • I found the answer to my question where are the file, edit tools, etc menus

    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    file, tool, edit menus can be found by hitting the alt key
    == Firefox version
    ==
    3.6.3
    == Operating system
    ==
    Windows XP
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB7.1
    == Plugins installed
    ==
    *-Logitech Device Detection
    *Version 1.1.2.0
    *NPRuntime Script Plug-in Library for Java(TM) Deploy
    *Adobe PDF Plug-In For Firefox and Netscape 8.2.2
    *Default Plug-in
    *The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
    *Google Update
    *Shockwave Flash 10.0 r45
    *iTunes Detector Plug-in
    *Picasa plugin
    *Next Generation Java Plug-in 1.6.0_19 for Mozilla browsers
    *DRM Netscape Network Object
    *Npdsplay dll
    *DRM Store Netscape Plugin

    Your question is number 866019.

  • Quick Question : Upload/Download text files

    Hi,
    can I use interMedia to upload text files on the Database. I don't need to query them for size or
    whatever metadata but I'd like to retrieve them without any harm done :-)
    I don't expect any problems but would still like to confirm.
    Thanks,
    Steve

    Which interMedia object are you using to store the content?
    No we don't do anyting to the content. You won't be able to use it easily within the database. You won't have any character set support. You will need to specify the mimetype yourself.
    But it should work for raw storage and retrieval.

  • HT2905 When I click File, I don't see Display exact duplicates. Help!?

    I tried following the instructions in the Apple support forum for removing duplicates in iTunes, but I got stuck very quickly. When I click File, I do not see the option of displaying exact duplicates, which is what the Apple fourm suggests. Advice welcome.

    Thanks Kappy. I had just found it but thanks reply.  Next question is:  Is there a quick way to then delete the duplicates without having to select each one and delete?

  • TS1367 My macbook air doesnt turn on, are my files save?

    My macbookair doesnt turn on, tried all the reseting stuff, nothing happens. My main question is are my files save? I am a photographer and havent backed up, just got the computer 2 months ago, havent saved the last three weeks up.

    Hi
    A possible reason for why your macbookair does not turn on is hard drive failure. However based on what you're saying it may not be that? When you say nothing happens what do you mean exactly? Do you hear the boot chime at all when powering it on? When you say you've tried all the resetting stuff what did you try exactly? Have a you tried a PRAM reset?
    If you've tried a PRAM reset and you can't hear the boot chime or you depress the power button and absolutely nothing happens then there is a real possibility your data is safe. However, unless you take it to an Authorised Apple Repair Specialist or a Genius Bar at an Apple store, you won't really know.
    Seeing as it's only 2 months old I would have gone there first.
    HTH?
    Tony

Maybe you are looking for