carbon-dev Mailing List http://lists.apple.com/archives/carbon-dev/2008/Jul/index.html carbon-dev Mailing List Sat, 05 Jul 2008 17:35:00 +0000 Re: CFBundleCopyLocalizedString question http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00062.html Reply to list

CFCopyLocalizedStringFromTableInBundle has bundle argument
and is a macro
that calls CFBundleCopyLocalizedString
so I have to provide CFBundleRef in any case  
 thanks  
 On Jul 5, 2008, at 11:52 AM, Jean-Daniel Dupas wrote:  
  Le 5 juil. 08 à 17:45, Dmitry Markman a écrit :

[...] [...]
]]>
Re: CFBundleCopyLocalizedString question http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00061.html Reply to list
Le 5 juil. 08 à 17:45, Dmitry Markman a écrit :

[...]

What about CFCopyLocalizedStringFromTableInBundle() ?  
 Attachment:
smime.p7s 
Description: S/MIME cryptographic signature 
  
]]>
CFBundleCopyLocalizedString question http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00060.html Reply to list

Hi  
 suppose I have application that loads bundle with id "com.my.bundle.id"  
 suppose that bundle has few localizations  
if I want to load localizable string from that bundle 
I have to use 
CFBundleCopyLocalizedString with  
CFBundleGetBundleWithIdentifier(CFSTR("com.my.bundle. [...]
]]>
Re: Inverting a rect in Quartz http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00059.html Reply to list

[...]

You would have to use Cocoa Graphics for that since they were not  
exposed via Quartz until 10.4. Although if you are in the position to  
change your requirements, you may want to reconsider supporting all  
the way back to 10.2 (as you will find many difficulties spanning   [...]
]]>
Re: Inverting a rect in Quartz http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00058.html Reply to list

Thanks!  But CGContextSetBlendMode is only in 10.4 +... anyone know of  
a way to do this in an app intended for, say, 10.2 and up? 
I guess I could branch to the old QD method if the system is earlier,  
but that's mighty ugly. Surely Quartz could invert a rect before 10.4  
came out? [...]
]]>
Re: Inverting a rect in Quartz http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00057.html Reply to list

Am 04.07.2008 um 10:33 schrieb Uli Kusterer:

[...]

Err, sorry, got my mailing lists crossed. Of course for Quartz in  
Carbon my suggestion is almost rubbish. Nevermind. 

 Cheers,






  References:   

[...]

Re: Inverting a rect in Quartz

 Previous by thread:
Re: Inverting a rect in Quartz
 [...]
]]>
Re: Inverting a rect in Quartz http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00056.html Reply to list

[...]

The XOR blend mode is fairly different from the classic Quickdraw XOR  
mode. In Quartz it inverts source and destination alpha, then  
multiples destination by source and source by destination (R = S*(1 -  
Da) + D*(1 - Sa)). Using it to do an invert means you need to arrange   [...]
]]>
Re: Media files in Interface Builder Carbon projects http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00055.html Reply to list

Although it doesn't build in the resources to the NIB and I haven't 
tried it with more recent versions of Interface Builder, I have in the 
past added icons I used in my UI to the resource file (the .rsrc file) 
of the IB runtime application in order to see the icons displayed when I 
ran my NIB. [...]
]]>
Re: Inverting a rect in Quartz http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00054.html Reply to list

Am 04.07.2008 um 08:14 schrieb David Duncan:
 On Jul 3, 2008, at 11:02 PM, Jeff Evans wrote:

[...]

Or, depending on what you're trying to do, using  
NSRectFillWithOperation with the XOR operation also looks like a  
suitable option. 

 Cheers,






  References:   

[...] [...]
]]>
Re: Given volume name, dir id and file name, get it's path? http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00053.html Reply to list

[...]

Are you aware that dirIDs are not persistent _in general_? Do you
plan to access this database, say, from another computer different
to the one that stored dirID? Are you interested only in HFS(+)
volume format that supports dirIDs natively? On some volume formats/ [...]
]]>
Re: Inverting a rect in Quartz http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00052.html Reply to list
[...]

Set the blend mode to kCGBlendModeDifference and draw a white rect  
over the area.  David Duncan  
 
]]>
Re: Media files in Interface Builder Carbon projects http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00051.html Reply to list

Jeff,  
 On Jul 3, 2008, at 10:51 PM, Jeff Evans wrote:

[...]

