Andrew Zamler-Carhart | 1 Oct 2002 01:41

Re: getting the index of a slider!s selected tickmark

Benjámin,

On Monday, September 30, 2002, at 02:08  PM, Benjámin Salánki wrote:

> how can i get the index of a slider's selected tickmark?

Suppose your slider has 5 tick marks. Set the minimum value of your 
slider to 0 and the maximum value to 4. Then, [slider intValue] will 
give you the index of the selected tick mark.

If you prefer your numbers to start with 1, just change the minimum 
value to 1 and the maximum value to 5.

You may wish to select "marker values only" in IB if you want the 
slider to "snap" to the tick marks.

Does that answer your question, or is there some aspect that I didn't 
get?

Andrew
Stefan Johansson | 1 Oct 2002 10:35

iODBC and 10.2

I'm trying to figure out how to use iODBC in my foundation tools.
Supposedly there should exist a framework for iODBC which you can use 
in PB.
I cannot find any framework, nor any information on how to use iODBC.
I know I can link /usr/lib/libiodbc.a manually, but I want to use it 
from PB in framework "form" (at least if you look at www.iodbc.org it 
says that a framework exist, and how it can be installed).

No docs about iODBC exists on my machine whatsoever. Funny, maybe I'm 
supposed to guess?
I'm very impressed by the level of documentation...

I know I'm cranky, but I'm a bit tired of wasting my dev time on 
guessing stuff :)

/Stefan
W.Northcott | 1 Oct 2002 10:29
Picon
Picon
Favicon

Re: HOw to compile objctive-c compiler with gnu-objc by default

Alex wrote
>  I have a little problem. The source of gcc compile objc with
> Next-objc compiler which is a bit different from gnu-objc-compiler.
> Can anyone tell me how to tell, during the compilation of gcc, to the
> objc compiler to use the gnu-objc instead of the NExt-objc?

AFAIK this is controlled by the __APPLE__ macro.  Maybe you could disable 
this or produce the compiler as a cross compiler on a Linux system.
However, I have to ask 'What is the point?'  The resulting compiler, even 
if it would build, would be thoroughly broken.  The right way is to just 
use the -fgnu-runtime when you want to compile an Objective-C class in gnu 
style.

Bill Northcott
murphy | 1 Oct 2002 15:36

ODBC in Mac OS X

1) I'm really new to the programming scene, in general, and have the
misfortune of being paid to program web apps in ASP/VB for Windoze, so
please bear with me as I stumble along here...

2) I've seen the ODBC Administrator panel, and have seen some discussion
about iODBC here, but I was wondering: does 10.2 ship with any ODBC
drivers built in, and if so, where are they to be found?

3) If not, where do I find drivers?

Thanks!

Jason M. Batchelor
Mark J. Lilback | 1 Oct 2002 15:42
Gravatar

Re: ODBC in Mac OS X

At 9:36 AM -0400 10/1/2002, <murphy@...> wrote:
>2) I've seen the ODBC Administrator panel, and have seen some discussion
>about iODBC here, but I was wondering: does 10.2 ship with any ODBC
>drivers built in, and if so, where are they to be found?

Nope, Apple didn't include any drivers, just the driver manager.

>3) If not, where do I find drivers?

 From the database vendor, or from OpenLink software 
<http://www.openlinksw.com/>.

You'll also want to download the iODBC SDK to get the header files to 
compile against. <http://www.iodbc.org/>.

--

-- 
__________________________________________________________________________
                                   "They that can give up essential liberty
Mark J. Lilback                    to obtain a little temporary safety
<mark@...>                 deserve neither liberty or safety."
http://www.lilback.com/                               -- Benjamin Franklin
Mark J. Lilback | 1 Oct 2002 15:45
Gravatar

Re: iODBC and 10.2

Grab the SDK from <http://www.iodbc.org/>. It has the frameworks and 
documentation.

