Re: NSTouchBar in Carbon

2016-12-12 Thread Richard Charles

> On Dec 11, 2016, at 11:22 PM, David M. Cotter  wrote:
> 
> So I need to programmatically instantiate an NSTouchBar, somehow

This may be somewhat related. I have an app that has an extensive custom 
toolbar using NSToolbar programmatically in Objective-C. Initially it appeared 
this was only possible in Interface Builder but as my Cocoa skills increased I 
found I could do lots of things programmatically that are done in Interface 
Builder.

As for Carbon I have no experience. My guess is that NSTouchBar is not usable 
with Carbon.

--Richard Charles


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTouchBar in Carbon

2016-12-12 Thread David M. Cotter
yes, it IS a carbon app but i can use objectiveC in it, so no problem there, i 
just need to know how to create an NSTouchBar

i’ve been hacking at the NSTouchBarCatalog demo sample app for days now, but no 
matter what i try i am unable to transplant that code into my app and have it 
work.  the documentation provided by apple, which i read, is not the same type 
of doc that was written back in the days of “inside mac”, it provides no sample 
or instruction on how to just create one programmatically, that i could find or 
suss out.

any help would be greatly appreciated, and even be rewarded with a free karaoke 
jukebox app!  :D  :D

-dave

> On Dec 12, 2016, at 5:08 AM, Richard Charles  wrote:
> 
> 
>> On Dec 11, 2016, at 11:22 PM, David M. Cotter  wrote:
>> 
>> So I need to programmatically instantiate an NSTouchBar, somehow
> 
> This may be somewhat related. I have an app that has an extensive custom 
> toolbar using NSToolbar programmatically in Objective-C. Initially it 
> appeared this was only possible in Interface Builder but as my Cocoa skills 
> increased I found I could do lots of things programmatically that are done in 
> Interface Builder.
> 
> As for Carbon I have no experience. My guess is that NSTouchBar is not usable 
> with Carbon.
> 
> --Richard Charles
> 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTouchBar in Carbon

2016-12-12 Thread Alex Zavatone
When in our Objective-C app, when we need to create nice interfaces to talk to 
our c library, we create an interface layer to handle chatting back and forth 
between the two.

There are lots of samples out there if you know how to look.

Here's one I just found.

http://philjordan.eu/article/mixing-objective-c-c++-and-objective-c++

Hope it helps.

- Alex Zavatone

On Dec 12, 2016, at 10:45 AM, David M. Cotter wrote:

> yes, it IS a carbon app but i can use objectiveC in it, so no problem there, 
> i just need to know how to create an NSTouchBar
> 
> i’ve been hacking at the NSTouchBarCatalog demo sample app for days now, but 
> no matter what i try i am unable to transplant that code into my app and have 
> it work.  the documentation provided by apple, which i read, is not the same 
> type of doc that was written back in the days of “inside mac”, it provides no 
> sample or instruction on how to just create one programmatically, that i 
> could find or suss out.
> 
> any help would be greatly appreciated, and even be rewarded with a free 
> karaoke jukebox app!  :D  :D
> 
> -dave
> 
>> On Dec 12, 2016, at 5:08 AM, Richard Charles  wrote:
>> 
>> 
>>> On Dec 11, 2016, at 11:22 PM, David M. Cotter  wrote:
>>> 
>>> So I need to programmatically instantiate an NSTouchBar, somehow
>> 
>> This may be somewhat related. I have an app that has an extensive custom 
>> toolbar using NSToolbar programmatically in Objective-C. Initially it 
>> appeared this was only possible in Interface Builder but as my Cocoa skills 
>> increased I found I could do lots of things programmatically that are done 
>> in Interface Builder.
>> 
>> As for Carbon I have no experience. My guess is that NSTouchBar is not 
>> usable with Carbon.
>> 
>> --Richard Charles
>> 
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTouchBar in Carbon

2016-12-12 Thread David M. Cotter
that’s great, and that’s the idea yes, and i’ve been TRYING to do that very 
thing, all week. Tthe problem is i don’t know how, specifically with 
NSTouchBar, and i don’t know what’s required, specifically with NSTouchBar.  