Yes you seem to have the gist of it exactly right, and it is truly  
safe to say that there will never, ever, ever be Resource support for  
Carbon apps in IB.  Not even the most basic icons and images. [...]
]]>
Inverting a rect in Quartz http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00050.html Reply to list

This is probably dumb in some deep sense: does Quartz contain any  
functional equivalent to QuickDraw's deprecated InvertRect()? 
This is a very very handy and simple little call in QD, and I have not  
been able to find anything that does the same thing in a CGContext. [...]
]]>
Media files in Interface Builder Carbon projects http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00049.html Reply to list

On June 11 Aaron asked why media files were not appearing in the  
Media pane of IB 3.0 for a Carbon project, and Kevin G. responded that  
he had found these appear only in Cocoa projects, not Carbon projects. 
	My question: does this mean that there really is no way, in a Carbon   [...]
]]>
tracking a scroll bar http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00048.html Reply to list

What's the right way to handle a scroll bar control?  If I install a 
handler for kEventClassControl/kEventControlHit, then single clicks on 
the scroll arrows work right, but it does not auto-repeat if you click 
and hold.  I'd expect that I would need to handle kEventControlTrack,  [...]
]]>
Re: Long paths on Leopard http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00047.html Reply to list
[...]

Not true. Many many calls have problems with long paths, and have had for
all of OS X.

There may have been some regression from 10.4 to 10.5 that makes something
worse, but you'll need to provide specifics if you want better info.

 
]]>
Re: Given volume name, dir id and file name, get its path? http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00046.html Reply to list

[...]

Exactly how does it fail, what error?  It could be that node IDs just 
aren't persistent on network file systems, in which case your scheme 
isn't going to work.  But if you want to try different APIs than 
FSResolveNodeID, you could use FSMakeFSSpec with name "\p" to get an  [...]
]]>
Long paths on Leopard http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00045.html Reply to list

Hello everyone,  Why Leopard (10.5.3) does not support anymore paths longer than 1024 bytes? Tiger has no problem with long paths, but in Leopard neither Finder nor File Manager API don't support them anymore. It this a bug or Apple plan to remove support for long paths (even if HFS supports them) ? [...]
]]>
Re: FSOpenIterator returns -43 http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00044.html Reply to list

I've run both a carbon event loop and a CF run loop without any event handler installed. In both cases all my problems disappeared :) Still, this looks like a bug to me :) Thanks a lot for your help ! 
  On Wed, Jul 2, 2008 at 4:28 PM, Mike Kluev <email@hidden> wrote:  [...]
]]>
Re: some questions for launch service http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00043.html Reply to list

Hi, Chris 

To force associating some file types with our application, in our application installation, we add the file type to info.plist of application bundle and call launch service API LSSetDefaultRoleHandlerForContentType(cfString,kLSRolesAll,bundleStr). [...]
]]>
Re: Given volume name, dir id and file name, get its path? http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00042.html Reply to list

[...]

Before I answer the question that you asked, let me ask you whether you 
considered storing alias records in your database?  That's a less 
fragile way to reference a file. 

If you want to avoid deprecated functions, I'm not sure how to deal with  [...]
]]>
Re: Given volume name, dir id and file name, get it's path? http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00041.html Reply to list

I considered that but noticed that the "FSpMakeFSRef" function is deprecated in Leopard. I'm trying to avoid using deprecated functions/data structures.

 -------------- Original message ----------------------
From: "David M. Cotter" <email@hidden>

[...] [...]
]]>
Given volume name, dir id and file name, get it's path? http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00040.html Reply to list
Hi

I'm storing volume name, directory id and file name for various types of files in a database to allow for vary fast searches (Spotlight proved to be too slow) and want to turn that info into full paths on request. I looked through the Carbon file manager but didn't see any functions that will do that. The best I can come up with is creating an FSIterator and doing a catalog search. Is there an easier/better way to do this?

Thanks for any help
 
]]>
Re: Scroll bars on EditUnicodeTextControl http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00039.html Reply to list
[...]

I'm pretty sure you can't.  If you want a multiline text control, use 
HITextView. [...]
]]>
Scroll bars on EditUnicodeTextControl http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00038.html Reply to list
If possible, what is the proper way to get (vertical) scrollbars on a 
multiline text control created with CreateEditUnicodeTextControl? 

 Thanks in advance,  
 Deron  
 
]]>
Re: FSOpenIterator returns -43 http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00037.html Reply to list
Looks like expected behavior:  
 http://lists.apple.com/archives/carbon-development/2002/May/msg00037.html  
