Please help me ! how to fix the position of NSWindow ?

Hello everybody,
I have a NSwindowController < NSWindowDelegate > (with windowWillUseStandardFrame implemented) which is supposed to fix the position of my window.
Except never this method is called ! Nevertheless there is indeed a delegate...
In fact in the launch of my soft, the system makes little as it wants: it cascades me windows or keeps me the last position of every window.
I tried to deactivate the cascading, the same problem...
All the directives concerning the NSWindow seem to be ignored !
I do not know if it is a pure coincidence, but since I passed of a macBook 13p under 10.6 (XCode 4.0.1) in a mini mac with screen 24p under 10.7 (XCode 4.3), everything seems not to work any more as before ?!
I wish I can align in the topleft of my screen all my windows (I tried all the concerned methods, the same problem) to loosen me of the resolution of the screen.
If you have an idea, it will be welcome.
Thanks you in advance.
FM.

OUNAS wrote:
I find very openly the management of the positioning of a window very complex while it is a basic task !
Thanks.
FM
Bonjour Ounas,
It is not complex, within Cocoa simple things are easy to implement (and complex are possible). If you find it the other way you made a mistake somewhere.
In your case I would start by putting a breakpoint in the methods and run the application in Debugg Mode.
And if :
- your method is not called
- your window is 0x0 inside the method
Closely look in Interface Builder if the connection is correct between your window and its variable in code and if your controller object is well assigned as its delegate. For that just select the window object in the nib and do a right/control click on it to see if it is well connected with controller's objects (alternatively use the Menu -> View -> Utilities -> Show Connections Inspector).
As for the time to call your "fix" method what about the "- (void)windowDidLoad" call in your window controller subclass ?
I had lots of troubles to get it called when I started with Cocoa. For it to works you have to be sure the window is well connected in IB to your window variable. And you need to load that f*¿!^ fichue window by any call to it via your controller like
//After call window is 0x0 in the debugger if you look at it by unfolding the triangles self>controller>NSWindowController
controller = [[RTWindowController alloc]init];
//This one will trigger the controller's windowDidLoad method
[controller showWindow:self];
//a simple [controller window] is enough to bring it to life
hth
laurent

