|
I found the solution:
m_xyz = Convert.ToBoolean(m_lbl.Attributes["Name"]);
is error free in C#.
|
|
|
|
|
Ok, i just created a form in C#. Ran it on the windows CE Emulator.
Worked fine.
Changed 1 thing in the form. And now, it can't find the InitialilzeComponents() method. It throwns a "MissingMethodException".
Tried re-creating the form, worked fine. Changed 1 thing (different), and it did the same.
Created a dummy method, ran dummy method from constructor. Set up both method calls with breakpoints. Went past dummy, crashed on Component Initialisation. Again.
Copied contents of initialise method into dummy. And it crashed on dummy. Set all internal calls in the dummy method with break points. It crashed somewhere between the Dummy call, and the first break point.
So... i've come to the conclusion my compiler is broke or windows CE is retarded.
How do i fix it? Why is it doing this too me? Is this really something that should be happening?
Cheers
Cata
|
|
|
|
|
Ok, I have just narrowed it down to two calls added automaticaly when you edit the form properties. It's setting the "Name" and "AutoScaleBaseSize" values, which do not exist. Somehow they get past compile time, and into runtime, where it all goes horribly pete tong.
Guess MS need to fix that.
Is this a known problem?
|
|
|
|
|
More functions that cause the .Net Lightweight framework to crash, that are inserted automaticaly into the InitialiseComponent block.
SuspendLayout()
ResumeLayout()
TabIndex
Name
AutoScaleBaseSize
It all works OK in the design page.
Is there ANY way to stop it doing this? If i add 1 button, i have to delete a whole SLEW of lines of code that are added, and when i discover a new one, I have to comment out a whole block and go through them 1 at a time, uncommenting them. It's driving me INSANE.
*deep breath*
*end rant*
|
|
|
|
|
I haven't had any problems like that. But, then again, I don't think I've ever had SuspendLayout and ResumeLayout in my forms code either. It sounds like Windows Forms (full Framework) code is being generated in place of the code that SHOULD be generated for the Compact Framework.
What on earth did you install?! This may be an overkill solution, and I would welcome any other suggestions, but I'd try reinstalling Visual Studio. As painful as that may sound...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yep, I reached the same conclusion, see my next post.
sh!7... I just realised... the DLL i added to my project is not for compact framework, it's raw .Net.
OMG... now i feel stupid.
Never mind... slight 'looser error' as they say.
Cata
|
|
|
|
|
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You seem to know a lot about the lightweight framework.
I've been trying to construct a Form based inheritance tree, but it is refusing to cooperate. Is this functionality not supported in the Compact Version?
Could you offer advice on a good way round it? Because I have some compulsory base functionality that I want to mix with customisable in an inherited class, in a single call. I can't do this with interfaces.
Cheers
Cata
|
|
|
|
|
The Catalyst wrote:
You seem to know a lot about the lightweight framework
Very funny!
I've written a couple of applications to toy with it. Nothing more. Form visual inheritance is out of my scope of experience.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If I have a console application that I do not want to be visible, how do I do this? Its being run as a scheduled job, so I cannot run it as a service.
Cheers,
Jim
|
|
|
|
|
Hello All,
I have an app which has a treeview, and I would like to perform a unique action when the user double clicks a leaf node of the tree. I handled the double click event, but this doesn't tell me much. How do I get to the actual tree node (if any) that the user double clicked on?
Thanks
|
|
|
|
|
|
Thanks.
But, the problem that I am having is that the dobule click handler is called anytime the user double clicks anywahere in the tree, whether or not the user actually double clicked on a tree node. If I click off in the empty space of the control, the handler is called. The selected node property has a node in it, but I don't have any way to know if that node was actually double clicked.
Aaron
|
|
|
|
|
Try handling the AfterSelect event instead. You can do something like the following:
private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
{
TreeNode node = e.Node as TreeNode;
if(node != null)
{
MessageBox.Show(node.Text);
}
}
|
|
|
|
|
Yes, but this will be called if I single click the tree node, won't it? Basically, I need to perform two different actions if the user double clicks a tree node, and if they simply select it (by moving the keyboard, or clicking on it with the mouse). If the double click event args had some more info in them, like mouse coordinates, it would help me figure out if the user actually double clicked a node, or off in space.
My only other thought is to also handle mouse down events, save the corrdinates from these, and use them in the handler to doube click to figure out where the double click happened. This seems pretty messy, surely, there's a cleaner way to do this?
|
|
|
|
|
The GetNodeAt [^] member will tell you the node at a specific point location.
But looking at the docs for DoubleClick [^] event, the TreeView is not supposed to raise a Click or DoubleClick event if the click is not over a node (see below the table before the example.)
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Well, the documentation says that it will not, but if I set a breakpoint in the handler for the double click event, and double click somewhere off in the margin of the control (not over a node), the handler is called. The double click event does not contain any mouse location info to use with GetNodeAt. I suppose maybe I could also have a handler for MouseDown, or MouseUp, and save these coordinates for use in the handler for double click, but that seems kind of ugly.
|
|
|
|
|
Hi all..
this is my first post here..
I'm working on a dictionary for the pocket pc platform.. using .NET CF..
the dictionary is 140,000 words..
ofcourse using Ado.net would run my 128mb ram pocke pc "out of memory"(whether it's xml or readline() with a text file)..
so i tried writing the words to an ordinary text file..
it was like 7mb. i thought that using readline() and ArrayList or String array would do just fine... but this was also not efficient...
it will take about 70seconds to load on 400mhz,128 ram..
my question is.. is there any faster way??
i don't want to use c++ as i'm trying to do all my programs in .Net..
Regards,
|
|
|
|
|
You should check this out:
Its a good site, and if I remember it correctly, that would potentially help you sort out your words. I recognize that that wont help your memory problem though, so I would propose something like this:
Keep them in the external file (I suppose you dont really have a choice seeing as you cant load them into memory). Then, on the first time you load the dictionary (also when you make changse but I will let you figure that out) you can document the spot in the file that they are.
How do you find a word? Keep a subset in memory with this algorithm. When you obtain the closest match, go to wherever you need to, and from there search throught the file.
This is just a guess as to how you could do it thought, Im sure there are much better ways,
Luck,
Jim
|
|
|
|
|
Uhhh... What site?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Wow, it goes to show how baaaaad I am at HTML!
The site was this: http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/opt_bin.html
|
|
|
|
|
first a disclaimer: I have zero experience with PDA apps (Im used to Server Apps where I can almost rely on there be more memory than I could use )
Just wanted to throw an idea out to you, maybe its something you could investigate. It strikes me that what you need is some form of index - so that you can start by making some sort of educated guess as to where the word is.. then you can load a subset of the entire dictionary into memory and search through that for the correct word.
So lets assume you have all the words/meanings in a text file, separated by a newline.
aardvark - An animal
antelope - Another animal
bird - A flying animal
branch - Where birds make their nests
bukakke - er, not suitable
cat - A feline animal
When you install your application, or update your dictioanry data, you could also update/install smaller textfile with an index of where each starting letter begins and ends.. for the above this would be
a, 0, 1
b, 2, 4
c, 5, 5
etc
Now, when you start your app load up the index for future use. When somebody enters a word to lookup, grab the first letter of the word, and query your "index" for the starting and ending location for that letter. Now load up the dictionary data but only store in memory the lines between start->end. Now enumerate this smaller list until you find the right word.
Not sure if this helps but thought it may give you some extra things to think about
|
|
|
|
|
This was the site I was talking about (for ref in my response to this).
http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/opt_bin.html
What J4amieC is proposing is in essence similar to what I am saying. Sadly, if you are doing a lot of things really quickly with this dictionary (eg, you were writing a word document!) this would be far too slow! At least, if your memory were really small. Having a read call every time would be pretty taxing. By having this 'weighted tree' you could likely keep a local copy in RAM (as it could be quite small). Thats not to say you couldnt keep a copy of J4amieCs approach in there too. The nice thing is that his is a lot easier Also, you dont need to calculate the weights the first time through.
|
|
|
|
|
Message Closed
-- modified 22-Dec-14 16:55pm.
|
|
|
|
|
Sorry, can you explain what that restriction was a little better? I dont understand you.
As for speed in accessing the indexed files, dont forget that you can cache them too So if you have a listing that you access all of the time then you might consider building up a cache of those words. Hell, you could even have two caches... a bus... a microprocessor...
^^
Jim
|
|
|
|
|