473,785 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JLCA error 1209, Method was not converted to a property

I am converting several small J++ applications to C# using the JLCA with
Visual Studio 2005. There are lots of errors 1209 "Method was not converted
to a property".

I'm curious as to WHY they were not converted to a property. Some
get-and-set pairs get converted, some don't, it all seems rather random.

Some get-and-set pairs are not converted because because the 'set' method is
overloaded. I can see a 1209 here I guess.

But most of the 1209 errors are for ordinary get-and-set pairs that are not
overloaded.

I'm curious as to the reasons a 1209 error would be generated.

Thanks for your time.
Mar 1 '06 #1
2 1510
Pete <Pe**@discussio ns.microsoft.co m> wrote:
I am converting several small J++ applications to C# using the JLCA with
Visual Studio 2005. There are lots of errors 1209 "Method was not converted
to a property".

I'm curious as to WHY they were not converted to a property. Some
get-and-set pairs get converted, some don't, it all seems rather random.

Some get-and-set pairs are not converted because because the 'set' method is
overloaded. I can see a 1209 here I guess.

But most of the 1209 errors are for ordinary get-and-set pairs that are not
overloaded.

I'm curious as to the reasons a 1209 error would be generated.


Do they have different access (one public, one private) by any chance?
Prior to C# 2.0 that wasn't expressible in C# - perhaps the JLCA hasn't
been updated to take account of that new feature?

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Mar 1 '06 #2
"Jon Skeet [C# MVP]" wrote:
Pete <Pe**@discussio ns.microsoft.co m> wrote:
I am converting several small J++ applications to C# using the JLCA with
Visual Studio 2005. There are lots of errors 1209 "Method was not converted
to a property".

I'm curious as to WHY they were not converted to a property. Some
get-and-set pairs get converted, some don't, it all seems rather random.

Some get-and-set pairs are not converted because because the 'set' method is
overloaded. I can see a 1209 here I guess.

But most of the 1209 errors are for ordinary get-and-set pairs that are not
overloaded.

I'm curious as to the reasons a 1209 error would be generated.


Do they have different access (one public, one private) by any chance?
Prior to C# 2.0 that wasn't expressible in C# - perhaps the JLCA hasn't
been updated to take account of that new feature?

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


Hello Jon,

In my case, the access levels were the same. However, your question
kickstarted several ideas to my brain. One of them turned out to be the
solution to the problem I was having.

If a get-and-set pair has one of the methods overloaded, the JLCA does not
convert that J++ property to a C# property. For example,

String getSomePropert( ) { ... }
void setSomeProperty (String) { ... }

would convert to a C# property no problem. Unfortunately my application
also has a

void setSomeProperty (int, String)

and this is what causes a 1209 from the JLCA. If that setSomeProperty (int,
String) exists in a subclass, the problem also happens.

That was the case I had going on in my application. Thank you Jon for
responding and kickstarting me down the right path. I very much appreciate
your time!

Mar 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3672
by: James | last post by:
Hello Java NG, I not sure if this is the right NG for this type of question but if not please let me know which is, TIA Any way first off let me say I'm a student and this WAS last weeks lab, turned in, graded and passed so I'm not trying to get someone to do my lab assignments, but after I got this back I was reading about the DecimalFormat and I tried to format my output but I keep getting an error message. can anyone please tell me...
6
4753
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
2
10117
by: Wayne | last post by:
The following which is driving me nuts has occurred in 2 of my databases. Both databases were written in Access 2003 and then converted back to Access 2000 format. I've done this so I can create an Access 2K mde for compatibility reasons. Everything worked fine: the database could be compiled and converted to an .mde several times. Then for no apparent reason when I tried to compile again I got the following error: "Compile Error: Can't...
4
1618
by: Viktor Popov | last post by:
Hi, I'm trying to execute stored procedure and I collect its parameters from WebForm. There is an error: Error converting data type varchar to int. What could be the problem? Here it is the code: private void Button2_Click(object sender, System.EventArgs e) {
0
23511
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub) 5: Procedure call or argument is not valid. 6: Overflow. 7: Out of memory.
13
1562
by: Jim in Arizona | last post by:
I made a page with a gridview that has rows show a different color if a number in a column is greater than or equal to 45. I also did this conditional formatting for the column next to it. Here's my code. in the aspx file =============================== <asp:GridView ID="gvData" runat="server" OnRowDataBound="doColor"> =============================== in the aspx.vb file
2
4242
by: Benton | last post by:
Hi there, I'm creating a custom server control, inheriting from TextBox. It has this AsDateTime property that returns the textbox contents converted to the nullable DateTime data type, as follows: public class TextBoxWeb : System.Web.UI.WebControls.TextBox {
2
2318
by: ghostrider | last post by:
I've been trying to clear these error messages that I keep getting, was wondering if someone could help me out here. 1. Value of type '1-dimensional array of String' cannot be converted to 'String'. C:\Users\Black & Gold\AppData\Local\Temporary\projects\WindowsApplication1\Form1.vb 59 33 WindowsApplication1 2. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.VisualBasic.AscW' to interpret a character as a Unicode value or...
5
1478
by: Rafe | last post by:
Hi, I've been thinking in circles about these aspects of Pythonic design and I'm curious what everyone else is doing and thinks. There are 3 issues here: 1) 'Declaring' attributes - I always felt it was good code practice to declare attributes in a section of the class namespace. I set anything that is constant but anything variable is set again in __init__():
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10327
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10151
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8973
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.