Oh I see. Thanks for the info. I thought CF came much earlier.

--
Johannes Lundberg
BRILLIANTSERVICE CO., LTD.

On Wed, Jan 7, 2015 at 7:05 PM, Dr. H. Nikolaus Schaller <[email protected]>
wrote:

>
> Am 07.01.2015 um 10:28 schrieb Lundberg, Johannes <
> [email protected]>:
>
> I think plists is a great way to store preferences
>
>
> indeed. They are the grandfather of JSON.
>
> and with base+cf I could have a universal way to access and modify system
> preferences in plists from both ObjC and C. I image there might be a
> situation where I wanna use plists for compatibility with gnustep but there
> is no objc+base installed.
>
>
> Ok, I see.
>
> On OS X, CoreFoundation is a pure C base library and it is heavily used to
> implement Foundation.framework.
>
> But on GNUstep I think it is a wrapper around Base - just for
> compatibility reasons because there is a
> lot of software that did not use the higher level abstraction of Obj-C
> frameworks but mixes high- and
> low-level (because Apple encouraged to do so). So the low-level API was
> added in the most easy way.
>
> So it *might* be that you always need to link against Base to use CoreBase
> (but I have never tried it
> so this is not an authoritative answer).
>
> You could also look for Apple’s CoreFoundation - it is open source. Apple
> initially introduced it around
> OS X 10.3 or 10.4 to have a common base layer for making iTunes run on
> Linux and Windows as well.
>
> Before that there was no CoreFoundation and everything was done in Obj-C.
>
> BR,
> Nikolaus
>
>
>
> --
> Johannes Lundberg
> BRILLIANTSERVICE CO., LTD.
>
> On Wed, Jan 7, 2015 at 6:17 PM, Dr. H. Nikolaus Schaller <
> [email protected]> wrote:
>
>>
>> Am 07.01.2015 um 09:44 schrieb Lundberg, Johannes <
>> [email protected]>:
>>
>> Thanks Nikolaus!
>>
>> Yeah, I guess writing a simple c-wrapper and linking to base would be one
>> solution. But since this is pure C I was hoping to not have to link to ObjC
>> and base. Maybe I’ll do it as a temporary solution.
>>
>>
>> What is the problem with linking to objc and base? They are most likely
>> available on the deployment system (or why would you then want to access
>> NSUserDefaults?).
>>
>>
>> But in this case, what would [NSUserDefaults standardDefaults] return
>> since there is no bundle?
>>
>>
>> I think it just works but you don’t have defaults connected to the
>> bundleIdentifier. You can use [[NSUserDefaults alloc] initWithUser:user]
>> and -persistentDomainForName for any user name and identifier.
>>
>>
>> Btw, would CoreBase require linking to base? Sounds weird to me if it
>> would..
>>
>>
>> --
>> Johannes Lundberg
>> BRILLIANTSERVICE CO., LTD.
>>
>> On Wed, Jan 7, 2015 at 5:13 PM, Dr. H. Nikolaus Schaller <
>> [email protected]> wrote:
>>
>>>
>>> Am 07.01.2015 um 02:15 schrieb Lundberg, Johannes <
>>> [email protected]>:
>>>
>>> Hi
>>>
>>> Lately I been finding myself in the need of manipulating the defaults
>>> register from C code
>>>
>>>
>>> You can simply rename your source file to file.m. Obj-C is a superset of
>>> standard C.
>>>
>>> Or you can wrap Obj-C calls in a C function and link that .m file to
>>> your other C files.
>>> You alway have to link against Base.
>>>
>>> and I remember some discussion about CF a while ago where someone was
>>> working on it.
>>>
>>> What is the current status? How complete and usable is CF?
>>>
>>> Thanks!
>>> --
>>> Johannes Lundberg
>>> BRILLIANTSERVICE CO., LTD.
>>>
>>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>>> 秘密保持について:この電子メールは、名宛人に送信したものであり、秘匿特権の対象となる情報を含んでいます。
>>> もし、名宛人以外の方が受信された場合、このメールの破棄、およびこのメールに関する一切の開示、
>>> 複写、配布、その他の利用、または記載内容に基づくいかなる行動もされないようお願い申し上げます。
>>> ---
>>> CONFIDENTIALITY NOTE: The information in this email is confidential
>>> and intended solely for the addressee.
>>> Disclosure, copying, distribution or any other action of use of this
>>> email by person other than intended recipient, is prohibited.
>>> If you are not the intended recipient and have received this email in
>>> error, please destroy the original message.
>>> _______________________________________________
>>> Discuss-gnustep mailing list
>>> [email protected]
>>> https://lists.gnu.org/mailman/listinfo/discuss-gnustep
>>>
>>>
>>>
>>
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>> 秘密保持について:この電子メールは、名宛人に送信したものであり、秘匿特権の対象となる情報を含んでいます。
>> もし、名宛人以外の方が受信された場合、このメールの破棄、およびこのメールに関する一切の開示、
>> 複写、配布、その他の利用、または記載内容に基づくいかなる行動もされないようお願い申し上げます。
>> ---
>> CONFIDENTIALITY NOTE: The information in this email is confidential
>> and intended solely for the addressee.
>> Disclosure, copying, distribution or any other action of use of this
>> email by person other than intended recipient, is prohibited.
>> If you are not the intended recipient and have received this email in
>> error, please destroy the original message.
>>
>>
>>
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> 秘密保持について:この電子メールは、名宛人に送信したものであり、秘匿特権の対象となる情報を含んでいます。
> もし、名宛人以外の方が受信された場合、このメールの破棄、およびこのメールに関する一切の開示、
> 複写、配布、その他の利用、または記載内容に基づくいかなる行動もされないようお願い申し上げます。
> ---
> CONFIDENTIALITY NOTE: The information in this email is confidential
> and intended solely for the addressee.
> Disclosure, copying, distribution or any other action of use of this
> email by person other than intended recipient, is prohibited.
> If you are not the intended recipient and have received this email in
> error, please destroy the original message.
>
>
>

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
秘密保持について:この電子メールは、名宛人に送信したものであり、秘匿特権の対象となる情報を含んでいます。
もし、名宛人以外の方が受信された場合、このメールの破棄、およびこのメールに関する一切の開示、
複写、配布、その他の利用、または記載内容に基づくいかなる行動もされないようお願い申し上げます。
---
CONFIDENTIALITY NOTE: The information in this email is confidential
and intended solely for the addressee.
Disclosure, copying, distribution or any other action of use of this
email by person other than intended recipient, is prohibited.
If you are not the intended recipient and have received this email in
error, please destroy the original message.
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to