Setting setNeedsDisplay or setNeedsDisplayInRect properly

I have a Utility App which puts up a UIView which displays correctly the first time from the nib. Then I float several additional UIViews above that layer and manipulate them. Each of those is issued a setNeedsDisplay whenever I change the underlying type which either needs a new image, or to set the current image with self.hidden = YES;
I also have a routine which updates a counter which resides as a graphic on the main UIView. For that, the initial image shows up just fine, but all updates, set by a single update routine that changes the image in a small rectangle (36x16) and then calls [self setNeedsDisplayInRect:myRect];as soon as the update has drawn the new images.
In both cases, the updates do not seem to be happening.
Am i missing something?
I thought not, since the redrawing of the UIViews which are layered above the main UIView and are subviews of the mainView work just fine.
As a last ditch thing to try, I decided to remove mainView from its superview (the window) and immediately add it back to the window as a subview. Maybe i should also do a retain in between just to make sure it doesn't go away on me, but the current code is
UIView* mySuper = mainView.superview;
// [mainView retain]; // is this needed?
[mainView removeFromSuperview];
[mySuper addSubview:mainView];
// [mainView release]; // in case retain is needed
So, what gives? Why does the setNeedsDisplay code work on the subview UIViews, but seems to be ignored on the main MainView UIView?
In an early test case, I tried using setNeedsDisplay instead of setNeedsDisplayInRect for the counter, and it started drawing the counter at the wrong place on the screen, and only updating every so many increments at the correct location. Hence, the change to setNeedsDisplayInRect.

Your PATH is exactly what it should be.
The CLASSPATH answer depends on where you're compiling and running.
If you're doing things on the command line, I think the right answer is to use the -classpath option on javac.exe and java.exe.
If you're using NetBeans or another IDE, the right answer is to add JARs and paths according to the idiom demanded by the IDE. Each one is different, and all the ones I know of ignore the system CLASSPATH environment variable. I don't have one set on my machine.

