New topic: REALArray element type
<http://forums.realsoftware.com/viewtopic.php?t=44014> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message mistiko Post subject: REALArray element typePosted: Tue May 15, 2012 4:07 am Joined: Wed Sep 10, 2008 3:22 pm Posts: 25 Location: Italy Hi everyone, I'm developing my first plugin and I need some suggestions on how to detect elements type within a realbasic array. More precisely the class in my plugin need a method like this one Constructor(vect() as Variant) which will be called in the following ways: 1) Dim myClass as new PluginClass(array(1,2,3,4)) 2) Dim myClass as new PluginClass(array(1.0, 2.0, 3.0, 4.0)) Within the c++ plugin code how can I determine that in the first case array elements are integers while in case two are float? I think that being a Variant array, elements type should be REALObject and from this I can inspect the "Type" property within the variant object. Is that correct? Another solution would be to expose different constructor methods for each array type. What do you suggest? Many Thanks Bye Marco 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]