If i knew how to do it, i’d be doing it.  

sorry, i don’t mean to whine, but i was hoping some kind soul, who knows way 
more than i do about NSTouchBar, could provide a specific example?

> On Dec 12, 2016, at 9:44 AM, Alex Zavatone  wrote:
> 
> When in our Objective-C app, when we need to create nice interfaces to talk 
> to our c library, we create an interface layer to handle chatting back and 
> forth between the two.
> 
> There are lots of samples out there if you know how to look.
> 
> Here's one I just found.
> 
> http://philjordan.eu/article/mixing-objective-c-c++-and-objective-c++ 
> 
> 
> Hope it helps.
> 
> - Alex Zavatone
> 
> On Dec 12, 2016, at 10:45 AM, David M. Cotter wrote:
> 
>> yes, it IS a carbon app but i can use objectiveC in it, so no problem there, 
>> i just need to know how to create an NSTouchBar
>> 
>> i’ve been hacking at the NSTouchBarCatalog demo sample app for days now, but 
>> no matter what i try i am unable to transplant that code into my app and 
>> have it work.  the documentation provided by apple, which i read, is not the 
>> same type of doc that was written back in the days of “inside mac”, it 
>> provides no sample or instruction on how to just create one 
>> programmatically, that i could find or suss out.
>> 
>> any help would be greatly appreciated, and even be rewarded with a free 
>> karaoke jukebox app!  :D  :D
>> 
>> -dave
>> 
>>> On Dec 12, 2016, at 5:08 AM, Richard Charles >> > wrote:
>>> 
>>> 
 On Dec 11, 2016, at 11:22 PM, David M. Cotter >>> > wrote:
 
 So I need to programmatically instantiate an NSTouchBar, somehow
>>> 
>>> This may be somewhat related. I have an app that has an extensive custom 
>>> toolbar using NSToolbar programmatically in Objective-C. Initially it 
>>> appeared this was only possible in Interface Builder but as my Cocoa skills 
>>> increased I found I could do lots of things programmatically that are done 
>>> in Interface Builder.
>>> 
>>> As for Carbon I have no experience. My guess is that NSTouchBar is not 
>>> usable with Carbon.
>>> 
>>> --Richard Charles
>>> 
>> 
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com 
>> )
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com 
>> 
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com 
>> 
>> 
>> This email sent to z...@mac.com
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTouchBar in Carbon

2016-12-12 Thread Jens Alfke
I haven’t used NSTouchBar at all yet, but from the API in the header file, it 
looks like you can instantiate one with -init, configure it, and then assign it 
to the touchBar property of the NSApplication instance.

(I'm assuming that even a Carbon-based app process has an NSApplication these 
days. You can access it via the global variable NSApp.)

—Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTouchBar in Carbon

2016-12-12 Thread Richard Charles

> On Dec 12, 2016, at 9:45 AM, David M. Cotter  wrote:
> 
> yes, it IS a carbon app but i can use objectiveC in it, so no problem there, 
> i just need to know how to create an NSTouchBar

Yes I know you have a Carbon app.

> i’ve been hacking at the NSTouchBarCatalog demo sample app for days now, but 
> no matter what i try i am unable to transplant that code into my app and have 
> it work.

Perhaps you should try the Carbon-dev mailing list.

--Richard Charles


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTouchBar in Carbon

2016-12-12 Thread Gary L. Wade
NSApplication may add too much conflicting infrastructure to a Carbon app, but 
I don’t know for sure since I went whole-Cocoa after first adding the 
drag-to-trash-poof animation to a Carbon app years ago.  However, you might be 
able to subclass NSWindow and add your own makeTouchBar method to it and use 
that to call initWithWindowRef: on your Carbon window.  That may be enough to 
tie into Cocoa’s responder chain; not sure how controls can be bridged from 
Carbon to Cocoa, but at least the NSWindow would be the best place to know how 
to configure a touch bar.
--
Gary L. Wade
http://www.garywade.com/ 
> On Dec 12, 2016, at 11:22 AM, Jens Alfke  wrote:
> 
> I haven’t used NSTouchBar at all yet, but from the API in the header file, it 
> looks like you can instantiate one with -init, configure it, and then assign 
> it to the touchBar property of the NSApplication instance.
> 
> (I'm assuming that even a Carbon-based app process has an NSApplication these 
> days. You can access it via the global variable NSApp.)
> 
> —Jens

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTouchBar in Carbon

