Why would you like to do that? There is nothing which Java can offer on the language level...well there are some points, like the "throws" declaration which forces you to catch possible exceptions. I do not see any added value on adding Java to the languages for CLR. (except the fact that it is so popular). On the other hand it would be great to write software in C# which would run on JVM... Or let's just wait till the release of Java 8 which will offer some good language stuff (2013...maybe) - than I will happily code in java...maybe
hoonzis
Posts
-
How about including Java as one of the .NET supported languages? -
It's an OOP world... is it? ...still?I do not think that OOP will go away soon. It is usefull because it allows you to model the world around. All programs, that we write are ment to solve real worlds problems. Since the real world is created from objects which have relations and communicate OOP is good tool, because it allows the dev to reflect the real world. This also explains that maybe for real time or other problems OO is not at all useful. regarding functional programming - it can be compatible with the OO approach. FP tries to eliminate the global state, puts accents to concepts such as functional composition, but there is nothing which would make it incompatible with OO, is there? So I think we have to wait, if some future concept will substitute OO, maybe it will, but I think it will not get rid of entities, or objects, or whatever you want to call it...
-
Update InfoPath option button using XMLHello, I am developing quite complex workflow using SharePoint and Workflow foundation. The WF is started on a InfoPath form and through the process of the workflow values of fields are changed programaticaly in the infopath form. So far I had only textboxes which I was changing using this method:
MemoryStream myInStream = new MemoryStream(lFile.OpenBinary());
XmlDocument myDoc = new XmlDocument();
myDoc.Load(myInStream);XmlNode myRoot = myDoc.DocumentElement;
XmlNamespaceManager xmlNSManager = new XmlNamespaceManager(myDoc.NameTable);XmlNode node = myRoot.SelectSingleNode("/my:fieldPath", xmlNSManager);
node.InnerText = "Text which I want to put in the textbox";Now I have a Option button(Radio button), where you can swich from 3 values. I would like to be able to select one of these values programatically. I've checked the XML definition of the InfoPath form and I thought that I could just use the InnerText property and insert the proper text(text of one of the choices). But that is not working. I am new to InfoPath and I am not a member of any IP forums so I said I will try my luck here in CP :) thank you for any suggestions Honga
-
Webbrowser and encodingHello, I'm using the webbrowser in my litle email client. I'm editing the message in the browser, then accessing it over DocumentText and sending later. Does anyone know how to change webbrowser's encoding from code?I tried:
webbrowser.Document.Encoding = "windows-1250";
and actually it puts the correct encoding into the html code, but it deletes all the special characters in the html.So I will get:etina je krsn
This happens when I'm changing the encoding after the editing of the document is finished. I tried to first change it to windows-1250 and then edit the content, but actually every time I edit something in webbrowser it changes back to utf-8, which is default I suppose. Any help on this appriciated Thanks Honga -
Null parent row parameter for addRow method, using typed datasetThank you, we solved it yesterday similary to the way that you suggested. We just didn't create new class inheriting from DataSet but we added the new method without the problem parameter to our class which is providing some other data operations. Honga
-
Null parent row parameter for addRow method, using typed datasetThanks for your answer, The DataSet is generated from Visual Studion from SQL Server so there already is a DataRelation between those 2 tables "tickets" and "users". So I guess that when I delete this Relation it is gonna work fine. The problem I don't understand is however more general. My addRow method on table "tickets" looks something like this:
myDataSet.ticketsTable.addTicketsRow(string ticket_title,DateTime ticket_created,...,**MyDataSet.usersRow parentusersRowbyFK_ticket_users**)
In the DataSet the FK_tickets_users is set to "Relation only". In the database there is field user_id of type int and this field I'm setting by the MyDataSet.usersRow parentusersRowbyFK_ticket_users parameter. This field user_id allows Nulls. So my question is what parameter should I provide to the addTicketsRow method so the field user_id in the database would be Null? As I said before, null was my first try, but than I'm getting NullReferenceObjectException. -
Null parent row parameter for addRow method, using typed datasetThanks for answer, the DataSet is generated from the database using the VisualStudio so there is a DataRelation between those 2 tables already. So I can simply erase this relation and I guess it is gonna work fine after that. The problem that I don't understand,is however, little more general. The generated addRow method parameters looks something like this:
ticketsTable.addTicketsRow(DateTime ticket_date,string ticket_title,....,**MyDataSet.usersRow user_id**)
and I know that in the database running on SQL Server, the field user_id in table tickets allows Nulls(and also in the generated DataSet). So when Visual Studio created the DataSet for me with this wonderful method, what parameter should I supply to this method for the usersRow, so the field in the database would be Null? When I supply null, which was my first idea, I just get "object reference not set to instance..." exception. Honga -
Null parent row parameter for addRow method, using typed datasetHello, We're developing this small helpdesk application in we run into this problem: I have a table of tickets and table of user, each ticket has in the database the field user_id where nulls are allowed. I'm using typed dataset generetad using the Visual Studio, so there is also the relation FK_users_tickets generated.So in my myDataSet.tickets table a method addTicketsRow() was created with several arguments, one of them being of type myDataSet.usersRow. I know that's the parent usersRow, so it's ok, the problem is when i want to add the new row with the user_id field null. How to provide usersRow parameter which is gona be null? Well ofcourse i tried providing the null parameter but im just getting nullreference exception. I also tried to find some constructor or method to create empty usersRow, but i found just the method myDataSet.users.newUsersRow(), but this one will just create another new usersRow and will set it's id, because there is autoincrement on the user_id field and obviously i don't want to do that. Looks litle confused, but hope the explanation is understoodable. Actually I'm almost sure it should work with the null parameter, because i had a piece of code like this before and that time it worked, but now i've already spend two days on solving and googling and still didn't come up with answear...so any help would be realy appriciated. thnx Honga