It is currently Fri Dec 06, 2019 12:09 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: 5.7.1 ComputerName() returns cryptic strings...
PostPosted: Sun Aug 18, 2019 12:42 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jun 11, 2004 7:07 am
Posts: 600
Code:
Debug ComputerName()

p200300f6af1f660b001eb114855db565.dip0.t-ipconnect.de

:shock:

Mac OS 10.12.6


Last edited by Lebostein on Sun Aug 18, 2019 12:43 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: 5.7.1 ComputerName() returns cryptic strings...
PostPosted: Sun Aug 18, 2019 12:43 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jun 11, 2004 7:07 am
Posts: 600
If I turn off WiFi, then I get the correct name:

Lebomac.local


Top
 Profile  
Reply with quote  
 Post subject: Re: 5.7.1 ComputerName() returns cryptic strings...
PostPosted: Sun Aug 18, 2019 12:54 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2053
Location: Germany
Should actually be repaired...
Link: viewtopic.php?f=24&t=72842

Code:
For i = 1 To 20
  host = CocoaMessage(0, 0, "NSHost currentHost")
  hostName = CocoaMessage(0, host, "name")
  string = CocoaMessage(0, hostName, "UTF8String")
  Debug "current Host = " + PeekS(string, -1, #PB_UTF8)

  localisedName = CocoaMessage(0, host, "localizedName")
  string = CocoaMessage(0, localisedName, "UTF8String")
  Debug "localized Name = " +PeekS(string, -1, #PB_UTF8)
 
  Debug "PB CompuerName = " + ComputerName()
  Debug "----"
  Delay(500)
Next

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: 5.7.1 ComputerName() returns cryptic strings...
PostPosted: Sun Aug 18, 2019 1:37 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jun 11, 2004 7:07 am
Posts: 600
Code:
current Host = p200300f6af1f660b001eb114855db565.dip0.t-ipconnect.de
localized Name = Lebomac
PB CompuerName = p200300f6af1f660b001eb114855db565.dip0.t-ipconnect.de

It seems ComputerName() returns the "currentHost"
I expect the "localizedName" as ComputerName()... or I am wrong?


Top
 Profile  
Reply with quote  
 Post subject: Re: 5.7.1 ComputerName() returns cryptic strings...
PostPosted: Sun Aug 18, 2019 2:21 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2053
Location: Germany
For me, the result of the currentHost function and the PB ComputerName function changes constantly between the macOS VM host and the VM window.

I also don't know a solution.

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye