On 27.11.2011, at 09:38, Christian Schmitz wrote:

> Am 27.11.2011 um 08:16 schrieb Beatrix Willius:
> 
>> Playing a bit around with the toolbar.
>> 
>> - Setting enabled = false doesn't do anything.
> 
> Which one?
> The enabled property for NSToolbarItemMBS works fine here.

No, doesn't do anything for me. If I modify the constructor on myNSToolbarMBS

  TestItem = new MyNSToolbarItemMBS("test")
  TestItem.label = "Test"
  TestItem.Enabled = False

I get no change in behavior.

> 
>> - The example Toolbar customized (RS 2011r3).rbp doesn't like the line n = 
>> new NSNotificationMBS because some parameters are missing.
> 
> Simply remove it.

Was just trying to be helpful. I hate not working examples.
> 
>> - How do I communicate better the clicked item back to the window of the 
>> toolbar? In the Real toolbar this is quite easy with
>> 
> 
> Use CustomNSToolbarItemMBS class and make a subclass. Inside use the Action 
> event.

Ahem, communication between class and window is NOT having the class talking 
directly to the window. Take the method changeAttributes in the example 
NSFontPanel. This is as Non-OOP as you can get.

Sub changeAttributes()
  dim oldAttr as Dictionary = window1.dic
  dim newAttr as Dictionary = convertAttributes(oldAttr)
  
  window1.dic = newAttr
  
  for each k as Variant in newAttr.Keys
    window1.Liste.AddRow k.StringValue+" -> "+newAttr.Value(k).StringValue
  next

End Sub


Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals

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

Reply via email to