Christian, et. al., 

Here's an interesting problem:

In my main toolbar's Open event I have the following code which places a canvas 
into the toolbar (InformationView is an NSViewMBS window property). Everything 
usually works great. 

But, If the user holds down the "Option" key while launching the program, 
somehow this affects how controls get opened or displayed. In this case in the 
line: "tbar = Self.NSToolbarMBS", tbar ends up Nil which of course causes a 
crash. 

I'm at a complete loss as to why this might be.

Cheers.

-bill k


Sub Open()
  
  If TargetMacOS Then
    
    Dim tbar As NSToolbarMBS
    Dim item as NSToolbarItemMBS
    Dim items() As NSToolbarItemMBS
    
    tbar = Self.NSToolbarMBS
    items = tbar.Items
    
    InformationView = New NSViewMBS(cvsInformation.Handle)
    
    For Each item In items
      If item.Label = "Information Panel" Then
        item.View = InformationView
        item.MaxSize = NSMakeSizeMBS(cvsInformation.Width, 
cvsInformation.Height)
        item.MinSize = NSMakeSizeMBS(cvsInformation.Width, 
cvsInformation.Height)
      End If
    Next item
    
  End If
End Sub


_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to