Xojo Conferences
XDCMay2019MiamiUSA

[MBS] How to get the value for kCFPreferencesCurrentHost (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] file access in threadMBS
Next thread: [MBS] 8.2pr2


RE: [MBS] DOM classes for Mac OS X HTMLViewer   -   Giovanni
  [MBS] How to get the value for kCFPreferencesCurrentHost   -   Charles E. Heizer
   Re: [MBS] How to get the value for kCFPreferencesCurrentHost   -   Christian Schmitz
    Re: [MBS] How to get the value for kCFPreferencesCurrentHost   -   Charles E. Heizer
     Re: [MBS] How to get the value for kCFPreferencesCurrentHost   -   Christian Schmitz
      Re: [MBS] How to get the value for kCFPreferencesCurrentHost   -   Charles E. Heizer
       Re: [MBS] How to get the value for kCFPreferencesCurrentHost   -   Christian Schmitz

[MBS] How to get the value for kCFPreferencesCurrentHost
Date: 07.03.08 17:40 (Fri, 7 Mar 2008 08:40:00 -0800)
From: Charles E. Heizer
Hello,
I was wondering how can I get the value for kCFPreferencesCurrentHost.

I was trying something like this but was unable to get anywhere.

Thanks,
- Charles

dim c as CFPreferencesMBS
dim o as CFObjectMBS

c=new CFPreferencesMBS

o = c.GetValue(c.kCFPreferencesCurrentHost)
CFShowMBS o
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] How to get the value for kCFPreferencesCurrentHost
Date: 07.03.08 19:17 (Fri, 7 Mar 2008 19:17:51 +0100)
From: Christian Schmitz
Charles E. Heizer <<email address removed>> wrote:

> Hello,
> I was wondering how can I get the value for kCFPreferencesCurrentHost.

This constant is to beused for the calls to CFPreference to select the
preferences for the Mac your app is running on.

Gruß
Christian

-

Re: [MBS] How to get the value for kCFPreferencesCurrentHost
Date: 07.03.08 19:21 (Fri, 7 Mar 2008 10:21:25 -0800)
From: Charles E. Heizer
Hi, thanks... I do realize that, what I'm trying to do is get that value.

Thanks,
- Charles

On 3/7/08 10:17 AM, "Christian Schmitz" <<email address removed>> wrote:

Charles E. Heizer <<email address removed>> wrote:

> Hello,
> I was wondering how can I get the value for kCFPreferencesCurrentHost.

This constant is to beused for the calls to CFPreference to select the
preferences for the Mac your app is running on.

Gruß
Christian

-

Re: [MBS] How to get the value for kCFPreferencesCurrentHost
Date: 07.03.08 19:27 (Fri, 7 Mar 2008 19:27:25 +0100)
From: Christian Schmitz
Charles E. Heizer <<email address removed>> wrote:

> Hi, thanks... I do realize that, what I'm trying to do is get that value.

dim k as new CFPreferencesMBS

MsgBox k.kCFPreferencesCurrentHost.Str

The value of this constant is "kCFPreferencesCurrentHost".

It is just a constant.

If you need the local host name, I could add a function to the system
information module.

Gruß
Christian

-

Re: [MBS] How to get the value for kCFPreferencesCurrentHost
Date: 07.03.08 19:36 (Fri, 7 Mar 2008 10:36:15 -0800)
From: Charles E. Heizer
Huh, well let me explain more...

I¹m looking for the UUID value which used to be the MAC address of en0. It
has now changed on the newer systems to a generated UUID.

So right now I have created a Foundation tool called genuuid which creates a
dummy plist file which I then read it¹s name and get the 4th element in the
name, which is the UUID.

CFPreferencesSetValue(CFSTR("testpref"), CFSTR("File Create for genuuid"),
kBundleID, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost);

This code will create the ByHost file with the UUID number, which I thought
was some how stored in the kCFPreferencesCurrentHost.

If it's not, then does the MBS plugin set have a wau to get that uuid.

Thanks,
- Charles

On 3/7/08 10:27 AM, "Christian Schmitz" <<email address removed>>
wrote:

> Charles E. Heizer <<email address removed>> wrote:
>
>> Hi, thanks... I do realize that, what I'm trying to do is get that value.
>
> dim k as new CFPreferencesMBS
>
> MsgBox k.kCFPreferencesCurrentHost.Str
>
> The value of this constant is "kCFPreferencesCurrentHost".
>
> It is just a constant.
>
> If you need the local host name, I could add a function to the system
> information module.
>
> Gruß
> Christian
>
> --
> Over 900 classes with 18000 functions in one REALbasic plug-in.
> The Monkeybread Software Realbasic Plugin v8.1.
>
> <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] How to get the value for kCFPreferencesCurrentHost
Date: 11.03.08 01:19 (Tue, 11 Mar 2008 01:19:34 +0100)
From: Christian Schmitz
Charles E. Heizer <<email address removed>> wrote:

> CFPreferencesSetValue(CFSTR("testpref"), CFSTR("File Create for genuuid"),
> kBundleID, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost);

this should work:

dim c as new cfpreferencesMBS

c.setValue
newcfstringMBS("key"),newcfstringMBS("value"),newcfstringMBS("preffile")
,c.kCFPreferencesCurrentUser,c.kcfPreferencesCurrentHost

call
c.Synchronize(newcfstringMBS("preffile"),c.kCFPreferencesCurrentUser,c.k
cfPreferencesCurrentHost)

and later you can read the value using:

dim c as new cfpreferencesMBS
dim o as CFObjectMBS


o=c.CopyValue(newcfstringMBS("key"),newcfstringMBS("preffile"),c.kCFPref
erencesCurrentUser,c.kcfPreferencesCurrentHost)
if o isa CFStringMBS then
MsgBox CFStringMBS(o).str
end if

Basicly this example uses "preffile" as the application ID.

Gruß
Christian

-