New topic: Possible to return 2D object array
<http://forums.realsoftware.com/viewtopic.php?t=47577> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message doofus Post subject: Possible to return 2D object arrayPosted: Fri Apr 12, 2013 1:09 pm Joined: Thu Sep 10, 2009 2:50 am Posts: 393 Location: Santa Cruz, CA, USA this works Function TestInteger() As Integer(,) dim t(2, 2) As Integer return t End Function dim a(-1, -1) As Integer = TestInteger but this doesn't Function TestObject() As MyClass(,) dim t(2, 2) As MyClass return t End Function dim a(-1, -1) As MyClass = TestObject Gives compile error Window1.Name (property value), This type conversion is only implemented for one-dimensional arrays, Name:Window1 Is this supposed to work? Mac 2012r2.1 Top Karen Post subject: Re: Possible to return 2D object arrayPosted: Fri Apr 12, 2013 1:35 pm Joined: Fri Sep 30, 2005 8:53 am Posts: 982 i would have thought it would work, but apparently not (just tried it). A work around is to pass in a 2D array to the method... Either ByRef or not can be workable depending on what you are doing. You also might be able to return a 2D object array in a variant if you want to go that route - Karen Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- 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]
