Re: [Pyobjc-dev] NSRect, structs
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2003-06-13 08:08:39
|
Ronald Oussoren wrote: > > I need to make an NSRect. I know there is an NSMakeRect function, > > but it doesn't seem to be in Foundation or AppKit. I have tried > > making an NSObject and assigning it attributes, but no luck there: > > The bridge expects a "struct." Any ideas for what I should do? > > myrect = ((x, y), (h, w)) > > If you're using CVS: > > myrect = AppKit.NSMakeRect(x, y, h, w) It's good to have this to avoid some confusion for ObjC programmers, but as you can see it's not really an improvement... > Structs are represented as tuples when using PyObjC. As are NSPoint, NSSize, NSRange and probably a few others. Just |