473,394 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 1488
Pete <Pe**@discussions.microsoft.com> 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.com>
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**@discussions.microsoft.com> 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.com>
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
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,...
6
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...
2
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...
4
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...
0
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)...
13
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...
2
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...
2
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...
5
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...

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.