|
|
|
|||||
|
Dummy c# mapping question
Hello!
I'm using the c# mapping for the first time and ran into the problem where the manual didn't help me. I have this slice definition: Code:
module Example01
{
struct Item
{
string key;
string value;
};
["cs:collection"] sequence<Item> DummyList;
class MyObject
{
bool setOptions(DummyList list);
};
};
Code:
if (m_object != null)
{
DummyList list = new DummyList();
Item item = new Item();
item.key = "key01";
item.value = "value01";
System.Console.WriteLine("Items in list:");
list.Add(item);
foreach(Item l in list)
{
System.Console.WriteLine(l.key);
}
m_object.setOptions(list);
}
Code:
public override bool setOptions(DummyList list, Ice.Current current)
{
System.Console.WriteLine("Items in list:");
foreach (Item l in list)
{
System.Console.WriteLine(l.key);
}
return true;
}
What am I doing wrong here? Things work with the standard array (Item[]) but the array functionality is not sufficient thus collection is required... I have attached the cited example to this posting. Hope it helps... Thanks in advance! |
|
|||||
|
Quote:
But apparently the error wasn't caused by me Might there be an error in the slice2cs compiler?!Stephan |
|
||||||
|
stephan,
dotnet sdk has a GUI debugger in folder GuiDebug. the error is in the ice generated code. zeroc guys should have a look at this. probably we need to post this in the forum 'bug reports' cu tom |
|
||||||
|
Sorry for the slow reply, I only just now saw this thread. I'll have a look at this today. Clearly, the generated code isn't right. I'll post a patch as soon as I've fixed it.
Cheers, Michi. |
|
||||||
|
I've posted a patch at http://www.zeroc.com/vbulletin/showt...=5194#post5194. Thanks for the bug report!
Cheers, Michi. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mapping Exception | ganzuoni | Comments | 2 | 02-14-2008 07:39 AM |
| Which language mapping(s) do you use? | marc | Comments | 12 | 05-31-2006 07:19 AM |
| Dictionary mapping in cpp | DeepDiver | Comments | 1 | 04-07-2005 09:06 AM |
| C mapping | colding | Comments | 4 | 03-31-2005 05:48 AM |
| OR mapping questions | stephan | Help Center | 2 | 02-04-2005 04:42 PM |