disabling nsdatepicker in nib if loaded on panther

  • I want my app to run on 10.3 and higher, but I also want to use an
    nsdatepicker. Is there a way to have the date picker in the nib but
    only show it when running on a system that supports it?
  • On 1 Nov 2006, at 2:45 pm, Mitchell Livingston wrote:

    > I want my app to run on 10.3 and higher, but I also want to use an
    > nsdatepicker. Is there a way to have the date picker in the nib but
    > only show it when running on a system that supports it?

    The way I handle this sort of situation is to put a placeholder
    NSView of the right size in the window in the nib. Then at runtime,
    according to OS version, I create the appropriate control
    programmatically (using the placeholder view's frame as a reference)
    and swap it for the plain view. It helps, of course, if you've got a
    substitute view (or nib) for those running an earlier OS version.
    Otherwise you'll be left with a blank space.

    -Jeremy
  • On 2006-11-01 09:45, Mitchell Livingston said:

    > I want my app to run on 10.3 and higher, but I also want to use an
    > nsdatepicker. Is there a way to have the date picker in the nib but
    > only show it when running on a system that supports it?

    I believe the answer is no.  Probably the best thing is to not have the
    control in the nib at all, but instead add it programatically when the
    window is opened.  You might also want to check out WBTimeControl.

    --
    ____________________________________________________________
    Sean McBride, B. Eng                <sean...>
    Rogue Research                        www.rogue-research.com
    Mac Software Developer              Montréal, Québec, Canada
  • Or just have two copies of the NIB.  One with the control and one
    without.  Extra work I know, but it might work better for you.

    Mike.

    On 1 Nov 2006, at 16:18, Sean McBride wrote:

    > On 2006-11-01 09:45, Mitchell Livingston said:
    >
    >> I want my app to run on 10.3 and higher, but I also want to use an
    >> nsdatepicker. Is there a way to have the date picker in the nib but
    >> only show it when running on a system that supports it?
    >
    > I believe the answer is no.  Probably the best thing is to not have
    > the
    > control in the nib at all, but instead add it programatically when the
    > window is opened.  You might also want to check out WBTimeControl.
    >
    > --
    > ____________________________________________________________
    > Sean McBride, B. Eng                <sean...>
    > Rogue Research                        www.rogue-research.com
    > Mac Software Developer              Montréal, Québec, Canada
    >
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/mike.abdullah%
    > 40gmail.com
    >
    > This email sent to <mike.abdullah...>
  • On 2006-11-01 17:26, Mike Abdullah said:

    > Or just have two copies of the NIB.  One with the control and one
    > without.  Extra work I know, but it might work better for you.

    Of course, if your application is localised, this quickly grows to many
    many many different NIBs.  My preferred solution is to drop 10.3 support
    frankly.

    --
    ____________________________________________________________
    Sean McBride, B. Eng                <sean...>
    Rogue Research                        www.rogue-research.com
    Mac Software Developer              Montréal, Québec, Canada
previous month november 2006 next month
MTWTFSS
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      
Go to today