There are issues (what I can't remember) with what comes with Jaguar 
and OpenLink advises you install iODBC along with whatever drivers 
you want to use.

(I asked about it because Sybase only works on Jaguar yet the ODBC 
driver installer for it installs the whole iODBC package.)

--

-- 
__________________________________________________________________________
                                   "They that can give up essential liberty
Mark J. Lilback                    to obtain a little temporary safety
<mark@...>                 deserve neither liberty or safety."
http://www.lilback.com/                               -- Benjamin Franklin
Bob Estes | 1 Oct 2002 16:32

Displaying text in an OpenGLView?

I'm discovering more unadvertised (though maybe obvious to experts) 
drawbacks to the currently implemented OpenGLView.

I want to display some text in an OpenGLView. Since I didn't come 
across an OpenGL way (an easy one anyway), I first tried just using 
NSAttributedString drawAtPoint:, which didn't work. This failure to 
allow mixing of quartz and opengl wasn't surprising.

The next thing I tried was to just put a NSTextField into the view. 
This didn't work either, and that is more surprising, since it seems 
to say that an OpenGLView is not a normal view that can display 
subviews. Can someone confirm that this is the case? If so, is that 
necessarily the case, or just the way things stand now?

Can someone point me to a way to display text with OpenGL under 
MacOSX? A quick perusal of some MFC online tutorials revealed the 
existence of a CGLFont class that can be used to set all the font 
attributes and then draw text in opengl. Nothing yet for Cocoa?

Bob Estes
David Remahl | 1 Oct 2002 16:39
Picon

Re: Displaying text in an OpenGLView?

> I'm discovering more unadvertised (though maybe obvious to experts)
> drawbacks to the currently implemented OpenGLView.
> 
> I want to display some text in an OpenGLView. Since I didn't come
> across an OpenGL way (an easy one anyway), I first tried just using
> NSAttributedString drawAtPoint:, which didn't work. This failure to
> allow mixing of quartz and opengl wasn't surprising.
> 
> The next thing I tried was to just put a NSTextField into the view.
> This didn't work either, and that is more surprising, since it seems
> to say that an OpenGLView is not a normal view that can display
> subviews. Can someone confirm that this is the case? If so, is that
> necessarily the case, or just the way things stand now?
> 
> Can someone point me to a way to display text with OpenGL under
> MacOSX? A quick perusal of some MFC online tutorials revealed the
> existence of a CGLFont class that can be used to set all the font
> attributes and then draw text in opengl. Nothing yet for Cocoa?
> 
> Bob Estes

In Mac OS X 10.2 Jaguar, there are features which enable exactly the kind of
things you like to see. Underlay surfaces allow you to mix OpenGL and Cocoa
controls.

There is an example project here:

/Developer/Examples/OpenGL/Cocoa/UnderlaySurface/

Underlay surfaces work better on systems supported by Quartz Extreme, but
(Continue reading)

Joshua Davis | 1 Oct 2002 18:05
Picon

Re: Displaying text in an OpenGLView?

On Tuesday, October 1, 2002, at 09:39  AM, David Remahl wrote:

>> I want to display some text in an OpenGLView. Since I didn't come
>> across an OpenGL way (an easy one anyway), I first tried just using
>> NSAttributedString drawAtPoint:, which didn't work. This failure to
>> allow mixing of quartz and opengl wasn't surprising.
>>
>> The next thing I tried was to just put a NSTextField into the view.
>> This didn't work either, and that is more surprising, since it seems
>> to say that an OpenGLView is not a normal view that can display
>> subviews. Can someone confirm that this is the case? If so, is that
>> necessarily the case, or just the way things stand now?
>
> In Mac OS X 10.2 Jaguar, there are features which enable exactly the 
> kind of
> things you like to see. Underlay surfaces allow you to mix OpenGL and 
> Cocoa
> controls.
>
> There is an example project here:
>
> /Developer/Examples/OpenGL/Cocoa/UnderlaySurface/

This shows how to configure the OpenGL view, but it doesn't help you 
draw the text with line breaks, etc. If you want to format text, then 
you need to use the NSTextStorage/NSLayoutManager/NSTextContainer 
combination. The "Assembling the Text System by Hand" topic in the docs 
goes into this. For all of this to work, you will need to flip the 
coordinates in your view, by overriding isFlipped to return YES.

(Continue reading)

MEETING: MacOS Developer Meeting Davis, CA Fri. 10/11/02

Mishka's Café Friday 10/11/02 7:30 PM (2nd & E Street, Davis, CA).  MacOS
developers in the area stop by next Fri. to chat and do caffeine.  Our first
meeting, we'll be feeling things out to see if there is interest to make a
similar gathering happen every couple of months (with an Agenda).  Please
RSVP if you plan on attending.  Mishka's has a free net connection through
an Airport router that I installed.  They roast their own coffee so the
adenosine adjustment is good.

--Perry
========
01 (530) 400-5692 [Davis, CA USA]
mailto:perry_gregg@...
http://www.devdrvr.net/PerryCard.html
ftp://www.devdrvr.net/

Gmane