Rick Posted July 11, 2010 Share Posted July 11, 2010 So what's up with Core.CreateX commands all returning IntPtr? I store pivots in a dictionary of objects with a key of string, but having issues casting back when I need it. Says can't cast from IntPtr to Pivot. How should I be casting things back to their type when they are created with Core.Create... Quote Link to comment Share on other sites More sharing options...
TylerH Posted July 11, 2010 Share Posted July 11, 2010 You really shouldn't be using the Core commands, or atleast that is the aim and paradigm of the OO Wrapper. The IntPtr is the handle to the Leadwerks-managed entity, so new Pivot(the IntPtr) will result with what you need. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Rick Posted July 11, 2010 Author Share Posted July 11, 2010 So when using Core.Create... if I want to get that object I have to create a new type and pass the pointer to it? Good thing you are creating the new wrapper because I don't like that Core design. Quote Link to comment Share on other sites More sharing options...
TylerH Posted July 11, 2010 Share Posted July 11, 2010 It is being spearheaded by Lazlo, we kind of have our own specialty areas that we both contribute from. Basically there will be two ways we intend people to use the wrapper: - 100% OOP with no exposure to the Core class (recommended) - 100% Core with no OO (not recommended) Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
L B Posted July 11, 2010 Share Posted July 11, 2010 Do as if Core didn't exist. If you want a pivot, use: Pivot myPivot = new Pivot(); If you want a body pivot, use: BodyPivot myBodyPivot = new BodyPivot(); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.