New topic: RBScript
<http://forums.realsoftware.com/viewtopic.php?t=41043> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message eliott Post subject: RBScriptPosted: Tue Oct 18, 2011 12:08 am Joined: Sun Oct 17, 2010 9:46 am Posts: 52 Location: Berlin, Germany One can unfortunately not use Variants as method parameters in the context object for a RBScript (the script will not compile): Code:Class Context Sub DoSomething() ... Sub DoSomething(Variant) ... Sub DoSomething(Variant, Variant) ... Sub DoSomething(Variant, Variant, Variant) ... ... First I did this, which is somehow annoying:Code:Class Context // no parameters Sub DoSomething() ... // 1 parameter Sub DoSomething(String) ... Sub DoSomething(Integer) ... Sub DoSomething(Double) ... ... // 2 parameters Sub DoSomething(String, String) ... Sub DoSomething(String, Integer) ... Sub DoSomething(String, Double) ... Sub DoSomething(Integer, String) ... Sub DoSomething(Integer, Integer) ... Sub DoSomething(Integer, Double) ... Sub DoSomething(Double, String) ... ... // 3 parameters ... // and so on ... // and the same for functions ... End ClassDoes anybody have an idea how to circumvent these limitations to the method parameters of the context object? The only solution I could come up with, is this: Code:Class Context Enqueue(value As String) Enqueue(value As Integer) Enqueue(value As Double) ... Sub DoSomethingWrapper() // Calls the appropriate DoSomething method with the enqueued values End Class Does somebody have a better idea? Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
