[Pythonmac-SIG] QuickTime.Qt beta & SequenceGrabber,
anybody use it?
Bob Ippolito
bob at redivi.com
Tue Aug 17 00:36:23 CEST 2004
On Aug 16, 2004, at 6:07 PM, Jack Jansen wrote:
>
> On 16 Aug 2004, at 23:50, Jerome wrote:
>
>> thanks, that's a start, problem is the
>> Carbon.Cm.OpenDefaultComponent() won't allow a 0 for 2nd argument to
>> allow any subtype, so i dont know how to try my example otherwise,
>> putting other subtypes just get null componentInstances
>
> You should pass '\0\0\0\0': OSType values (the ubiquitous 4-char
> single quoted strings in C) must be strings on the Python side.
>
> I keep going back and forward on this design: sometimes I want to
> allow integers too, sometimes I think it's too error-prone and want to
> keep things the way the are, sometimes I want to do something
> in-between (such as allow only 4-char Python strings or the specific
> integer values 0 and maybe -1).
>
> Anyone have any opinions on this?
I would think that None -> '\x00\x00\x00\x00' would make sense for this
particular behavior semantically.
Integers might be practically necessary in the future if you move to OS
X style headers. They use integers and four-char-code OSTypes
interchangeably; integers are used when it won't fit in ascii, as there
are a few out there that were intended for macroman encoding.
-bob
More information about the Pythonmac-SIG
mailing list