|
You know you might be right about standard edition. I personally never used standard.
Alex Korchemniy
|
|
|
|
|
I'm new to remoting and not very articulate so bear with me here. I have an object that needs to be queried by a remote client but it inherits from some other class already.
public MyClass : SomeBaseClass
{
public string GetName { return "name"; }
}
So I made a remoting object like so
public class RemotingObject : MarshalByRefObject
{
private MyClass c;
public RemotingObject( ) { }
public setClass( MyClass start )
{ c = start; }
public string GetName( )
{
return c.GetName( );
}
}
and a server like so
public class RemotingServer
{
public RemotingServer()
{
TcpChannel channel = new TcpChannel( 8080 );
ChannelServices.RegisterChannel( channel );
RemotingConfiguration.RegisterWellKnownServiceType(
typeof( RemotingObject ),
"RemotingObject",
WellKnownObjectMode.Singleton );
}
}
My question is that how can I pass a MyClass object to the remotable object after it is created? Is is possible to pass it in the constructor of the remotable object?
Thanks.
|
|
|
|
|
A remote object is like another object, you can indeed pass it as a constructor parameter.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I have an typed collection wich is bounded to datagrid control like this:
dataGrid1.DataSource = collection;
How to disable 'new row' in DataGrid ?
---
object oriented
uml oriented
iconix oriented
sql oriented
truespace oriented
---
solitare oriented
|
|
|
|
|
CurrencyManager currencyManager = (CurrencyManager)this.BindingContext[this.dataTable];
if ( currencyManager != null )
{
((DataView)currencyManager.List).AllowNew = true;
}
|
|
|
|
|
Hy, 10x for response,
but I have a collection bounded to Datagrid control not a DataSet/DataTable
object oriented
uml oriented
iconix oriented
sql oriented
truespace oriented
---
solitare oriented
|
|
|
|
|
I am using a collection called "GridLinkedListCollection"
this.globalEntitySearchGrid.DataSource = this.linkedList;
this.globalEntitySearchGrid.AllowNavigation = false;
this.gridTableStyle = new DataGridTableStyle();
this.gridTableStyle.MappingName = "GridLinkedListCollection";
and the new row addition is disabled. Are you binding your DataGrid with code similar to above?
Are you implementing IBindingList?
|
|
|
|
|
Yes, indirectly.
My collection is derived from CollectionTemplate (I use ORM.NET from Olero) base class collection witch
implement IBindingList (is true).
I just want that DataGrid to do not display new row.
object oriented
uml oriented
iconix oriented
sql oriented
truespace oriented
---
solitare oriented
|
|
|
|
|
|
This line
((DataView)currencyManager.List).AllowNew = true;
generate an error: invalid cast !
10x in advance
---
object oriented
uml oriented
iconix oriented
sql oriented
truespace oriented
---
solitare oriented
-- modified at 15:06 Thursday 8th September, 2005
|
|
|
|
|
In the quickwatch see the base type of currencyManager.List.
That will definitely help.
|
|
|
|
|
Hello,
I am trying to use an old C++ library that generates nurbs curves with my C# program. The library is the nurbs++ one available online. I have come to the point where I think I need to write a wrapper to use the functions from the library in my C# program but I have one big problem. The nurbs++ library is all completely in templates, and I am unsure of how to write the wrapper with template functions. The MSDN guide to write wrappers is all in regular functions not templates, and I have also not been able to find any examples of how to wrap a C++ template class or funciton online anywhere. If anyone can help I could really use it. Please either point me in the right direction or give me a wrapped template function example.
Thanks a lot,
Michael Brown
|
|
|
|
|
If you need to keep the "templateness" of things, you are forced to use version 2.0 of the .NET Framework. BUT! Things are still not necessarily going to be easy then, since generics and templates are different creatures.
A simple solution (if it can work for you) is to create a non-template MC++ wrapper around a specialized template class. (For example, if you have a template class CCalc<T>, then create an MC++ wrapper called CCalcInt.) The other .NET languages can then easily use the non-templatized wrapper class.
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
-- modified at 13:35 Thursday 8th September, 2005
|
|
|
|
|
Why does C# NOT support default parameters when VB.NET and C++ do?
|
|
|
|
|
Because MS has decided they were a bad idea. Instead you should write overloaded method calls with the minimum params, all of them, and any intermediate combination that you feel is neccesary.
|
|
|
|
|
I have a form which i use to initiate my windows application in Application.Run()
and i need a way to access a function within that form.
I need to do this because i have another active form which has to update the form created in the Application.Run(), and ive managed to show/hide the main form but not to access its functions.
// Example. In form B which has its owner set to the main form
ActiveForm.Owner.Visible = false;
This affects the main form but i cant seem to find where the public functions are or to edit anything beyond basic frame parameters.
Does anyone know how i can do this?
|
|
|
|
|
You have to cast the return value of ActiveForm.Owner to the specific type.
if (ActiveForm.Owner is MainForm)
((MainForm) ActiveForm.Owner).Function(..);
www.troschuetz.de
|
|
|
|
|
I tried your way before and i also tried (ActiveForm.Owner as MainForm).function
but neither of them gives me access to functions.. why?
It seems like the form created in Application.Run() have much more privacy and restrictions to it than other forms created.
|
|
|
|
|
Which access modifier has the function? Did you declare it public or internal?
www.troschuetz.de
|
|
|
|
|
the function is public and the form class is declared like this:
public class MainForm : System.Windows.Forms.Form
|
|
|
|
|
I'm a bit at a loss than, cause in this case the given code should work.
What compiler error do you get for your code snippet (ActiveForm.Owner as MainForm).Function() ??
www.troschuetz.de
|
|
|
|
|
I am writing a windows service which will manage image capturing devices, when client connects to the service, at some point the service need to expose a device dialog to the client. According to MSDN docs, classes within the Windows Forms namespace are not supported for use within a Windows service. So How can I do that?
Thanks!
Hang
|
|
|
|
|
You can't. You cannot send a dialog reference from a web service. You're going to have to capture the image from your insert device here using some other method. That method depends on your device. Then serialize and send the image it captured. You can't send a dialog like that.
In short, Web Services deal strictly with data. They cannot provide any kind of user interface to a client what-so-ever.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 12:49 Thursday 8th September, 2005
|
|
|
|
|
I have an array of objects of a class having 10 fields. The first 5 fields should behave like composite keys of a sql table. So only objects conforming to the constraint can be added.
I dont want to use it.
I just need a simple logic to implement this in an ArrayList.
|
|
|
|
|
Hi,
I have a very strange problem which i hope someone can help shed light on.
I have a Windows Forms application which provides data-entry UI. Data
inputted is then stored into a DataSet which will be persisted into a XML
file using the WriteXML method.
The Dataset which contains a Filename data column (type = string); A user
selects a file using the OpenFileDialog component. The file name is
displayed in a textbox until the user clicks on the Save button.
PROBLEM:
If the file is selected using the OpenFileDialog.ShowDialog() method, the
file name is added to the dataset, but it is not written to the XML file.
However, if the filename is manually typed into the textbox, saving to XML
file succeeds.
This is a very strange problem, any help will be very much appreciated!
Thanks.
|
|
|
|