So, using File Manager from within a command line tool that doesn't 
run 
events is somewhat unreliable. 

 Mike
]]>
Re: FSOpenIterator returns -43 http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00036.html Reply to list

On Wed, 2 Jul 2008 14:59:40 "Sorin Negoita"

[...]

I was testing it from within a single run of a GUI app where
the code mentioned was called as result of menu command. Indeed,
if I do this from a command line app that doesn't run events
in a for (;; [...]
]]>
Re: Mouse wheel scrolling in X and Y at the same time? http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00035.html Reply to list
[...]

Cool!  Thanks, Mike!
-Howard  
  
]]>
Re: Window updates http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00034.html Reply to list

You use HIViewSetNeedsDisplay() or a similar routine; see: 
http://developer.apple.com/documentation/Carbon/Conceptual/HIViewDoc/HIView_tasks/chapter_3_section_11.html#/ 
/apple_ref/doc/uid/TP30000923-CH205-TPXREF108 

 The drawing routine itself is installed with Carbon Events; [...]
]]>
Re: FSOpenIterator returns -43 http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00033.html Reply to list

Ooops, you are right. The problem doesn't manifest on HFS format, only on NTFS and FAT32 as far as I've tested.   On Wed, Jul 2, 2008 at 12:47 PM,  <email@hidden> wrote: 
I don't think it has ever been asked in this thread, but what volume format is the USB stick? By default most are Fat32 nowadays. [...]
]]>
Re: FSOpenIterator returns -43 http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00032.html Reply to list
On Wed, Jul 2, 2008 at 12:20 PM, Mike Kluev <email@hidden> wrote: 
 On Tue, 1 Jul 2008 11:27:17, "Sorin Negoita" <email@hidden> wrote:

[...]

That's correct.

[...]

Are you sure you test it using just one process ? I use to run this code in a loop with a sleep to have enough time to unmount/mount the stick. If I restart my process after unmount/mount, everything works perfect.

[...]
]]>
Re: FSOpenIterator returns -43 http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00031.html Reply to list

I don't think it has ever been asked in this thread, but what volume  
format is the USB stick? By default most are Fat32 nowadays. I have a  
vague recollection of having issues with such volumes many years ago.  
If you are able to reformat it as HFS+, does it still show the same  
problem? [...]
]]>
Re: FSOpenIterator returns -43 http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00030.html Reply to list
On Tue, 1 Jul 2008 11:27:17, "Sorin Negoita"

[...]

I take it you mean "by unmounting it in Finder, plugging it out and 
then 
inserting back in".

[...]

I can't reproduce this with my stick. FSOpenIterator returns noErr for 
me 
in this case. 

 Mike
]]>
Re: FSOpenIterator returns -43 http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00029.html Reply to list

Yes, I am recreating the FSRef. The strange thing is that FSRef created after unmount/mount is identical to the one created before unmount/mount (internal bytes from hidden array) and after the restart of the process (when my code runs ok) it is different. [...]
]]>
Re: catching click on window collapse button http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00028.html Reply to list

On Tue, 01 Jul 2008 13:29:54, "Gary L. Wade"

[...]

Nava Carmon  wrote:

[...]

You may also workaround it to handle collapse box "the WNE way" (so 
you manually call CollapseWindow if you wish, similar to how you 
handle close 
or zoom buttons): 

 //For non composited window   [...]
]]>
(no subject) http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00027.html Reply to list
Hello everybody! 
 I'm new to Carbon programming,and I have a question on window update. 
 in Windows I can use onpaint function to handle all painting jobs.That's 
when the window has an area needs to update ,call invalidate function can 
automately spawn a update event,and the window's procedure can call onpaint 
function to update that area.How can I do this on Mac? 
   
 2008-07-02 



 dh11111 

     
]]>
Re: Mouse wheel scrolling in X and Y at the same time? http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00026.html Reply to list

On Tue, 1 Jul 2008 10:10:06, Howard Moon <email@hidden> 
wrote: 

 On Jul 1, 2008, at 9:25 AM, Steve Mills wrote:  
 On Jul 1, 2008, at 11:19:13, Howard Moon wrote:

[...]

According to this:  
  *  Availability:
 *    Mac OS X:         in version 10.4 and later in Carbon. [...]
]]>
Re: setting keyboard modifiers http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00025.html Reply to list
Philip, Jean-Daniel, Jens,  
 Thank you for your directions. Now I am convinced that it is a lost war.  
 Alejandro  
 --
