Hello, can somebody give me an example of an FXChoiceBox? f = File.open("icons/bigpenguin.png", "rb") icon = FXPNGIcon.new(getApp(), f.read) choice = FXChoiceBox.ask(getApp(), opts = 0, caption = "Unbekannter Eintrag", text = "Wirklich neuen Wert anlegen?", icon, ["Ja", "Nein"]) self.text = "" if choice == 1 This just does not work. What do I do wrong and where do I get such easy example code? Is there somewhere a database of code snippets for FXRuby? Thanks Uwe -- *********************************************************************** Uwe Hartl e-mail: Uwe.Hartl at gmx.net 91522 Ansbach Telephone: (0981) 9724526 Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 Germany ***********************************************************************
On Feb 27, 2006, at 4:24 PM, Uwe Hartl wrote:> can somebody give me an example of an FXChoiceBox? > f = File.open("icons/bigpenguin.png", "rb") > icon = FXPNGIcon.new(getApp(), f.read) > choice = FXChoiceBox.ask(getApp(), opts = 0, caption = "Unbekannter > Eintrag", text = "Wirklich neuen Wert anlegen?", icon, ["Ja", "Nein"]) > self.text = "" if choice == 1 > > This just does not work. What do I do wrong and where do I get such > easy > example code?Your code looks fine; there appears to be a bug in the wrappers for this function. I''ve added a bug report and this should get fixed in the next release.
Thank youvery much. I just wait until it happens. See you Uwe On Tuesday 28 February 2006 01:21, Lyle Johnson wrote:> On Feb 27, 2006, at 4:24 PM, Uwe Hartl wrote: > > can somebody give me an example of an FXChoiceBox? > > f = File.open("icons/bigpenguin.png", "rb") > > icon = FXPNGIcon.new(getApp(), f.read) > > choice = FXChoiceBox.ask(getApp(), opts = 0, caption = "Unbekannter > > Eintrag", text = "Wirklich neuen Wert anlegen?", icon, ["Ja", "Nein"]) > > self.text = "" if choice == 1 > > > > This just does not work. What do I do wrong and where do I get such > > easy > > example code? > > Your code looks fine; there appears to be a bug in the wrappers for > this function. I''ve added a bug report and this should get fixed in the > next release.-- *********************************************************************** Uwe Hartl e-mail: Uwe.Hartl at gmx.net 91522 Ansbach Telephone: (0981) 9724526 Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 Germany ***********************************************************************