Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Bug Reports
Home Register FAQ Members List 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, 06:59 AM
Knows the basics
 
Join Date: May 2007
Posts: 98
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, 07:54 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,134
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, 08:32 AM
Knows the basics
 
Join Date: May 2007
Posts: 98
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, 09:02 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,134
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 On
Pingbacks are On
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 02:25 PM
GPS and Conversion forisco Questions & Help Needed 6 11-13-2007 10:29 PM
Conversion and trig functs bdiscount Additional Libraries 0 10-08-2007 04:55 PM
Numeric conversion limitation? agraham Bug Reports 5 07-06-2007 06:08 PM


All times are GMT. The time now is 11:18 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0