Similar Messages

  • Please help me how to fix the yahoo messenger video call camera was not working have a line appear color green

    My new iPad air is not working the yahoo messenger video call pls help thanks

    Hello Evaorange
    If you are having an issue with the app downloaded form the App Store, check out the general troubleshooting article below to resolve the issue. If the camera is not working in that app, check other apps to see if the camera is working besides in that app.
    iOS: Troubleshooting apps purchased from the App Store
    http://support.apple.com/kb/ts1702
    Regards,
    -Norm G.

  • Please help me how to fix error 53 iphone 6 ios 8.1

    please help me how to fix error 53 iphone 6 ios 8.1 when update iphone 6

    Hey there fcaride,
    It sounds like you are unable to finish restoring with iTunes due to this error -1 message. Usually that is associated with security software. Use the steps from the following article to help with that:
    Get help with iOS update and restore errors
    Related errors: 1, 3, 11, 12, 13, 14, 16, 20, 21, 23, 26, 27, 28, 29, 34, 35, 36, 37, 40, 1002, 1004, 1011, 1012, 1014, 1667, or 1669.
    These errors mean that your device or computer might have a hardware issue that stops the update or restore from completing.
    Check that your security software and settings aren't blocking your device from communicating with the Apple update server.
    Then try to restore your iOS device two more times while connected with a cable, computer, and network you know are good.
    Make sure that your security software and settings are allowing communication between your device and update servers.
    If you still see the error message when you update or restore, contact Apple support.
    If the issue persists, I would next use the last section of the following article titled "If your device turns on but gets stuck during start up"
    If your iPhone, iPad, or iPod touch doesn't respond or doesn't turn on
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • Please help me how to take the "Spot Color" in illustrator?

    Hi,
    Please help me how to take the "spot color in illustrator CS" using vb script (or) java script.
    Regards,
    Prabudass E.

    Prabudass,<br /><br />If you are just wanting to see if the illustrator file uses spot colors - run the Delete Unused Panel items from the default actions. then view the swatch palette in small or large List View. The color names that have a square containing a gray circle (spot) to the right of their color names are spot colors. <br /><br />The following will get the spot color name of an existing swatch named "Color1" and change it to "Nicks Swatch" and will assign the CMYK values stated.<br /><br />if (app.documents.length > 0){<br />var swatches = app.activeDocument.spots;<br />for(i=0;i<swatches.length;i++){ var currSwatch = swatches[i]; if(currSwatch.name == "Color1")<br />{currSwatch.name = "Nicks Swatch";<br />     var newColor = new CMYKColor(); <br />     newColor.cyan = 35; newColor.magenta = 0; <br />     newColor.yellow = 50; <br />     newColor.black = 0; <br />     currSwatch.color = newColor; } }}<br /><br />When this script has run the swatch palette will not immediately reflect the changes to the swatch name until you double click on a swatch and click OK or Cancel in the Edit Swatch dialog.<br /><br />I hope that I have understood your question correctly and that these responses are helpful.<br /><br />Good Luck<br /><br />Nick

  • Please help me how to improve the performance of this query further.

    Hi All,
    Please help me how to improve the performance of this query further.
    Thanks.

    Hi,
    this is not your first SQL tuning request in this community -- you really should learn how to obtain performance diagnostics.
    The information you posted is not nearly enough to even start troubleshooting the query -- you haven't specified elapsed time, I/O, or the actual number of rows the query returns.
    The only piece of information we have is saying that your query executes within a second. If we believe this, then your query doesn't need tuning. If we don't, then we throw it away
    and we're left with nothing.
    Start by reading this blog post: Kyle Hailey &amp;raquo; Power of DISPLAY_CURSOR
    and applying this knowledge to your case.
    Best regards,
      Nikolay

  • Please help me how concatenate all the error messages and send it as out parameter value.

    Hi Experts,
    Please help me how concatenate all the error messages and send it as out parameter value.
    Thanks.

    Agree with Billy, exception handling is not something that is done by passing parameters around.
    PL/SQL, like other languages, provides a suitable exception handling mechanism which, if used properly, works completely fine.  Avoid misuing PL/SQL by trying to implement some other way of handling them.

  • WiFi is disabled, i am not able to on my WiFi my version is IOS 6.1.2 latest version. Please help me how to fix this.

    WiFi is disabled, i am not able to on my WiFi my version is IOS 6.1.2 latest version. Please help me how to fix this.

    see this support article:
    http://www.apple.com/support/iphone/wifi/

  • WiFi is disabled, i am not able to on my WiFi my version of IOS 6.1.2 latest version. Please help me how to fix this.

    WiFi is disabled, i am not able to on my WiFi my version of IOS 6.1.2 latest version. Please help me how to fix this.

    see this support article:
    http://www.apple.com/support/iphone/wifi/

  • How to fix the position of table columns.

    Hay all,
    Can anybody tell me that how to fix the position of columns in a table.By default the columns can be moved to any position in the table.
    Regards,
    Sharad Agarwal

    table.getTableHeader().setReorderingAllowed(false);this will do...
    Regards,
    Byju

  • How to fix the position of different component?

    Hay all,
    Can anybody tell how to fix the position of any component so that they cant be moved from there initial positiion
    Regards,
    Sharad Agarwal

    Set layout to null and set bounds of the component to whatever you like.

  • How to fix the position of JInternal frames added in JFrame

    Hay Frnds, I am having a problem. I have a JFrame ,in which i have added five JInternalFrames. My problem is that i want to fix the position of thaose Internal frames so that user cant move them from one place to other. Is there any way to fix there position. Plz reply as soon as possible. Its very urgent.
    Thanks.

    In Jframe I added one rootPanelI don't know what a rootPanel is or why you think you need to add one.
    The general code should probably be something like:
    frame.add(userPanel, BorderLayout.CENTER);
    frame.add(buttonPanel, BorderLayout.SOUTH);
    frame.pack();Read the section from the Swing tutorial on [Using Layout Managers|http://java.sun.com/docs/books/tutorial/uiswing/TOC.html] for more information and working examples.
    For more help create a [SSCCE (Short, Self Contained, Compilable and Executable, Example Program)|http://sscce.org], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • How to fix the position of controls, so table expands into whitespace and doesn't push lower controls down (invoice report in SSRS 2005)

    I am designing an invoice report. There are some controls at the top of the report (company logo, date, invoice number etc), followed by a table listing the items in the invoice, followed by some controls at the bottom (subtotals, returns address etc). The report should always print onto a single page.
    I want the controls at the bottom to have a fixed position on the page. There is sufficient whitespace between these controls and the table above for the table to expand to list many items. However whenever it expands it pushes the lower controls down. This results in them spilling onto a second page.
    Is there a way to fix the position of controls and suppress the "gets pushed down when controls above expand" effect?

    Thanks for that. I found a good solution using rectangles here: SQL Server 2005: Report Design Best Practices and Guidelines
    Here's the relevant part (see underlining):
    Using Rectangles to Keep Objects Together
    Rectangles in Reporting Services can be used either as graphical elements or as containers of objects. As object containers, they keep objects together on a page and control how object move and push each other.
    To keep multiple objects together on a page, put the objects within a rectangle. You can then put a page break before or after the rectangle by using the PageBreakAtStart or PageBreakAtEnd properties for the rectangle.
    Using Rectangles to Control Item Growth and Displacement
    Items within a rectangle become peers of each other and are governed by the rules of how peer items are positioned on the page as they move or grow. For example:
    Items will push or displace each other within the rectangle.
    Items will not push or displace items outside the rectangle, because they are not their peers.
    If necessary, a rectangle will grow to accommodate the items it contains.
    You can use this logic to your advantage when dealing with objects that expand. For example:
    If you want to leave a blank space in your report for a table to expand into, group the blank space and the table in the same rectangle. When the table grows, it will push the blank space .
    If you want to prevent a matrix from pushing items off the right edge of the page, put the matrix within a rectangle with blank space to its right. Now, the matrix is no longer a peer to the other item on the page and will not be able to push it until the matrix can no longer be contained within its rectangle.

  • How to fix the position of JInternalFrames added in JFrame.

    Hay Frnds, I am having a problem. I have a JFrame ,in which i have added five JInternalFrames. My problem is that i want to fix the position of thaose Internal frames so that user cant move them from one place to other. Is there any way to fix there position. Plz reply as soon as possible. Its very urgent.
    Thanks.

    import javax.swing.plaf.basic.*;
            BasicInternalFrameUI internalframeUI = (BasicInternalFrameUI)frame1.getUI();
            internalframeUI.getNorthPane().addMouseListener(new MouseAdapter() {
                public void mouseReleased(MouseEvent evt) {
                    frame1.setBounds(0, 0, frame1.getWidth(), frame1.getHeight());
            });

  • 10.10.1.2:8090 uses an invalid security certificate. The certificate is not trusted because no issuer chain was provided. The certificate is only valid for a id="cert_domain_link" please help me how to fix such type of problems?

    sir, each time when i open my browser i'm facing such type of error certificate and closing browser at the same instant. i don't know how to fix it please help me

    Hi,
    If you click on the certificate '''Details''' it would show the root Certificate Authority (the topmost one) and any intermediate CAs that signed/issued this security certificate. You would need at least the root CA certificate to be installed ('''Import''') and trusted in the Firefox certificate database ('''Tools '''('''Alt '''+ '''T''') > '''Options '''> '''Advanced '''> '''Encryption '''> '''View Certificates''' > '''Authorities'''), though sometimes depending on the server configuration you may need all the certificates in the hierarchy to be installed.
    [https://support.mozilla.org/en-US/kb/Options%20window%20-%20Advanced%20panel?as=u Options > Advanced]
    [https://support.mozilla.org/en-US/kb/Options%20window Options]

  • My wife and I have separate AppleID accounts and always have. For some reason after she bought the iPhone 5c, whenever she tries to update her apps, it comes up for my AppleID and asks for my password. Please help on how to fix this!

    My wife and I have separate AppleID accounts. Ever since she updated to the iPhone 5c, for some reason when she tries to update her apps, it comes up with my AppleID and asks for my password.  I cannot figure out why this happening and how to fix this.  Please help!

    I have had this issue lately.
    I can only put it down to using the one computer to update all our IPads for me and my wife.
    Some of our apps, although downloaded from both our seperate accounts on our IPads, are the same.
    However after plugging her IPad into the computer when my AppleID is on ITunes, I think something strange has happened and when she then tries to update Apps on her IPad and I try on mine it now asks for the others Apple ID password.
    The only way I have found to counteract this is to update an app one at a time, if that app asks for your wifes password then delete it and then reinstall it.
    That has solved it for me.
    Hope this helps

Maybe you are looking for