|
Hi All!
Still working furoiusly hard on my JavaScript Editor, and doing quite well now that i have overcome a few obstacles, however i have been sent tumbling head-first over yet another.
In VS, I have never ceased to be amazed at the intellisense, autocomplete and error-marking (Little squiggly line under bad peices of code). How would i go about implementing roughly these features, though obvoiusly scaled down a bit, for javaScript.
I Am Using SharpDevelop's TextEditor Control for my code editor control and so need any Intellisense to be compaitable with this control.
Thanks!
MrWolfy
|
|
|
|
|
Maybe this[^] would be useful? As long as your TextEditor control has a OnKeyDown or simliar event that handles a key press that article might work.
|
|
|
|
|
Hi and Thanks!
The Link provided an excellent insight into how to begin to implement intellisense in my application, however it was not for javaScript, and from the looks of it can not be tweaked to accept javaScript.
Can anybody recommane a more database-oriented approach, perhaps using a database to fill out the intelliSense list?
Thanks Again!
MrWolfy
|
|
|
|
|
Hi MrWolfy,
I may not know exactly what you are looking for, but you can modify the code in that article to accommodate whatever intellisense you want. You could make the intellisense in a database and use that code to read the database (instead of calling readAssembly ). Sorry if I misunderstood or if I'm telling you old news.
|
|
|
|
|
Hi!
Wow, you're right! Sorry, I Didn't understand at first but now I do! Thanks, you've been a great help!
Thanks Again!
MrWolfy
|
|
|
|
|
It's possible to specify that a generic class will only accept items which meet multiple qualifications. For example, the class could be specified as working with Control objects which implement the iEnumerable and iSuperMagic interfaces by declaring it as something like
Class Whatever(of {Control,iComparable,iSuperMagic}) . Is there any way to specify that method arguments and return values, class fields, etc. should likewise possess multiple qualities?
It would be possible to ignore the interface requirement in the definition and use typecasts to make the necessary calls (e.g. have a method accept an ordinary control and then use a typecast to use other interface methods or properties, e.g.
if ctype(iComparable,theObject).Comparer > 0 then but that seems like rather a kludge, and it would also delay until run-time type checking should should in many cases be possible at compile time.
Is there some workable syntax to produce complicated types that I'm simply not seeing? I've tried many variations of the "brace" notation and can't get it to work.
|
|
|
|
|
I am not sure I fully understand, but I am sure the answer is no. You define a method when you write it. Why would you define something abstract about what it's properties are, when you are about to define them concretely ?
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Christian Graus wrote: You define a method when you write it. Why would you define something abstract about what it's properties are, when you are about to define them concretely ?
In VB.net, it is very common and useful to be able to have classes which can operate on objects without knowing exactly what they are. For example, the Array class includes a Sort function which can operate on arrays of any type of data, provided only that they implement the iComparable interface. The code for Array.Sort doesn't care what it's sorting--all it cares about is the fact that the things it's sorting know how they compare with each other.
Suppose I want a container control that includes a function to auto-arrange its contents in sorted order (assume all child controls can be compared with each other and sort nicely). The control doesn't care what the child controls are, beyond the fact that (1) they must implement the iComparable interface, and (2) they inherit from System.Windows.Forms.Control, and thus possess the position and size properties necessary to arrange them.
Most existing controls would lack an iComparable interface, but any inheritable control could be made to support it. On the other hand, I don't know how to very well specify that the contents of the container must be controls that implement the iComparable interface.
I suppose it might be possible to define an interface called iComparableControl, which inherits iComparable and includes a method myCtl which returns an object of type Control (the idea would be that a control would return itself) but that would seem rather goofy. It would be much nicer to simply specify that the container held objects which were inherited from type Control and which implemented the iComparable interface.
|
|
|
|
|
So you want Sub Test(ctl As {Control, IComparable}) ?
There's no way to define a method like that.
In some cases, you might be able to use a generic method
Sub Test(Of T As {Control, IComparable})(ctl As T)
but unfortunately, that isn't always possible - e.g. you cannot have a List(Of {Control, IComparable}), as using generics for that would always limit you to a specific T.
|
|
|
|
|
In some cases, you might be able to use a generic method
Sub Test(Of T As {Control, IComparable})(ctl As T)
I don't think I'd ever noticed a method coded like that--only classes and interfaces (and I never really understood how the latter worked). I'll have to think about whether that's sufficient, or whether it will be better to define an interface which returns a control (which in most cases should just be an item returning itself). I can see advantages both ways.
|
|
|
|
|
I have been looking for a program that will dial an office extension and then play a MP3 or WAV file (prefer MP3) and then hangup on a specified time interval. I have yet to find this so I have been looking into possibly creating one myself. I have limited VB 2008 Express experience, but i have looked over a couple of the TAPI examples but they do not cover the timing or the MP3/WAV playing. The following are the components of the program. I do not know how to do the timer or the TAPI programing to play the file over the phone, so any help would be appriciated. Thanks.
TextboxExt = Extension #
TextboxTime = minutes between dial/play
TextboxMP3 = MP3/WAV location
CmdButtonPlay = Manually dial/play, stop timer
CmdButtonStart = Start timer for playing, repeat until stopped
CmdButtonStop = Stop timer
LabelTimer = When timer is started, count down time until next dial/play (min/sec)
Jason
|
|
|
|
|
Hi,
I am running web application in debug mode. I have put some breakpoints but control doesnt stop at break points. I am using :----
Code Behind: Vb.Net
Frame Work: 1.1
IE: 7.0;
IIS: 5.1
I have gone through all the option of Virtual Directory Properties.
Your suggestion will be highly appreciated.
Thanks
Binod K.
(Miles to go before I sleep)
|
|
|
|
|
Check Active Solution Configuration from 'Configuration Manager' which is under Build Menu of IDE. Set it to Debug mode. if Configuration Manager is not displayed under Build menu, then Perform the following action
Go to Tools-->Options-->Projects and Solutions--->General
now from the Right hand panel Check the option 'Show Advanced build Configurations'
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
|
Explore your problem bit more.
whether you use CrystalReportViewer or DataReportViewer or any other?
I think the Paper size, you define at design time is Bigger than the Paper you can insert into printer.
other possibilities is that Field size is smaller than the contents so it can not display the all the contents.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
I have some Hard Coded data which is printed .Also at the end of the page whatever i am displaying is being printed.But the Details in the middle of the page is not Printed. And No i am not using CrystalReportViewer.
|
|
|
|
|
Can you post the code snippet of your printing procedure so i can analysis where may be problem arise ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
I'll tell You How I am Printing
In the Top of the Page,I'll Print the Date ,Time ,Name etc using e.graphics.drawstring
In the Middle of the Page I am Running a Loop to Display Some Details.
Then At the end of the Page,I am Printing Some other Details.
i am Using only draw string and also draw line to draw some Boundary.
Now In the Print Preview i am able to see all the details.In the Printout, The Details which i am Printing from the Loop is not visible.
|
|
|
|
|
Thanks.I Got the Solution
|
|
|
|
|
Did you forget to reinitialise your data pointer type variables in the BeginPrint event so when you did print previerew followed by print the data was off the end?
The beginners guide to printing in .NET[^] may be of use/interest to you.
|
|
|
|
|
Hi
i have managed to populate dropdownlist from database so i want to select a value from dropdownlist and insert it into database.The problem is when ever i select a value it always select the first value regardless of what i choose.everything is working except dropdownlist
here is my code
cmdEmployee.Parameters.Add("@Emp_No", SqlDbType.Int).Value = TextBox1.Text
cmdEmployee.Parameters.Add("@Location_ID", SqlDbType.Int).Value = DropDownList1.SelectedItem.Value
cmdEmployee.Parameters.Add("@Tel", SqlDbType.VarChar).Value = txtTel.Text.ToString()
cmdEmployee.Parameters.Add("@Fax", SqlDbType.VarChar).Value = txtFax.Text.ToString()
cmdEmployee.Parameters.Add("@Cell", SqlDbType.VarChar).Value = txtCell.Text.ToString()
cmdEmployee.Parameters.Add("@Alternative", SqlDbType.VarChar).Value = txtAlternative.ToString()
cmdEmployee.Parameters.Add("@Block", SqlDbType.VarChar).Value = txtBlock.Text.ToString()
cmdEmployee.Parameters.Add("@Floor1", SqlDbType.VarChar).Value = txtFloor.Text.ToString()
cmdEmployee.Parameters.Add("@Room_Number", SqlDbType.VarChar).Value = txtRoom.Text.ToString()
cmdEmployee.ExecuteNonQuery()
Mamphekgo
|
|
|
|
|
It sounds like you are rebinding the dropdown list on postback. That would remove everything in it that came from the postback, including the selection, and the first item gets selected by default.
Use the IsPostback property to determine if the page is loading for the first time or not, and only bind the dropdownlist on the first load.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I am trying to generate simple Crystal Report. To do so I have configured datas set and i have set this data set as reports's data source.
If I check the table name of data set then It gives that right. But on the next line where I have set this dataset as report's data source it gives Error "Report has No tables"
Code is as follow:
Dim i As New CrystalReport1
Dim ds As New System.Data.DataSet
Dim ObAdp As New SetDatasetClass' here dataset get configured
ds = ObAdp.getDataset("Select * from Employee" )
MsgBox(ds.Tables(0).TableName)' Shows table name as Employee
i.SetDataSource(ds.Tables(0))
Is the method is right?
|
|
|
|
|
I think you are not set any table to CrystalReport1 at design time. If Yes then,Let me explain how can you set the table for report
1 Open Report CrystalReport1 in IDE.
2.From the Field Explorer window,Right click on Database Fields and Select Database Expert option (Or you can also Select the 'Database Expert' option from Menu CrystalReports-->Database)
3.A new window is open(Database Expert) from which you can select the Table(Employee) for you Report and click on OK button.
4. Now in Field Explorer window, A + sign is appear in Front of 'Database Fields' Option. Expand this sign
5. After expanding, Employee table is appear which you select in Database Expert window.
6. Place fields of Employee table in Appropriate section of Crystal Report
7.Now run you application
Hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
I want to stop and restart service when service is started.
|
|
|
|