Quantcast
Viewing all articles
Browse latest Browse all 3860

About new "NWPathMonitor Test" MBS example

Hello,

In the “/MacOSX/NWPathMonitor Test” example which uses the new NWPathMonitor class, i want to make a function which returns whether a network connection (Internet) is detected or not but I cannot see what the “value” parameter corresponds to (Dim path As NWPathMBS = value), which seems closely linked to the listbox, to replace it with a value passed as a function parameter. If anyone can enlighten me…

List.ExpandRow
Dim value As Variant = Me.RowTagAt(row)
AddValue value
Dim path As NWPathMBS = value
Dim StatusText As String
Select Case path.Status
Case path.kStatusSatisfiable
  StatusText = "Satisfiable" 
Case path.kStatusUnsatisfied
  StatusText = "Unsatisfied"
Case path.kStatusSatisfied
  StatusText = "Satisfied" 
Case path.kStatusInvalid
  StatusText = "Invalid" 
End Select

List.AddRow "Status", path.Status.ToString+" "+StatusText

Moreover, in this example, how to replace the obsolete “List.AddFolder” (in the AddValue method) and which accepts two parameters, one of which is a class (NWInterfaceMBS), with List.AddExpandableRow() which takes a single text value and generates an error on the class?

Thanks.

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 3860

Trending Articles