Alejandro Palencia
Open Studio Networks
+34 667 440 770  
 
]]>
Re: catching click on window collapse button http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00024.html Reply to list
Which custom events did you set it up to handle?  From what I just checked, you should be setting it up to listen for at least {kEventClassWindow,kEventWindowClickCollapseRgn} in order to do what it sounds like you want it to do.

[...]
]]>
Re: Auto hide scrollers in a Data Browser http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00023.html Reply to list

On Jul 1, 2008, at 1:14 PM, Dan Korn wrote:  
On Jul 1, 2008, at 11:22 AM, Greg Hulands wrote:

[...]

Actually I think you probably want DataBrowserChangeAttributes( db,  
kDataBrowserAttributeAutoHideScrollBars, 0 ). Note that this is  
available only in 10.5 and later. See HIDataBrowser.h. [...]
]]>
Re: Auto hide scrollers in a Data Browser http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00022.html Reply to list
[...]

Try the SetDataBrowserHasScrollBars function in ControlDefinitions.h.  
 Dan  
 
]]>
Re: ShowSheetWindow switches Spaces. Bug or no? http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00021.html Reply to list
[...]

I think we have a bug about this:

[...]

leads to odd window/sheet animation 

 -eric  
 
]]>
Re: Choosing language for custom localization http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00020.html Reply to list

On 01 Jul 2008, at 10:21, Uli Kusterer wrote:  
Am 01.07.2008 um 00:32 schrieb Philip Aker:

[...]

Indeed, I happen to have recently looked this up due to a question on  
our mailing list as well: 

***

[...]

http://www.google.com/search?hl=en&q=site%3Adeveloper.apple.com+obtain+user+language

[.. [...]
]]>
Re: catching click on window collapse button http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00019.html Reply to list

I tried to install a custom events handler on my resource window (non- 
composite), it ignores it for some reason. May be I should create a  
document window by myself? 
On Jul 1, 2008, at 8:29 PM, Gary L. Wade wrote: 

I don't think you can use WaitNextEvent to get click events on the   [...]
]]>
RE: catching click on window collapse button http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00018.html Reply to list
I don't think you can use WaitNextEvent to get click events on the collapse box; check CarbonEvents.h for the way to do this with CarbonEvents, which work fine even if you are also using WaitNextEvent.  If your window is a compositing window, you'll have to handle it differently, but the comments in the header should tell you what to do.

[...]
]]>
Re: kAESync, Contextual Menu Autoloading and Icon Refresh: Part 1 http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00017.html Reply to list

Le 1 juil. 08 à 18:58, Jofell Gallardo a écrit :

[...]

If can try to see what the Script does that you don't using some  
debugging tips. 

See the debugging magic technotes to show how to log Apple Event send  
by a process. Then log what the Script does and try to do the same   [...]
]]>
Re: Mouse wheel scrolling in X and Y at the same time? http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00016.html Reply to list

[...]

Right. You handle that one in >=10.5, and the old one in <10.5, where  
you *will* only get one axis at a time. The best way to handle this is  
to use the 10.5 sdk, set up your compiler directives for the min and  
max OS correctly (see MAC_OS_X_VERSION_MIN_REQUIRED and   [...]
]]>
Re: Mouse wheel scrolling in X and Y at the same time? http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00015.html Reply to list
On Jul 1, 2008, at 9:25 AM, Steve Mills wrote:  
 On Jul 1, 2008, at 11:19:13, Howard Moon wrote:

[...]

Thanks, Steve.  Interesting, but only available in 10.5.  We're  
compiling in 10.4, so it's not available to us yet. 

 Regards,
	-Howard  
 
]]>
Re: #include files <> vs "" not found? http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00014.html Reply to list

[...]

telling me i'm doing it wrong doesn't help.  I already have discovered  
how to do it wrong and i'm quite aware that it's not working. 
where can i set additional paths to check when angle brackets are used? 
i've tried all the obvious things. 
 [...]
]]>
kAESync, Contextual Menu Autoloading and Icon Refresh: Part 2 http://lists.apple.com/archives/carbon-dev/2008/Jul/msg00013.html Reply to list
My second problem is simple. I have a Contextual Menu Item bundle, and I want it to load upon Finder startup. By &quot;load&quot; I mean basically call &quot;queryInterface&quot; programmatically outside of Finder. This is a problem 'coz 
everytime Finder restarts, the overlay icons I create on the fly seems to not work.  I just want to ask for some routines similar to Dropbox's FinderLoadCM commandline (it's found under  Dropbox.app/Contents/Resources). 
 Thanks in advance from the Carbon noob. :D 
  
]]>