2016-12-12 Thread Alex Zavatone
Yeah, that's why I included the link that should show how to do it.

Does that not explain it?  If not, I'll dig up some code that we use to make a 
class for PJSIP that creates an interface between SIP's C and Objective-C.  

There's source out there from a nice guy who took the time to write this all 
up.  X Chen.

http://www.xianwenchen.com/blog/2014/07/15/how-to-make-an-ios-voip-app-with-pjsip-part-5/

This should show ya.  (From the link)

As we mentioned before, the interfaces of pjsip functions are in C. So in order 
to call pjsip methods, normally, we would create a C file to encapsulate 
invocation of pjsip methods, and then expose the methods of this C file via a 
header file.

I SINCERELY hope this helps remove some of the stress. 

Let me know.
- Alex Zavatone

On Dec 12, 2016, at 12:23 PM, David M. Cotter wrote:

> that’s great, and that’s the idea yes, and i’ve been TRYING to do that very 
> thing, all week. Tthe problem is i don’t know how, specifically with 
> NSTouchBar, and i don’t know what’s required, specifically with NSTouchBar.  
> 
> If i knew how to do it, i’d be doing it.  
> 
> sorry, i don’t mean to whine, but i was hoping some kind soul, who knows way 
> more than i do about NSTouchBar, could provide a specific example?
> 
>> On Dec 12, 2016, at 9:44 AM, Alex Zavatone  wrote:
>> 
>> When in our Objective-C app, when we need to create nice interfaces to talk 
>> to our c library, we create an interface layer to handle chatting back and 
>> forth between the two.
>> 
>> There are lots of samples out there if you know how to look.
>> 
>> Here's one I just found.
>> 
>> http://philjordan.eu/article/mixing-objective-c-c++-and-objective-c++
>> 
>> Hope it helps.
>> 
>> - Alex Zavatone
>> 
>> On Dec 12, 2016, at 10:45 AM, David M. Cotter wrote:
>> 
>>> yes, it IS a carbon app but i can use objectiveC in it, so no problem 
>>> there, i just need to know how to create an NSTouchBar
>>> 
>>> i’ve been hacking at the NSTouchBarCatalog demo sample app for days now, 
>>> but no matter what i try i am unable to transplant that code into my app 
>>> and have it work.  the documentation provided by apple, which i read, is 
>>> not the same type of doc that was written back in the days of “inside mac”, 
>>> it provides no sample or instruction on how to just create one 
>>> programmatically, that i could find or suss out.
>>> 
>>> any help would be greatly appreciated, and even be rewarded with a free 
>>> karaoke jukebox app!  :D  :D
>>> 
>>> -dave
>>> 
 On Dec 12, 2016, at 5:08 AM, Richard Charles  wrote:
 
 
> On Dec 11, 2016, at 11:22 PM, David M. Cotter  wrote:
> 
> So I need to programmatically instantiate an NSTouchBar, somehow
 
 This may be somewhat related. I have an app that has an extensive custom 
 toolbar using NSToolbar programmatically in Objective-C. Initially it 
 appeared this was only possible in Interface Builder but as my Cocoa 
 skills increased I found I could do lots of things programmatically that 
 are done in Interface Builder.
 
 As for Carbon I have no experience. My guess is that NSTouchBar is not 
 usable with Carbon.
 
 --Richard Charles
 
>>> 
>>> 
>>> ___
>>> 
>>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>> 
>>> Please do not post admin requests or moderator comments to the list.
>>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>> 
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
>>> 
>>> This email sent to z...@mac.com
>> 
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com