Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Basic4ppc Wishlist > Bug Reports
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Bug Reports Post about errors or bugs encountered.

How Is This Conversion An Error?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-20-2007, 05:59 AM
Senior Member
 
Join Date: May 2007
Posts: 125
Default How Is This Conversion An Error?

Hi.
In Basic4ppc when I pass one type from a library to another, different library I get an error from Basic4ppc that says the objects cannot be converted even though they are of the same type.
E.G. When I made a dll to re-wrap the Channel class in Hekkus and made my New1 method accept a new Channel object that is passed by Speaker.Channel, when I pass it directly to my Channel wrapper Basic4ppc says the HssNET.Channel can't be converted to hssNET.Channel. Any suggestions? Making a Channel.value property to hold the object didn't help either. I need to do it this way because all methods in the Channel class are pure .NET Virtual calls and the New1 method in the original hssNET desktop/device can't be called from Basic4ppc and are NOT suppose to because of this.
Thanks everyone.
Reply With Quote
  #2 (permalink)  
Old 11-20-2007, 06:54 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,701
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You need to create a Value (the name isn't important) that returns the actual object.
Reply With Quote
  #3 (permalink)  
Old 11-20-2007, 07:32 AM
Senior Member
 
Join Date: May 2007
Posts: 125
Default

Hi. In the hssNetdesktop/device.dll, the Speaker.Channel returns a new Channel object. When I pass the new object to my wrapped Channel class directly like this chl.New1 'Chl is a ChannelWrapper object
c = speaker.PlaySound(Sound1.value)
chl.value = speaker.Channel(c) 'This call returns a brand new Channel object, assigning it to chl.value
Basic4ppc shows the Conversion error on the chl.value line. My wrapped object accepts Channel objects by value. I got a Visual Basic error when trying to do it by Reference. Thanks.
Reply With Quote
  #4 (permalink)  
Old 11-20-2007, 08:02 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,701
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Can you post the code of ChannelWrapper ?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Petite question sur la conversion d'un code VB6 en Basic4ppc GallyHC French Forum 11 05-27-2008 01:25 PM
GPS and Conversion forisco Questions (Windows Mobile) 6 11-13-2007 09:29 PM
Conversion and trig functs bdiscount Additional Libraries 0 10-08-2007 03:55 PM
Numeric conversion limitation? agraham Bug Reports 5 07-06-2007 05:08 PM


All times are GMT. The time now is 03:01 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0