Similar Messages

  • Setting CLASSPATH and PATH properly how?

    I have set PATH=c:\jdk_install_directory\bin which works fine. However, for example when I create an app or small program for example, simply to print out a line on the screen, it works when I compile in NetBeans. However, if I copy the java file to another directory, my C: root for example, I can compile it, but when I run the class file it gives me errors saying it can't find certain classes. So, I figure its something with the classpath variable that I have to fix. How can I do this properly for both J2SE and J2EE using default install directories for each.
    Thanks so much!!

    Your PATH is exactly what it should be.
    The CLASSPATH answer depends on where you're compiling and running.
    If you're doing things on the command line, I think the right answer is to use the -classpath option on javac.exe and java.exe.
    If you're using NetBeans or another IDE, the right answer is to add JARs and paths according to the idiom demanded by the IDE. Each one is different, and all the ones I know of ignore the system CLASSPATH environment variable. I don't have one set on my machine.

  • Cannot set default sound card properly

    Hello, i cant manage to set the default sound card properly.
    The card i'm using is the default pch from my motherboard :
    aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: PCH [HDA Intel PCH], device 1: ALC887-VD Digital [ALC887-VD Digital]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 2: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 2: Generic [HD-Audio Generic], device 7: HDMI 1 [HDMI 1]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 2: Generic [HD-Audio Generic], device 8: HDMI 2 [HDMI 2]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 2: Generic [HD-Audio Generic], device 9: HDMI 3 [HDMI 3]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 2: Generic [HD-Audio Generic], device 10: HDMI 4 [HDMI 4]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 2: Generic [HD-Audio Generic], device 11: HDMI 5 [HDMI 5]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    aplay -L
    null
    Discard all samples (playback) or generate zero samples (capture)
    hdmi:CARD=HDMI,DEV=0
    HDA Intel HDMI, HDMI 0
    HDMI Audio Output
    hdmi:CARD=HDMI,DEV=1
    HDA Intel HDMI, HDMI 1
    HDMI Audio Output
    hdmi:CARD=HDMI,DEV=2
    HDA Intel HDMI, HDMI 2
    HDMI Audio Output
    default:CARD=PCH
    HDA Intel PCH, ALC887-VD Analog
    Default Audio Device
    sysdefault:CARD=PCH
    HDA Intel PCH, ALC887-VD Analog
    Default Audio Device
    front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    Front speakers
    surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    2.1 Surround output to Front and Subwoofer speakers
    surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    4.0 Surround output to Front and Rear speakers
    surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
    surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    5.0 Surround output to Front, Center and Rear speakers
    surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
    iec958:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Digital
    IEC958 (S/PDIF) Digital Audio Output
    hdmi:CARD=Generic,DEV=0
    HD-Audio Generic, HDMI 0
    HDMI Audio Output
    hdmi:CARD=Generic,DEV=1
    HD-Audio Generic, HDMI 1
    HDMI Audio Output
    hdmi:CARD=Generic,DEV=2
    HD-Audio Generic, HDMI 2
    HDMI Audio Output
    hdmi:CARD=Generic,DEV=3
    HD-Audio Generic, HDMI 3
    HDMI Audio Output
    hdmi:CARD=Generic,DEV=4
    HD-Audio Generic, HDMI 4
    HDMI Audio Output
    hdmi:CARD=Generic,DEV=5
    HD-Audio Generic, HDMI 5
    HDMI Audio Output
    When i try :
    speaker-test -D default:PCH -c2
    speaker-test 1.0.28
    Playback device is default:PCH
    Stream parameters are 48000Hz, S16_LE, 2 channels
    Using 16 octaves of pink noise
    Rate set to 48000Hz (requested 48000Hz)
    Buffer size range from 2048 to 16384
    Period size range from 1024 to 1024
    Using max buffer size 16384
    Periods = 4
    was set period_size = 1024
    was set buffer_size = 16384
    0 - Front Left
    1 - Front Right
    I hear sound, but i cant found to make it the default output.
    I've tried to change /usr/share/alsa/alsa.conf :
    defaults.ctl.card 0
    defaults.pcm.card 0
    to
    defaults.ctl.card 1
    defaults.pcm.card 1
    and I've tried to make a .asoundrc file in my home :
    pcm.!default {
    type hw
    card PCH
    ctl.!default {
    type hw
    card PCH
    doesn't work either, what am i doing wrong ?
    Thanks in advance,

    Ok, after a lot of try-and-error-and-reboot, i found that the default card is correctly defined ("aplay test.wav" works), but others applications (vlc, chromium) still did not produce sound.
    Apparently, the problem came from pulsaudio, after i removed it, everything seems to work (sound is back on vlc and chromium), not sure what the problem with pulseaudio was.

  • How to set up LPD printer properly? I just upgraded to Snow Leopard from 10.4.  I can not get my laser printer to work.

    OK, here is what I have found.  Since the printer is on an ethernet network it can not be seen since there is no more apple talk.  I must set it up as a LPD printer.  Xante tech support has told me how to do this but they are baffled by the fact that it will not print.  I am using a Linksys wireless/broadband router.
    These are my numbers:
    IP 192.168.1.110
    subnet mask: 255.255.255.0
    Router: 192.188.1.1
    DNS Server" 66.103.237.2.66.103.251.130
    Xante has suggested using 192.168.1.112 and the printer is found and the print queue is opened and the following message is in the print queue window: Network host '192.168.1.112' is busy; will retry in 10 seconds...  Nothing ever prints.
    On this list I have seen a successful connection in the past through an airport connection.  I think that the number that Xante has suggested is not correct.
    I am able to print to this printer through another computer on the network that has not been upgraded to Leopard.
    Any thoughts?  Thanks

    The best answer to this question requires a little more digging.
    More specifically, what spare inputs do you have on the TV, and what video card are you currently driving.
    IMHO S-Video is going to give you about a poor a picture as you can get, mostly because of the limited bandwidth and the fact it's based around standard resolution TV (e.g. NTSC signaling).
    The best experience would be via HDMI, but for that you'd need a video card with a DVI interface, plus a DVI -> HDMI cable. If you don't have a DVI-based video card and you're OK spending a few dollars that would be your best bet, although off hand I don't know specifically which card you'd need - most of the modern cards are PCI-X or PCIe and won't work in the G4.
    If you don't want to replace the card then you'll need to let us know what kind of video card you have in it so that we can find the best match.

  • My iPhone synced with an old iPod, therefore changing my contacts, deleting photos,etc. I want to get back to the main menu on iTunes where I can set up my iphone properly.

    Please HELP!

    Network time outs are mostly cause by your security software settings. iTunes needs to contact Apple during the set up of the phone. iTunes for Windows: Troubleshooting security software issues
    Your giftcards are part of the iTunes account and not affected by a new setup. Your contact info should also be on your computer.

  • Can't set disposition of elements properly (front/background...)

    hello,
    i think i discovered a bug in muse, i add a filled rectangle then i import a png file and put it in front of the rectangle, in the preview all is going well but when i preview the site online or publish it, the png file is appearing behind the filled rectangle.i've checked that my rectangle is in background while the png file is in front. i doesn't correct the problem. anyone encountered the problem ?
    thanks in advance fro helping
    claude

    hello,
    yes the background object was marked as footer item, once i've unchecked it, the problem solved itself thank you very much for your fast and very effective answer
    claude

  • "Object reference not set to an instance of an object" when using Sheel Shah's example

    I am attempting to use a custom add dialog as in http://blogs.msdn.com/b/lightswitch/archive/2011/07/07/creating-a-custom-add-or-edit-dialog.aspx and
    I get the error "Object reference not set to an instance of an object." when clicking my button to AddEntity().  My code to call the control is:
    User u = new User();
    userdialoghelper.AddEntity(u);
    Any ideas as to why I'm getting this error?  I "think" that I've set up the class properly?
    Scott

    I may be a couple of years late to the party here (using VS2013) but I also had some issues adapting to Yann's improvements over Sheel's code.
    Sheel's screen code as provided has the word "Old in the InitializeDataWorkspace and the created methods. this does not work when copy/pasted. ALso removed the "UI" from "InitialiseUI()"
    Following code can be used with Yann's Helper Class.
    Namespace LightSwitchApplication
    Public Class EditableCustomersGrid
    Private customersDialogHelper As ModalWindow
    Private Sub EditableCustomersGrid_InitializeDataWorkspace(saveChangesTo As System.Collections.Generic.List(Of Microsoft.LightSwitch.IDataService))
    customersDialogHelper = New ModalWindow(Me.Customers, "CustomerViewDialog")
    End Sub
    Private Sub EditableCustomersGrid_Created()
    customersDialogHelper.Initialise()
    End Sub
    Private Sub gridAddAndEditNew_CanExecute(ByRef result As Boolean)
    customersDialogHelper.CanAdd()
    End Sub
    Private Sub gridAddAndEditNew_Execute()
    customersDialogHelper.AddEntity()
    End Sub
    Private Sub gridEditSelected_CanExecute(ByRef result As Boolean)
    customersDialogHelper.CanView()
    End Sub
    Private Sub gridEditSelected_Execute()
    customersDialogHelper.ViewEntity()
    End Sub
    Private Sub EditDialogOk_Execute()
    customersDialogHelper.DialogOk()
    End Sub
    Private Sub EditDialogCancel_Execute()
    customersDialogHelper.DialogCancel()
    End Sub
    End Class
    End Namespace

  • How can i set the alternating colors for a table rows

    Dear All,
    Please any one help me how can i set the Alternating colors for Table Rows.
    i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.

    Hi,
    The design property in Table properties should work for your requirement. Select "alternating" value for design.
    Please see the API below:
    design
    Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
    alternating - The table rows are displayed alternately in a different color.
    standard - The table background has one color. The individual table rows are displayed with grid net lines.
    transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
    Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
    Regards,
    Jaya.
    Edited by: VJR on Jun 17, 2009 6:43 PM

  • Macbook Pro can't find properly working Airport Express network

    I have an Airport Express that's set up and working properly, and my Mac Mini and my iPhone both find the airport network, but not my MacBook Pro. The MacBook pro is even closer to the Express than the Mini is, and it finds many available airport networks (from the neighbors), but not my own network that the other units find without a problem - my own network just isn't listed among the others on the MacBook Pro, and Airport Utility on the MBP can't find the Express either. I've obviously tried restarting everything, as well as resetting the Express and setting it up again (which works just fine from the other two units), and I've tried creating a new user account on the MBP and check from there, but no go. The MBP runs the latest version of Snow Leopard and works just fine with other Airport Networks (at work, or one of the neighbors networks even), so it shouldn't be faulty hardware. At some point it's time for a Lion update for the MBP and then we'll see if it's some weird system software error that gets resolved in the process. But until that happens … what else could I try?
    I'm thinking maybe this is some 802.11 b/g/n malfunction? The Express is an old g, the iPhone is g only, and the Mini is an old g as well, but the MacBook Pro is newer and supports n … but it should of course still be able to switch down to g and find the **** network (or the Express when running Airport Utility).
    Anyone?

    Well, I can't delete the wireless connection since it doesn't really exist (on the MacBook Pro). Had the Express in my office, but brought it home, and reset it there and created a new network using the Mac Mini, so the MacBook Pro had never been connected to that newly created airport network. But I did delete a lot of old saved connections, some of which were from when the Express was used in my office. This was however, before I read your reply here, so I didn't also erase the passwords from the keychain, however. But still no go; the MacBook just wouldn't list the new network among the available ones, or list the Express in the Airport Utility.
    But then … last night, for no apparent reason whatsoever, suddenly everything just works.
    In trying to wrap my head around this, and learning from it. Is it even possible for an old network used on an Airport device to interfere with a new network created by the same device? What I mean is, does the computer identify the airport by some sort of serial number or something, regardless of the network created by the airport? So that when a computer should be looking for a new and current network on an airport device it instead looks for an old network it has previously been connected to on that same airport device? Assuming the old network should still exist on that same device, and therefore skipping to look for a new network on the same device? I mean that would suck, but if that's the case then at least I'd know to always erase all traces of any old connections for a specific device in a case like this. ;-)
    Thanks for your input!
    Cheers!

  • When I try to use siri to book an appointment the last step when she says "do you want me to shedule that for you" I say yes and then she says "Sorry I can't do that, very frustrating. Do I have to turn on another setting or something?

    When I try to use siri to book an appointment the last step when she says "do you want me to shedule that for you" I say yes and then she says "Sorry I can't do that, very frustrating. Do I have to turn on another setting or something?

    Hello BassoonPlayer,
    Since you are using one of the the school's Macbooks, it is quite possible that the time and date are not properly set on the computer that you are using.  FaceTime will not work if you do not have the proper time zone set up for the location that you are in.  This past week, there were a two other Macbook users I've helped by simply telling them to set the Date/Time properly.  By the way, you described your problem very well, which makes it easier for us to help you.  Hope this solves your problem -- if not, post back and I can suggest other remedies.
    Wuz

  • Setting up a new server - terminology and set up

    I have a new mac OS X snow leopard mac mini server.
    The set up is a follows:
    The modem goes into the Time capsule router and from the time capsule there is the mac mini server and also a network printer. There are 4 other computers wirelessly 'attached' to the time capsule.
    I am very confused about some of the terminology and the set up procedure.
    First of all, I might have made a mistake when I did my initial setup without being attached properly to a public IP address. I set up my server inadvertently as hobbes.private. When I go to the server preferences now the DNS is listed as hobbes.private. First of all, is there anyway to change that?
    The set up goes as follows:
    I have a public IP address which is set at the router. From the router there is a designated IP address which goes to the server.
    I have my A records and MX records set up.
    my Domain name is hobbeswiki.com
    the IP address is 114.160.205.178
    When I do an NS lookup IP address, I get this:
    Non-authoritative answer:
    178.205.160.114.in-addr.arpa name = p4018-ipngnfx01morioka.iwate.ocn.ne.jp.
    I've been told that this is normal.
    I use a company in australia for my domain name and they have given me 2 name servers:
    ns1.secure.net
    ns2.secure.net
    The router then takes the info and then gives me an IP address for the server
    its a 10.X.X.X number.
    When I set up my server properly with the IP address, it set up as hobbes.local and under available servers, under network in the server admin, it gives me
    Ethernet (en0) Family IPv4 the 10.X IP address and the DNS name as hobbes.local
    I tried setting up DNS but it won't take.
    I don't know how to set up kerberos, but I want to get the functionality of the podcasting etc, but it tells me I need it.
    I have an SSL certificate.
    With all this info, how can I set this server up and do I need to start from scratch? Do I need to erase the current server and start from the beginning? Is this hobbes.private causing problems?
    In the DNS settings there are just so many different names for different things and I'm not sure what goes where.
    I have a lynda.com account, but I'm not sure their info is the same as mine and they have words like server.samplename.com etc...
    Can someone help?
    The web set up works and I've got a couple users and groups set up to try things out, so it's not a complete failure.... I just can't get anything else to work.
    Thank you!
    Yomogi

    Yes you can. Ideally make also sure that your ISP sets the PTR record for 217.36.255.25 to myserver.address.com

  • Installing Character Sets for different languages

    We have a need to have the character sets installed for 14 different languages. Our BW system will receive data from other systems with different languages installed. We don't necessarily need to login with these languages but just need the character sets in order to properly read the data. Do we need to go thru the entire language installation process for each language in order to get the character sets installed? That seems like a rather lengthy process and I'm looking for other options. Also, once  I get all of these character sets into my development system is it possible to transport these characters sets into my QA and Production
    systems?

    1. Start the FM 7.0 installation from the CD.
    2. Work your way to the Setup screen and select "Custom" installation.
    3. Select only the "Dictionaries" components (i.e. uncheck the other
    components) and click on the "Change" button.
    4. This will pop-up the available "sub-components", i.e. the
    dictionaries.
    5. Select the ones you want and click on the "Continue" button and
    then the "Next" button to install only the new dictionaries.

  • Server Error Related To Set Alarms

    There is another thread going about the following error message:
    The server responded:
    “HTTP/1.1 403 Forbidden”
    to operation CalDAVWriteEntityQueueableOperation.
    I have found that this is occurring for me only when I set a future event and then try to set an alarm to occur a specific amount of time prior to the event time. I've found that as long as I set the alarm to occur at 7 days or less prior to the event I get no error message and everything sets up and syncs properly through MobileMe. However if I try to set the alarm for greater than 7 days the error pops up and the event won't be created.
    It's been a while since I've tried to set an alert longer than a week before so I don't know how long this has been going on. Does anyone have any information on this.

    Instead of going through the rest of the setup and logging in, I skipped it and also skipped the passcode.  My iPad allowed me to get on to it and enter a password for iTunes.  We'll see how long this lasts.  Don't know why I didn't think of trying this earlier.  Let's keep our fingers crossed.

  • Book designer wanted to set up file InDesign CC file, must have experience with Chinese fonts (traditional

    Hi there
    Looking for a book designer to help with setting up a file in InDesign CC so I can place text from Word.
    I'm helping to produce a large book (700+ B5 pages) about history of Chinese medicine in 20th century.  There are lots of characters used throughout (within English-language paragraphs) so it's really important that the designer has experience working with fonts for both traditional and simplified characters.
    The book has been laid out in Word with style sheets to basic mockup stage and can be provided for reference so there's no design concept needed, simply getting the shell ready to place the Word files, but this would probably include things like:
    Document setup, page size, margins etc
    Verifying the style sheets are set up properly & add extras if needed eg optical margins etc, that aren't included in Word
    Structuring files as chapters, front matter, back matter, headers & footers etc
    Suggesting a layout grid based on word file
    Maybe a final check of the finished file before producing the PDF
    This is a self-published project for a very small market!!!  So of course we're looking to economise :-)  So if you're interested then please provide a quote based on your experience of what's needed to set up a project properly but not with too many bells & whistles!!
    Cheers
    Lois

    Anyone interested in the opportunity should contact Lois through the messaging system. I'm locking the thread.

  • I am trying to set up virtual servers with Netscape Enterprise Server 3.6. Can get home page to display but images linked to the page won't display and links to other pages won't work.

     

    hi,
    If your home page of the virtual server is displayed then,you have set the virtual server properly.
    check the links and source of the images or directories in the HTML source code of the home page.
    this should solve ur problem. If not notify me.
    Regards
    T.Raghulan.
    [email protected]

Maybe you are looking for